Apache & PHP problems (please help!)

Discussion in 'Web Design and Development' started by Killyp, Aug 24, 2006.

  1. Killyp macrumors 68040

    Killyp

    Joined:
    Jun 14, 2006
    #1
    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
     
  2. Rower_CPU Moderator emeritus

    Rower_CPU

    Joined:
    Oct 5, 2001
    Location:
    San Diego, CA
    #2
    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.
     
  3. Killyp thread starter macrumors 68040

    Killyp

    Joined:
    Jun 14, 2006
    #3
    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...
     
  4. Thom_Edwards macrumors regular

    Joined:
    Apr 11, 2003
    #4
    have you tried using \ instead of / in your path. windows uses \, where the unices use /.
     
  5. Rower_CPU Moderator emeritus

    Rower_CPU

    Joined:
    Oct 5, 2001
    Location:
    San Diego, CA
    #5
    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
     
  6. Killyp thread starter macrumors 68040

    Killyp

    Joined:
    Jun 14, 2006
    #6
    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...
     
  7. Thom_Edwards macrumors regular

    Joined:
    Apr 11, 2003
    #7

    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...
     
  8. Rower_CPU Moderator emeritus

    Rower_CPU

    Joined:
    Oct 5, 2001
    Location:
    San Diego, CA
    #8
    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.
     

Share This Page