Re: [users@httpd] Getting Apache to use PHP under Window XP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
</Directory>
Bill Angus, MA
http://www.psychtest.com
----- Original Message -----
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:

Forbidden

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


Okay, so I checked the log files:

access.log

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


error.log:

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

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux