• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved Changing PHP to any version using FPM fails with error

dieselpower44

Basic Pleskian
Hi,

I cannot seem to change PHP to use FPM. On a fresh domain I change the setting in PHP Settings to 7.1.14 (same with 7.0.27) and run php as "FPM application served by nginx" and I instantly receive the following error:

Error: phpinimng failed: Unable to update the config file for 'fpm' service due to syntax errors.

I have searched all Onyx support articles for this error but none seem to be exactly the same problem.

Any ideas what's going on or how to reset this file that has syntax errors. Is it referring to a php.ini somewhere?

Running latest Onyx with all updates applied.

Thanks

edit1:

Oddly, if I select any PHP (as FastCGI apache) version (other than 5.4.45 by Vendor OS or Atomic versions) and click the "view phpinfo() page" I get the following error:

Error: Unable to retrieve information about the PHP configuration.

Seems Plesk-installed PHPs are somehow misconfigured?
 
Last edited:
Hi Igor,

I'm afraid not. The files/directories mentioned in that article do not appear to exist. Also 'systemctl' command isn't available.
I realized 'systemctl' was CentOS7 and equivalent on 6 was 'service', so tried to restart php-fpm and received the errors:
Stopping php-fpm: [FAILED]
Starting php-fpm:
[08-Feb-2018 23:42:59] ERROR: No pool defined. at least one pool section must be specified in config file
[08-Feb-2018 23:42:59] ERROR: failed to post process the configuration
[08-Feb-2018 23:42:59] ERROR: FPM initialization failed
Because no websites are assigned the FPM handler... but I can't set any sites to use it because of the original 'phpinimng' error when trying to do so.

Because this happens on all domains and even when I create a fresh one (and run PHP as FPM or fastCGI option), is it possible that some of the default configuration files (apache, php.ini, etc.) are somehow mangled? If so, is there a way to completely reset them to default?

Pretty sure it must be an issue with apache config or php.ini somewhere since they are usually the culprits when the PHP code is valid and yet you get the standard apache Internal Server error.

I would ideally like to leave other websites untouched and just check the default ones.

Any ideas?

Thanks
 
Last edited:
Have you tried to rebuild webserver configs with

# plesk repair web

?
 
Hi,

I have a similar issue on my Onyx 17.5.3 server.

I had the same error message :
Code:
WARNING: Nothing matches the include pattern '/opt/plesk/php/5.4/etc/php-fpm.d/*.conf' from /opt/plesk/php/5.4/etc/php-fpm.conf at line 119.
ERROR: No pool defined. at least one pool section must be specified in config file
ERROR: failed to post process the configuration
ERROR: FPM initialization failed

and this too:
Code:
Error: Unable to retrieve information about the PHP configuration.

I couldn't start the service, it failed because I don't have any .conf file for the domain in php-fpm.d directory.
I tried to clean yum and reinstall plesk components.
When I set the handler to apache the file is created and I can start the fpm service. When I set it to FCGI app, this file disappear.
I'm a newbie in plesk web server config. Now fpm is started on my server with apache, but I don't have PHP-FPM app in the handler selector? Is that a misconfiguration? Is there something I don't understand ?
 
Sorry Nicolas, I didn't receive notification of your follow-up post.

Yes, I have it visible under Nginx options.

Did you get any further with this? I am still unable to use any of the native Plesk PHP versions at all.
 
Turning off opcache.enable per domain seems to get PHP versions working when running as FastCGI Apache module but when trying to change to FPM, I get:

phpinimng failed: Unable to update the config file for 'fpm' service due to syntax errors.
 
So the PHP settings in each domain allow me to select FPM (with the above error, obviously) but it seems to save. However, trying to start PHP FPM from Services results in this memory error:

Unable to start service: Unable to manage service by phpinimng: ('start', 'plesk-php72-fpm'). Error: Wed Mar 21 17:55:59 2018 (5739): Fatal Error Unable to allocate shared memory segment of 134217728 bytes: mmap: Cannot allocate memory (12) Failed to start plesk-php72-fpm service

Perhaps the resident geniuses Igor or UFHH01 have further ideas?
 
Glad you sorted your issue!

I have checked all the various stuff related to the individual handlers and unfortunately had no success.

However, I discovered what may be the issue (and may me helpful to others).

The issue appears to be that opcache cannot allocate memory for some reason. It looks like possibly a misconfiguration with memory blocks at the virtual container level; something my hosting provider will need to check.

Disabling opcache on each handler solves the issue entirely and allows them to run as FPM just fine.

If my host agrees this is the issue, I’ll post back here (again, mainly for the benefit of others coming across this thread).

Cheers!
 
Well, it's not good news. My VPS host has come back to say that opcache is not supported on their type of virtual containers due to the amount of memory it requires.

A little disappointing but at least I finally know what the problem was.
 
Back
Top