httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard DeWath <dew...@yahoo.com>
Subject Re: [users@httpd] Getting Apache to use PHP under Window XP
Date Tue, 06 Jun 2006 13:04:01 GMT
Bill,

I appreciate your suggestions and will use them.  My
initial problem was even having phpinfo denied.  I
realized that the problem is with changes in apache
2.2.2 httpd.conf.  I found a note on that about the
security change.  I modified that and now phpinfo
works in the cgi.  My next step is to sit down and
read and learn apache 2.2.2 configuration and then
apply your suggestions.  Here is what fixed the access
for phpinfo:

<Directory />
    Options FollowSymLinks
    AllowOverride None
###    Order deny,allow
###    Deny from all
    Order allow,deny
    Allow from all
    Satisfy all
</Directory>


Thanks again.

Richard

--- Bill Angus <mdangus@psychtest.com> wrote:

> 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 ----- 
>   From: Richard DeWath 
>   To: users@httpd.apache.org 
>   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


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message