Apache & PHP problems (please help!)

Killyp

macrumors 68040
Original poster
Jun 14, 2006
3,860
5
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

Moderator emeritus
Oct 5, 2001
11,219
0
San Diego, CA
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

macrumors 68040
Original poster
Jun 14, 2006
3,860
5
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...
 

Killyp

macrumors 68040
Original poster
Jun 14, 2006
3,860
5
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

macrumors regular
Apr 11, 2003
240
0
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...
 

Rower_CPU

Moderator emeritus
Oct 5, 2001
11,219
0
San Diego, CA
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.