Sponsor:

Server and Web Integrator
Link:
Kloxo-MR logo
6.5.0 or 7.0.0
Click for "How to install"
Donation/Sponsorship:
Kloxo-MR is open-source.
Donate and or Sponsorship always welcome.
Click to:
Click Here
Please login or register. 2024-04-19, 04:14:29

Author Topic: php-fpm problem  (Read 4693 times)

0 Members and 1 Guest are viewing this topic.

Offline xamer

  • Valuable Member
  • *
  • Posts: 61
  • Karma: +0/-0
    • View Profile
php-fpm problem
« on: 2016-07-01, 18:27:09 »
the problem was in all last kloxoMR7 from Kloxo-MR 7.0.0.b-2016062202 to Kloxo-MR 7.0.0.b-2016063002.

Something happens to php-fpm and needed manual restart with sh /script/restart-php-fpm
It happens when I create new domain, changing owner user or just visiting Webserver Config page without any action there.
I investigate that problem is that php can't use any class in php scripts of all of my sites. It gives 500 error at the page of the web browser.
I create simple script to test:
Code: [Select]
$m = new Memcache;
if ($m->pconnect('127.0.0.1', 11211)) { echo 'memcached'; } else { echo 'none'; }
when i hit this script everithing is fine, it gives me "memcached".
Then I visit the Webserver Config page in control Panel and in several seconds it gives 500 internal server error at the testing php script(Fatal error: Class 'Memcache' not found in...). I restart with sh /script/restart-php-fpm and everything is fine again. I notice that Kloxo CP always works fine at that problem moments. It touches only clients sites.

Can someone help me to solve this problem?

I use PHP Branch  php5.3.29, Nginx+php-fpm.
« Last Edit: 2016-07-01, 19:50:35 by xamer »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: php-fpm problem
« Reply #1 on: 2016-07-01, 18:50:40 »
Try using 'php53m' or 'php54m' in 'php used'.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline xamer

  • Valuable Member
  • *
  • Posts: 61
  • Karma: +0/-0
    • View Profile
Re: php-fpm problem
« Reply #2 on: 2016-07-01, 19:07:59 »
php used is empty. Should i install 'Multiple PHP Install' them and choose?
 I use PHP Used -> --PHP Branch --
And PHP Branch -> php53u_(as_5.3.29)
« Last Edit: 2016-07-01, 19:43:34 by xamer »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: php-fpm problem
« Reply #3 on: 2016-07-01, 20:05:11 »
Yes, need installed all phpm. Better change back 'php branch' to 'php54'.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline xamer

  • Valuable Member
  • *
  • Posts: 61
  • Karma: +0/-0
    • View Profile
Re: php-fpm problem
« Reply #4 on: 2016-07-01, 20:42:53 »
I have php branch -> php53u_(as_5.3.29) and PHP Used -> --PHP Branch -- from the beginning, because this configuration works fine in another VPS, and it is Kloxo-MR 7.0.0.b-2015121102 there. I'm afraid to change good configuration/

I install all phpm. PHP Used -> php54m and PHP Branch - > php5.4.45 and now this 500 error always there. Restart doesn't help. While restart there is error:"Starting php53m-fpm (Multiple Php): [01-Jul-2016 21:59:28] ERROR: An another FPM instance seems to already listen on /opt/configs/php-fpm/sock/php53m-apache.sock
[01-Jul-2016 21:59:28] ERROR: FPM initialization failed"
Fatal error: Class 'Memcache' not found in...

Offline xamer

  • Valuable Member
  • *
  • Posts: 61
  • Karma: +0/-0
    • View Profile
Re: php-fpm problem
« Reply #5 on: 2016-07-01, 21:23:56 »
Now nothing helps to start site, always 500 error any PHP Used or PHP Branch.

P.s. Is ot possible to install earlier version, such as Kloxo-MR 7.0.0.b-2015121102 or kloxomr7-7.0.0.b-2015011402.mr?

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: php-fpm problem
« Reply #6 on: 2016-07-02, 00:04:29 »
Try 'pkill -9 php-fpm; sh /script/restart-all -y'. Yes, sometimes, change php branch will be 'An another FPM instance seems to already listen...'.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline xamer

  • Valuable Member
  • *
  • Posts: 61
  • Karma: +0/-0
    • View Profile
Re: php-fpm problem
« Reply #7 on: 2016-07-02, 00:31:37 »
I installed Kloxo again.
It is problem with 5.3.29, 5.4.45 works good, but i need 5.3, becouse it is an old forum that generates many errors.

Also I tried php_5.3.3 and it gives the same as 5.3.29 result with 500 error, that doesn't find classes. If I don't do anything in kloxo cp panel site goes right, but at 6 o'clock in the morning it goes wrong . Probably kloxo does some  background work, and i have to restart php-fpm.

Is there any solution to make php5.3 to work?

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: php-fpm problem
« Reply #8 on: 2016-07-02, 04:14:15 »
Use 'php53m' instead 'php branch' of 'php 5.3.29' in 'php used'.

Inform here the error message when using php other then 5.3.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline xamer

  • Valuable Member
  • *
  • Posts: 61
  • Karma: +0/-0
    • View Profile
Re: php-fpm problem
« Reply #9 on: 2016-07-02, 09:19:24 »
I tried any php version as php branch, it didn't help. And i had to reinstall Kloxo MR

When site goes wrongwith php5.3, php error log says
PHP Warning:  PHP Startup: bcmath: Unable to initialize module
Module compiled with module API=20100525
PHP    compiled with module API=20090626
These options need to match
 in Unknown on line 0
[02-Jul-2016 03:57:55] PHP Warning:  PHP Startup: Unable to load dynamic library '/opt/php54s/usr/lib/php/modules/curl.so' - /opt/php54s/usr/lib/php/modules/curl.so: undefined symbol: php_output_write in Unknown on line 0
and etc with all dynamic libraries

I restart php-fpm and everything goes right until next morning or visiting Webserver Config page and then that kind of errors appears.
That's very interesting why))

php2.17 couldn't install, previous version of php stays installed anyway.

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: php-fpm problem
« Reply #10 on: 2016-07-02, 10:35:32 »
As I said before, don't change 'php branch' (from php 5.4 to other) but choose 'phpXYm' (change XY to version number) in 'php used'.

Change php version in 'php branch' lower than 5.4 may make trouble.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline xamer

  • Valuable Member
  • *
  • Posts: 61
  • Karma: +0/-0
    • View Profile
Re: php-fpm problem
« Reply #11 on: 2016-07-03, 11:07:25 »
When site runs well php loads libs from extension_dir=/usr/lib64/php/modules, but when it goes wrong, for example, I visit Webserver Config page, php tries to load libs from /opt/php54s/usr/lib/php/modules and cause the problem.
After php-fpm reastart php loads libs from /usr/lib64/php/modules and sites goes well.
As it wrote earlier this problem also appears after creating new domain, changing user owner.
Is it ok?
« Last Edit: 2016-07-03, 11:37:31 by xamer »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: php-fpm problem
« Reply #12 on: 2016-07-03, 14:53:28 »
I didn't found this issue in my servers. Use latest version of Kloxo-MR 7.0.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline xamer

  • Valuable Member
  • *
  • Posts: 61
  • Karma: +0/-0
    • View Profile
Re: php-fpm problem
« Reply #13 on: 2016-07-03, 18:21:40 »
I use Kloxo-MR 7.0.0.b-2016070204

I found out this issue from Kloxo-MR 7.0.0.b-2016062202. Also I install several times fresh KloxoMR from 22.06.2016.
Now I add cron task restarting php-fpm every hour, but I hope there is a solution to fix this issue

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: php-fpm problem
« Reply #14 on: 2016-07-03, 18:38:26 »
Update to 20160304. Change php.ini for php-fpm for related to disable_functions issue.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

 


MRatWork Affiliates:    BIGRAF(R) Inc.    House of LMAR    EFARgrafix
Click Here

Page created in 0.082 seconds with 21 queries.

web stats analysis