HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   Multiple php versions - varius issues (http://www.howtoforge.com/forums/showthread.php?t=61040)

Lionheart82 20th March 2013 16:49

Multiple php versions - varius issues
 
2 Attachment(s)
Hello everyone, i hope time finds you well!

I have followed the tutorial bellow in order to install the php 5.4.12 as i already had 5.3.6 installed from a repo. Also i recently upgraded my ispconfig3 version to the latest stable version.

http://www.howtoforge.com/how-to-use...-centos-6.3-p3

The issues i am facing are:

a) When i select php 5.4.12 on a web site the base 5.3.6 version is still used

I noticed on /etc/init.d/php-5.4.12-fpm: the error "line 1: N: command not found" when starting / stoping
Edit 22-03 the error above is not shown any more.
I had some dependencies of php missed and did the hole procedure for every php version again.
My php-cgi versions are woking ok, php-fpm are not

b) SuEXEC option is not working for php-fpm no matter what php version i select.

Allow me to note that for my base version 5.3.6 i see no with-fpm command on configure options so php should not have fpm.

So how is it:
1) the Ispconfig panel brings me the php-fpm as an option on the web site selection.
2) i see php-fpm proccess running with the top command and the sites are running ok( on either php version selected).

Apart from that i have searched both Apaches and clients error_log with not significant error.

I have attached 2 screens from the ispconfig of the php versions because i am out of ideas...

System info:
php: 5.3.6
OS: centos 5.4
Web server: Apache
Ispconfig version 3: Latest

Lionheart82 21st March 2013 12:10

Update:

I installed php php-fpm 5.3.22 (http://www.howtoforge.com/how-to-use...g-3-centos-6.3)

Unfortunately i am facing the same issue :S

I have enabled this php version with php-fpm on one web site only

ps -A -f shows

root 618 1 0 12:43 ? 00:00:00 php-fpm: master process (/opt/php-5.3.22/etc/php-fpm.conf)
apache 619 618 0 12:43 ? 00:00:00 php-fpm: pool www
apache 620 618 0 12:43 ? 00:00:00 php-fpm: pool www
web2 621 618 0 12:43 ? 00:00:00 php-fpm: pool web2
web2 622 618 0 12:43 ? 00:00:00 php-fpm: pool web2
web2 623 618 0 12:43 ? 00:00:00 php-fpm: pool web2
web2 624 618 0 12:43 ? 00:00:00 php-fpm: pool web2
web2 625 618 0 12:43 ? 00:00:00 php-fpm: pool web2

So it should work... but the php info on this web site reports that the version is 5.3.6, the base php version :(

logfile shows( i changed port to 8995)

[21-Mar-2013 16:21:08] NOTICE: using inherited socket fd=7, "127.0.0.1:8995"
[21-Mar-2013 16:21:08] NOTICE: using inherited socket fd=7, "127.0.0.1:8995"
[21-Mar-2013 16:21:08] NOTICE: using inherited socket fd=11, "127.0.0.1:9011"
[21-Mar-2013 16:21:08] NOTICE: using inherited socket fd=11, "127.0.0.1:9011"
[21-Mar-2013 16:21:08] NOTICE: fpm is running, pid 13506

I would really appreciate any tip as i don't know what else to look...

falko 23rd March 2013 18:33

Please check if the pool was created in the correct directory. For example, if you use PHP 5.3.22 for web40, there should be a pool called web40.conf in /opt/php-5.3.22/etc/pool.d/.

Lionheart82 24th March 2013 10:10

pool check
 
Quote:

Originally Posted by falko (Post 294570)
Please check if the pool was created in the correct directory. For example, if you use PHP 5.3.22 for web40, there should be a pool called web40.conf in /opt/php-5.3.22/etc/pool.d/.


Dear Falko, i have checked for the pool, it seems it is created successfully...

[web2]

listen = 127.0.0.1:9011
listen.allowed_clients = 127.0.0.1

user = web2
group = client2

pm = static
pm.max_children = 3
pm.max_requests = 100

chdir = /

php_admin_value[open_basedir] =

/var/www/clients/client2/web2/web:/var/www/clients/client2/web2/tmp:/var/www/mydomain.com/web:/srv/www/mydoma

in.com/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin
php_admin_value[session.save_path] = /var/www/clients/client2/web2/tmp
php_admin_value[upload_tmp_dir] = /var/www/clients/client2/web2/tmp

php_admin_flag[output_buffering] = Off
php_admin_value[upload_max_filesize] = 4M
php_admin_value[post_max_size] = 4M


The joomlas system info shows:

PHP Version 5.3.6
WebServer to PHP Interface [B]apache2handler[/B

Edit:
ps -ef | grep php-fpm shows (i stoped 4.12 for now)

root 6110 1 0 11:36 ? 00:00:00 php-fpm: master process (/opt/php-5.3.22/etc/php-fpm.conf)
apache 6111 6110 0 11:36 ? 00:00:00 php-fpm: pool www
apache 6113 6110 0 11:36 ? 00:00:00 php-fpm: pool www
web2 6114 6110 0 11:36 ? 00:00:00 php-fpm: pool web2
web2 6115 6110 0 11:36 ? 00:00:00 php-fpm: pool web2
web2 6116 6110 0 11:36 ? 00:00:00 php-fpm: pool web2
root 6215 1142 0 11:37 pts/1 00:00:00 grep php-fpm

Lionheart82 27th March 2013 11:23

27-03-2013 update
 
I think i have had some progress according to this tread. http://www.howtoforge.com/forums/showthread.php?t=61016

Right now the web site shows the page

The requested URL /php5-fcgi/index.php was not found on this server.

The error log shows the following line repeated.

[error] [client remoteip] File does not exist: /var/www/clients/client2/web2/cgi-bin/php5-fcgi-myip-80-domainname.com

I thing this file is created dynamically and then destroyed right?

and the sites enabled vhost has the following code

<IfModule mod_fastcgi.c>
<Directory /var/www/clients/client2/web2/cgi-bin>
Order allow,deny
Allow from all
</Directory>
AddHandler php5-fcgi .php
Action php5-fcgi /php5-fcgi
Alias /php5-fcgi /var/www/clients/client2/web2/cgi-bin/php5-fcgi-myip-80-domainname.com
FastCgiExternalServer /var/www/clients/client2/web2/cgi-bin/php5-fcgi-myip-80-domainname.com -host 127.0.0.1:9011 -pass-header

Authorization
</IfModule>

I am trying to solve this for days now.. any idea or help is appreciated :)

Later Today UPDATE:
WebServer to PHP Interfacefpm-fcgi YES :)

ok problem was after all
a) mod_fastcgi was not installed
b) /etc/httpd/conf.d/fastcgi.conf needs to have FastCgiWrapper Off (http://www.howtoforge.com/forums/showthread.php?t=58007)

I am happy :)


All times are GMT +2. The time now is 21:00.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.