httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Angus" <>
Subject Re: [users@httpd] Getting Apache to use PHP under Window XP
Date Mon, 05 Jun 2006 13:29:52 GMT
If phpinfo works -- then you have a working php. Be sure to protect a script which accesses
pgpinfo by locating it in a restricted-access directory (as phpinfo echoes protected information
(i.e. your password) for all the world to see.  

I may be wrong here, but I think the scriptalias directive works only for CGI... i.e. your
line ...
ScriptAlias /php/ "C:/My Programs/PHP/" 

is problematic.

Try putting your .php script in a web-accessible path... something like ...

Alias /phpmyadmin/ "C:/phpmyadmin/"

<Directory "C:/phpMyAdmin">
Options All MultiViews 
AuthType Basic
AuthName "Administration phpMyAdmin"
AuthUserFile /.htpasswd
require valid-user 

Bill Angus, MA
  ----- Original Message ----- 
  From: Richard DeWath 
  Sent: Sunday, June 04, 2006 8:56 AM
  Subject: Re: [users@httpd] Getting Apache to use PHP under Window XP

  I am also trying to get PHP version 5.1.4 to work with
  Apache version 2.2.2.  I am running this on Windows XP
  (I decided to try it there over my Linux server for
  learning).  The Apache service is working and I can
  read html pages locally with no problem.  

  I then installed PHP and followed the directions for
  adding it to the httpd.conf file:

  #PHP5 Added 20060603

  ScriptAlias /php/ "C:/My Programs/PHP/"
  AddType application/x-httpd-php .php
  Action application/x-httpd-php "/php/php-cgi.exe"

  (I also added the path for php to the environmental
  variable PATH).  I can run phpinfo.php from the
  command prompt using either php.exe or php-cgi.exe
  without a problem.

  Having followed the directions to best of my
  knowledge, I restarted the Apache service and
  attempted to test PHP.  The results are:


  You don't have permission to access
  /php/php-cgi.exe/dummies/ch10/phpinfo.php on this

  Okay, so I checked the log files:

  access.log - - [04/Jun/2006:08:39:53 -0700] "GET
  /dummies/ch10/phpinfo.php HTTP/1.1" 403 243 - - [04/Jun/2006:08:40:42 -0700] "GET
  /dummies/ch10/phpinfo.php HTTP/1.1" 403 242


  [Sun Jun 04 08:40:42 2006] [error] [client] client denied by server configuration:
  C:/My Programs/PHP/php-cgi.exe, referer:

View raw message