Plesk11.5 PHP 5.3.x + 5.4.x Fcgi atomic and nucleus repo

Support/Development for PHP
BruceLee
Forum Regular
Forum Regular
Posts: 879
Joined: Sat Mar 28, 2009 6:58 pm
Location: Germany

Plesk11.5 PHP 5.3.x + 5.4.x Fcgi atomic and nucleus repo

Unread post by BruceLee »

Hi,

I'm still planning to achieve setting up multiple PHP version with fcgi and Plesk 11.5 together with packages from atomic and nucleus repos.
Like Scott wrote here https://atomicorp.com/forums/posting.ph ... 12&p=39199
its not that simple.
Now I thought to myself if I can achieve it by doing it manually. Still rpm based but not over yum completely.
Letting yum do the php 5.4 branch from atomic and manually add php 5.3 from nucleus with rpm --prefix=/my/custom/php php*version.rpm

Are atomic/nucleus rpms relocatable like that?
And what about the dependencies?
Could I use one version of php-pecl-apc for example or would I have to install two versions with relocation side by side?

Scott what do you think about the idea? And of course all others?
I'm trying to avoid staying with php 5.3.x by using the HOWTO's of downgrading PHP to 5.3 that have been recently written here and use the possiblity of running both verisions for better upgrade process.
Thanks
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Re: Plesk11.5 PHP 5.3.x + 5.4.x Fcgi atomic and nucleus repo

Unread post by scott »

Its going to have to be a separate package, the modules in the existing php packages expect libraries and paths to be a certain way.
BruceLee
Forum Regular
Forum Regular
Posts: 879
Joined: Sat Mar 28, 2009 6:58 pm
Location: Germany

Re: Plesk11.5 PHP 5.3.x + 5.4.x Fcgi atomic and nucleus repo

Unread post by BruceLee »

hmm.ok. so this is not the way to go :(
Thanks a lot
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Re: Plesk11.5 PHP 5.3.x + 5.4.x Fcgi atomic and nucleus repo

Unread post by scott »

Good news, work has started on this idea. You'll see packages called atomic-phpXX in the -testing repo now. These are designed as Redhat Software Collection Libraries. With plesk 11.5 you should (untested so far) be able to have PHP 5.2, 5.3, 5.4, and 5.5 all available on the system for use as cgi/fcgi.

Minor update, this is how you add them in plesk:

/usr/local/psa/bin/php_handler --add -displayname <NN> -path <path to php cgi> -phpini <path to php.ini> -type <php handler> -id <NN-custom>

-displayname <NN> is the PHP version name that will be shown in the Panel UI. We recommend that you include the version number in the displayname, for example, you can name the version "5.3.3-custom".

-path <path to php cgi>i is the location of the PHP CGI binary file. You can find this in the output of the command make install in the line Installing PHP CGI binary. For example, if you see the line Installing PHP CGI binary: /usr/local/bin/, the location you need to specify is /usr/local/bin/php-cgi. Learn more at http://php.net/manual/en/install.unix.commandline.php.

-phpini <path to php.ini> is the location of the php.ini file, for example, /some/path/php.ini .

-type <php handler> is the type of the PHP handler associated with this version. Learn more about PHP handlers in the section PHP Handlers.

(Optional) -id <NN-custom> is the identifier that you will use for referring to this PHP version when adjusting or removing it.
StephanS
New Forum User
New Forum User
Posts: 2
Joined: Tue Sep 10, 2013 12:00 pm
Location: BE

Re: Plesk11.5 PHP 5.3.x + 5.4.x Fcgi atomic and nucleus repo

Unread post by StephanS »

scott wrote: -displayname <NN> is the PHP version name that will be shown in the Panel UI. We recommend that you include the version number in the displayname, for example, you can name the version "5.3.3-custom".
It's better to not use sub versions.
The repo will probably be upgrading PHP 5.x from time to time, and you don't want to go messing with unregistering and reregistering handlers to update these version bumps.


I've installed and tested this PHP 5.4,
nice work so far!


These are the steps taken:

Code: Select all

wget -q -O - http://www.atomicorp.com/installers/atomic | sh # Install atomic repo
yum --enablerepo=atomic-testing list available | grep -oP '^atomic-php\d+-php.(i386|i686|x86_64)' # Get a listing of all available PHP versions
yum --enablerepo=atomic-testing install atomic-php54-php # Install the atomic-testing php54 package
/usr/local/psa/bin/php_handler --add -displayname "5.4" -path "/opt/atomic/atomic-php54/root/usr/bin/php-cgi" -phpini "/opt/atomic/atomic-php54/root/etc/php.ini" -type fastcgi -id "fastcgi-54" # Add the new PHP 5.4 to Plesk
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Re: Plesk11.5 PHP 5.3.x + 5.4.x Fcgi atomic and nucleus repo

Unread post by scott »

and php55 is up now as well:

Code: Select all

27136   S ?           0:00 /opt/atomic/atomic-php55/root/usr/bin/php-cgi -c /var/www/vhosts/system/atomicpleskqa.com/etc/php.ini
tertiary packages like ioncube are unimplemented as of yet, but the core components should all now be available.
DarkF@der
Forum Regular
Forum Regular
Posts: 313
Joined: Thu May 07, 2009 12:46 pm

Re: Plesk11.5 PHP 5.3.x + 5.4.x Fcgi atomic and nucleus repo

Unread post by DarkF@der »

Very nice post :D
We have installed PHP 5.3 as main version and installed atomic-php54 and atomic-php55 as subversion.
Everything works fine. But how install APC on atomic-php54 & atomic-php55 subversion?

We installed on the main version like;

Code: Select all

pecl install apc
Greetz

Alex Duim
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Re: Plesk11.5 PHP 5.3.x + 5.4.x Fcgi atomic and nucleus repo

Unread post by scott »

I doubt that would work. Let me know what you find out
DarkF@der
Forum Regular
Forum Regular
Posts: 313
Joined: Thu May 07, 2009 12:46 pm

Re: Plesk11.5 PHP 5.3.x + 5.4.x Fcgi atomic and nucleus repo

Unread post by DarkF@der »

I tried it, but unfortunately it's not working... :oops:



I copied /etc/php.d/apc.ini to:

/opt/atomic/atomic-php54/root/etc/php.d/apc.ini & /opt/atomic/atomic-php55/root/etc/php.d/apc.ini

Code: Select all

-rw-r--r-- 1 root root   48 Oct  7 16:14 apc.ini
the apc.ini contains:

Code: Select all

; Enable APC extension module
extension=apc.so
Restarted the httpd server.
But unfortunately it's not working

If i set the domain on the main version PHP 5.3.27 and i look at the phpinfo it's working correctly.
If i switch tot PHP 5.4 or PHP 5.5 it's gone.

Greetz
DarkF@der
Forum Regular
Forum Regular
Posts: 313
Joined: Thu May 07, 2009 12:46 pm

Re: Plesk11.5 PHP 5.3.x + 5.4.x Fcgi atomic and nucleus repo

Unread post by DarkF@der »

Anyone?... :lol: i realy like multiple PHP versions but i need APC and imagick on all versions :)
Highland
Forum Regular
Forum Regular
Posts: 674
Joined: Mon Apr 10, 2006 12:55 pm

Re: Plesk11.5 PHP 5.3.x + 5.4.x Fcgi atomic and nucleus repo

Unread post by Highland »

A bit late but...

1. Make sure you're not using APC 3.1.14. It was so buggy they pulled it. Roll back to 3.1.13 (pecl remove apc, pecl install apc)
2. Consider using Zend Opcache. This is now a PECL library (for 5.3 and 5.4) and the default opcode cache for 5.5. Have had better success with this vs. APC.
"Its not a mac. I run linux... I'm actually cool." - scott
DarkF@der
Forum Regular
Forum Regular
Posts: 313
Joined: Thu May 07, 2009 12:46 pm

Re: Plesk11.5 PHP 5.3.x + 5.4.x Fcgi atomic and nucleus repo

Unread post by DarkF@der »

I have fixed it..... only how to install ioncube on the different versions?
Post Reply