Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Killyp

macrumors 68040
Original poster
Jun 14, 2006
3,859
7
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
 
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.
 
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...
 
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...
 
Rower_CPU said:
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


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...
 
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.