Hey,
I have recently installed php4 and the Apache server. I first installed the apache server which worked absolutely fine:

ran http://localhost/ in my browser with no problems.

Now, after I configured the httpd.conf file everything was fine until I added the action.

The one I placed in was:
Action application/x-httpd-php /my programs/webserver/php4/php.exe

The message I recieved when trying to restart apache was as follows:

'Syntax error on line 811 of d:/my programs/webserver/apache/conf/httpd.conf: Action takes two arguments, a media type followed by a script name
Note the errors or messages above, and press the <ESC> key to exit. _'

Hope you guys can help me because I dunno what is the go.
Bye the way, the action directory has been double checked and is the same as the script alias source.

Ok, thanks.

    • [deleted]

    sigh... windows users get spoiled by using spaces in
    filenames... 🙂

    Arguments are seperated by spaces.
    Count the spaces in your line....

    Action application/x-httpd-php /my programs/webserver/php4/php.exe

    that's three spaces, thus 3 arguments.

    try putting quotes around the location of php.exe
    Action application/x-httpd-php "/my programs/webserver/php4/php.exe"

      Thanks Vincent,
      it worked even though the guide I used to do the installation said it wasn't neccessary.

      Hehe, Well Apache works absolutely fine now and when putting that code into a php file the download takes place however it isn't being displayed. PHP declairs 'Unable to parse configuration file'.

      I am a little frustrated at the moment so I am seriously considering downloading PHPtriad.

      Thanks though,
      if you think you can answer this q. then get back to me but I have done everything spot on.
      K, cya.

        • [deleted]

        What exactly do you mean by:

        Well Apache works absolutely fine now and when putting that code into a php file the download takes
        place however it isn't being displayed. PHP declairs 'Unable to parse configuration file'.

          Whoa, gotta love that promptness.

          Well basically I made that file including
          <? phpinfo() ?>.
          Now, apache seems to retrieve the following information of phpinfo(). However when php tries to do its little bit it just displays 'Unable to parse' jargon. On its section and nothing is displayed on the navigator window.

            At the risk of giving a simplistic and unsatisfying answer, you may want to just download a full pre-configured, it'll-work config like the ones at php4win.de. Like I said, it's not as satisfying as figuring out the problem with the Apache/PHP interference and fixing it yourself, but if your goal is to get running with PHP and you're installing Apache et. al. just for that purpose, starting over with one file download and a little bit of installing time may end up being much faster than any other solution.

            Just another option to consider, I mention it because sometimes I lose track of the goal myself!--

            best,
            Eric

              Thanks Eric,
              Yeh, I can't figure out what exactly is wrong with it and am quite frustrated so I will just download phptriad.
              Thanks,
              Rory

                Write a Reply...