• We value your experience with Plesk during 2025
    Plesk strives to perform even better in 2026. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2025.
    Please take this short survey:

    https://survey.webpros.com/

php4 as cgi

P

phrank

Guest
Hola,

I'd like to install php4 as cgi. I compiled it and installed everything in /usr/local/php4.
I edited the vhost.conf but now I am facing a problem with suexec:

[2008-02-08 23:19:17]: uid: (10002/<user>) gid: (2524/2524) cmd: php4
[2008-02-08 23:19:17]: command not in docroot (/usr/local/php4/bin/php4)

Where do I need to install php4 to make it accessible for suexec?

Saludo,

franco
 
[solved]

Now it runs. I copied the compiled binary to vhosts/<domain>/cgi-bin/ . This seems to be safe as I compiled it with --enable-force-cgi-redirect.

Now I only want to use php4 occasionally for developing purposes. When that is the case I only add an .htaccess to the directory-subtree the following content:

Action application/x-httpd-php4 /cgi-bin/php
AddHandler application/x-httpd-php4 .php

Now all .php files in that directory (including subdirectories) are parsed by the php4 binary not the php5 apache module.
 
Back
Top