I used this page in install php4 and apache 1.3 http://www.thesitewizard.com/archive/php4install.shtml

I did everything it said and it's basically the samething everywhere else... but, when I install php as a module (which is what I want to do) and I run the simple script <?phpinfo();?>, and I type in the the address http://localhost/phptest.php it just echos <?phpinfor();?> back to me.

It does not display the php information it just prints text. Why isn't it working?

In windows, do I have to add an file association with .php. In other words go to Start>Settings>Folder Options>File Typs and add a .php associations with php.exe?

If so then why the heck doesn't anybody put it in their installation instructions.

    have you edited httpd.conf?
    if so, try in your script:

    <?php
    phpinfo();
    ?>
    

      These lines have to be in your httpd.conf for it to load as a module
      LoadModule php4_module C:/php/sapi/php4apache.dll
      Substituting the path with where you have php.
      And further down you need
      AddType application/x-httpd-php .php (and whatever other extensions you want to be parsed by php)
      Also if you have any lines making a script-alias for php they need to be removed.

        Originally posted by jerdo
        These lines have to be in your httpd.conf for it to load as a module
        LoadModule php4_module C:/php/sapi/php4apache.dll

        Substituting the path with where you have php.
        Also if you have any lines making a script-alias for php they need to be removed.

        I am having an issue getting Apache2 (under W2k) to restart after adding that line. it tells me

        "Syntax error on line 158 of C:/Program Files/Apache Group/Apache2/conf/httpd.conf:
        Cannot load C:/php/sapi/php4apache2.dll into server: The specified procedure could not be found."

        any ideas, would be very grateful and I am sure it is staring me right in the face!

          Have you downloaded the latest update from PHP.net? Get it here.

            This has been answered in many previous posts but here you go. The included php4apache2.dll is not compatible with Apache 2.0.40 so you need to extract the dll from the snapshot to your php/sapi directory. Here's the link to the snapshot http://snaps.php.net/win32/php4-win32-latest.zip

              Downloading in now.

              Cheers for your help.

                Write a Reply...