ispCP - Board - Support
FAQ: How can i change to PHP5 - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Development Area (/forum-1.html)
+--- Forum: General discussion (/forum-11.html)
+--- Thread: FAQ: How can i change to PHP5 (/thread-1290.html)



FAQ: How can i change to PHP5 - carnalito - 09-05-2007 02:06 AM

Hi folks,

in the FAQ there is an advice to override the last line of php4-fcgi-starter to work with php5 on a domain.

Would'nt it be better to make link (ln) to php5-fcgi-starter in order to have the right directories and the right php.ini?!

Regards

Carnalito


RE: FAQ: How can i change to PHP5 - BeNe - 09-05-2007 03:54 AM

No! If you install ispCP Omega with the current trunk you can choose your PHP Version now during the Setup.

If you have the RC2c running this time - do it how the FAQ says.

Greez BeNe


RE: FAQ: How can i change to PHP5 - rsmithgs - 09-05-2007 05:22 AM

BeNe, do you know if I select PHP5 how I can run php code under PHP4 if I wished?

Cheers Smile


RE: FAQ: How can i change to PHP5 - BeNe - 09-05-2007 05:30 AM

You man as Default PHP5 and some sites with PHP4 ?
Never testes - but should also work this way like in the FAQ.
Change instead of php4-fcgi-starter it in the php5-fcgi-starter.

Greez BeNe


RE: FAQ: How can i change to PHP5 - FeG - 09-06-2007 09:54 AM

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


RE: FAQ: How can i change to PHP5 - nuke3d - 09-21-2007 08:01 AM

thanks, much appreciated Smile