php4 as CGI and php5 as Apache2

Discussion in 'HOWTO-Related Questions' started by Handyman, Jun 6, 2006.

  1. Handyman

    Handyman New Member

    I followed the tutorial fond here: and now when I created the pages phpinfo.php and phpinfo.php4
    the phpinfo.php page shows php5 as the php version and when I go to phpinfo.php4, it gives me a error 404
    "/cgi-bin/php4/phpinfo.php4 File Not Found!"

    I've tried putting php5 as the cgi version by installing php5-cgi and changing the line found in apache2.conf and when I go to phpinfo.php5, it shows up as test

    Anybody know what I'm doing wrong?

  2. Handyman

    Handyman New Member

    I figured this out and it's working great for me now.

    Instead of:
    AddHandler php-script .php4
    Action php-script /cgi-bin/php4

    I have:
    ScriptAlias /php4-cgi /usr/lib/cgi-bin/php4
    AddHandler php-script .php4
    Action php-script /php4-cgi

    Note: I'm using Debian Sarge (3.1)

Share This Page