Current time: 11-15-2024, 10:43 PM Hello There, Guest! (LoginRegister)


Post Reply 
FAQ: How can i change to PHP5
Author Message
FeG Offline
Banned

Posts: 222
Joined: Aug 2007
Post: #5
RE: FAQ: How can i change to PHP5
Hi...

I don't know if anyone need this, but:

I changed the fastcgi config in my RC2 so that .php and .php5 - files are executed by the php5-interpreter and .php4 - files by php4.

This has to be changed in /etc/apache2/mods-available/fastcgi.conf. On my server the file looks like this:

Code:
<IfModule mod_fastcgi.c>
        FastCgiWrapper On
        FastCgiIpcDir /var/lib/apache2/fastcgi2
        FastCgiConfig -minProcesses 1 -maxProcesses 10 -singleThreshold 100
                      #-killInterval 300 \
                      #-autoUpdate \
                      #-idle-timeout 240 \
                      #-pass-header HTTP_AUTHORIZATION

        FastCgiServer /var/www/fcgi/master/php4-fcgi-starter -user vu2000 -group vu2000

        #
        # PHP4 SUPPORT
        #

        AddHandler application/x-httpd-php4 .php4

        <Location /php4/php4-fcgi-starter>
            SetHandler fastcgi-script
            Options +ExecCGI
        </Location>

        Action application/x-httpd-php4 /php4/php4-fcgi-starter
        AddType application/x-httpd-php4 .php4

        #
        # PHP5 SUPPORT
        #

        AddHandler application/x-httpd-php5 .php .php5

        <Location /php4/php5-fcgi-starter>
            SetHandler fastcgi-script
            Options +ExecCGI
        </Location>

        Action application/x-httpd-php5 /php4/php5-fcgi-starter
        AddType application/x-httpd-php5 .php .php5
</IfModule>
(The "<Location /php4/php5-fcgi-starter>" is because, as I said, it's RC2 - there's only php4 installed and only a /php4 ScriptAlias)

Took me some hours to figure this out, but it works like a charm.

You can anyway do the per-domain changes as described in the FAQ. And - imho - I think, a symlink should also do (what about the line PHPRC="/var/www/fcgi/comdc.de/php5/" in the php5-fcgi-starter? Don't you have to change this, too?)

Greetings
FeG
09-06-2007 09:54 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
FAQ: How can i change to PHP5 - carnalito - 09-05-2007, 02:06 AM
RE: FAQ: How can i change to PHP5 - BeNe - 09-05-2007, 03:54 AM
RE: FAQ: How can i change to PHP5 - BeNe - 09-05-2007, 05:30 AM
RE: FAQ: How can i change to PHP5 - FeG - 09-06-2007 09:54 AM
RE: FAQ: How can i change to PHP5 - nuke3d - 09-21-2007, 08:01 AM

Forum Jump:


User(s) browsing this thread: 4 Guest(s)