Author Topic: CWP linking to wrong directory for php.ini when changing to php-FPM  (Read 7359 times)

0 Members and 1 Guest are viewing this topic.

Offline
**
Hi guys,

I had not realised this before however, on my server:

If i change to php-fpm,

Dashboard>PHP settings>PHP Simple Editor/PHP.ini configuration are both incorrectly still displaying and using /usr/local/php/php.ini


If i add info.php file into one of the usr/public_html directories and run the file in the web browser, the following is the correct location for php.ini

 /opt/alt/php-fpm73/usr/php/php.ini

So in order to edit the correct php.ini file, one has to access it via Dashboard>PHP Settings>PHP Seclector> PHP-FPM x.x >Edit php.ini

I just spent an hour trying to figure out what the hell was going on on a wordpress website because of this bug in my system.

Is there a way of manually fixing this in CWP so that PHP Simple Editor, and PHP.ini Configuration both point at the correct FPM directory?

Offline
**
Re: CWP linking to wrong directory for php.ini when changing to php-FPM
« Reply #1 on: June 07, 2019, 09:23:32 PM »
CWP support both php-cgi and php-fpm.
Depending on which you are using for you site, you edit its php.ini accordingly.

php-cgi and php-fpm are two separate configurations and cannot be linked together.

All php-fpm are installed into /opt/alt folder

Offline
**
Re: CWP linking to wrong directory for php.ini when changing to php-FPM
« Reply #2 on: June 07, 2019, 10:13:07 PM »
perhaps it would be nice if that was actually mentioned somewhere in the docs.

What i read in the docs is that if i choose "force php-fpm" then the selector for fcgi wont be in use anymore...that is highly ambigious because it doesnt actually disable the menu (which is what should happen). So if one inadvertanly attempts to make changes to the old php.ini directory, one has no warning from cwp that it is not using this directory.

That is not good practise at all. If Force FPM is selected, CWP should automatically disable and warn user for fcgi functions...including menus related to it.

Offline
**
Re: CWP linking to wrong directory for php.ini when changing to php-FPM
« Reply #3 on: June 13, 2019, 07:19:06 PM »
Ok thanks. Thats a nice observation. CWP developers will be notified about this.

Thanks once again :)