logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Other Software View previous topic :: View next topic
Reply to topic   Topic: 403 Error (forbidden) - problems installing PHP/Apache
Author
cc8



Joined: 20 Jul 2006
Posts: 1

PostPosted: Thu 20 Jul '06 5:29    Post subject: 403 Error (forbidden) - problems installing PHP/Apache Reply with quote

Hi all I'm having some issues installing PHP 5.1.4 correctly with Apache 2.
I'm installing it binary method and have added these three lines to the httpd.conf file:

ScriptAlias /php/ "c:/server/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php-cgi.exe"


I have created the phpinfo.php file and included:

<?PHP phpinfo(); ?>

When I open up a new IE browser and type goto http://localhost/phpinfo.php it comes up with a 403 Forbidden error. I have installed all my PHP and Apache files into C:/Server and not all separately.

If anyone knows what I have done wrong or what I haven't done, your help would be greatly appreciated.
Cheers
Back to top
pnllan



Joined: 05 Dec 2005
Posts: 221

PostPosted: Thu 20 Jul '06 6:12    Post subject: Reply with quote

We need more info:

What version of Apache (Apache 2.0.xx or Apache 2.2.xx)?

INFO U: Running PHP as CGI binary your server is open to several possible attacks.

You might need to add something like the following:

<Directory "C:/server/php/">
AllowOverride None
Order allow,deny
Allow from localhost
</Directory>

My reasoning is based on the Apache root is usually set to Deny from All, and therefore every sub-folder/sub-directory inherits that setting. So you would have to Allow from All or Allow from localhost so that you would have permission to execute anything in the folder you are trying to run PHP. I've never tried to run PHP as CGI under the Apache root. For that matter, I haven't run PHP as CGI except when I first started working with PHP (even then it was for less than a day).
..
.
Back to top


Reply to topic   Topic: 403 Error (forbidden) - problems installing PHP/Apache View previous topic :: View next topic
Post new topic   Forum Index -> Other Software