View Full Version : Apache & PHP problems (please help!)
Killyp
Aug 24, 2006, 06:06 PM
Hi There
I'll start by giving you the address of my website. www.boshty.co.nr
I've set up Apache (along with FTP and whatnot) on a Windows based computer. It's working as an HTTP server perfectly, and we even have .htaccess files set up (try making a 404 error!).
The ONLY problem we're having is getting PHP set up. I've downloaded PHP from Apache, and tried both versions 4 and 5, neither seem to work properly. They install, and I've configured the httpd.conf to work with it. The problem we get can be found at www.boshty.co.nr/phpinfo.php . It just always says forbidden. Does anybody have any ideas what might be causing this?
Many many thanks!!!!
Alex
Rower_CPU
Aug 25, 2006, 01:50 AM
It looks like the path to the PHP executable is the issue - the path in your httpd.conf might be incorrect or the permissions on php.exe aren't set properly.
Killyp
Aug 25, 2006, 07:09 AM
Okay, basically I have PHP installed inside the Apache2.2 folder, which is C:\Program Files\Apache Software Foundation\Apache2.2\php\. The PHP is version 4.4.4.
The three lines I have inserted at the end of the httpd.conf file are as following:
ScriptAlias /php/ "c:/Program Files/Apache Software Foundation/Apache2.2/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php.exe"
Can you confirm that this is correct?
Many thanks...
Thom_Edwards
Aug 25, 2006, 12:03 PM
have you tried using \ instead of / in your path. windows uses \, where the unices use /.
Rower_CPU
Aug 25, 2006, 12:04 PM
That looks fine. Did you check the permissions on php.exe and on the phpinfo.php file?
@Thom_Edwards:
Apache uses forward slashes even when running on Windows. See example config (http://www.zend.com/manual/install.windows.apache2.php)
Killyp
Aug 25, 2006, 02:49 PM
Thanks for the help, but I ended up re-installing Apache and following a tutorial online. I now have it running on a 250gb external HD so all is well...
Thom_Edwards
Aug 25, 2006, 03:04 PM
That looks fine. Did you check the permissions on php.exe and on the phpinfo.php file?
@Thom_Edwards:
Apache uses forward slashes even when running on Windows. See example config (http://www.zend.com/manual/install.windows.apache2.php)
Thanks, Rower. i didn't know that! i was actually just guessing; maybe i should have been more clear that i was not stating a fact. i can't say that i've ever installed php on windows. you learn something everyday...
Rower_CPU
Aug 25, 2006, 03:46 PM
Glad to know you got it sorted, Killyp. :)
No worries, Thom - I always have to scratch my head a bit and double-check when looking at Windows directory structures.
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.