I am trying to install PHP4 with Apache2 on Windows 2000, and I have two problem:

1-When I add PHP4 as a module, when I restart the Server, it says:
Cannot load .../Php4/sapi/php4apache.dll into sever. The specified module could not be found.

Adding PHP4 to Apache server.

LoadModule php4_module D:/Behnam/Web/Servers/Php4/sapi/php4apache.dll
AddType application/x-httpd- php .php .php3 .php4 .phtml
AddType application/x-httpd-php-source .phps

2-And when I add it as a cgi script, It make a HTTP 500 error when I request a .php file.

Adding PHP4 to Apache server.

ScriptAlias /php/ "D:/Behnam/Web/Servers/Php4/"
AddType application/x-httpd-php .php .php3 .php4 .phtml
AddType application/x-httpd-php-source .phps
Action application/x-httpd-php "D:/Behnam/Web/Servers/Php4/php.exe"

Can you help me please?

--Behnam
behnam2@sarycity.org
http://sarycity.org

    1. To install php as a Apache module. You must enable module in Apache and reconfig it.

    2.You must select one way to install php as a module or CGI.If you have config it like a module you can not set php as a cgi-script in Apache.

    see php document in php.net.com

      php manual excerpt

      PHP 4 for Windows comes in two flavours - a CGI executable (php.exe),

      and several SAPI modules (for exapmle php4isapi.dll). The latter form

      is new to PHP 4, and provides significantly improved performance and

      some new functionality. However, please note that the SAPI modules

      are NOT yet considered to be production quality.

      In particular, with the ISAPI module, you are likely to encounter serious

      reliability problems especially on platforms older than W2K - you may

      witness a lot of server 500 errors and suffer from other server modules

      such as ASP also failing. You have been warned!

      The reason for this is that the PHP SAPI modules are using the

      thread-safe version of the PHP code, which is new to PHP 4, and has

      not yet been tested and pounded enough to be considered completely

      stable, and there are actually a few known bugs. On the other hand,

      some people have reported very good results with the SAPI modules,

      and there a few reports of problems with the Apache module version.

      In short - your mileage may vary; If you need

      absolute stability, trade the performance of the SAPI modules

      with the stability of the CGI executable.

        5 months later

        hi - I just upgraded to Apache 2 and had no problems running PHP (CGI)....

        this is what I have in my httpd.conf:

        -- PHP --

        ScriptAlias /php/ "D:/prog/php/"
        AddType application/x-httpd-php .php .php3 .php4 .phtml
        AddType application/x-httpd-php-source .phps
        Action application/x-httpd-php "/php/php.exe"

        ---------

        greetz,
        andi

          9 days later

          to install php as a module add the following to httpd.conf:

          LoadModule php4_module c:/php/experimental/apache2filter.dll
          AddType application/x-httpd-php .php

            5 days later
            Write a Reply...