• 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

PHP custom settings does not apply.

RobD1982

Basic Pleskian
Ubuntu 12.04
Upgraded Plesk from 11.5 to 12.0.18 from panel.
I have installed PHP 5.3.29 (make from sources)
All smooth, added handler:
Code:
/usr/local/psa/bin/php_handler --add -displayname 5.3.29 -path /usr/local/php5329/bin/php-cgi -phpini /usr/local/php5329/etc/php.ini -type fastcgi -id php5329

App work ok after change to new php with hosting settings(change php handler Fast Cgi)

But php info shows that: Loaded Configuration File is /etc/php5/cgi/php.ini
This is not good as I checked should be for certain vhost cutsom php ini which is generated by PHP settings.
For example I changed in Plesk memory_limit to 333MB applied changes panel show successully, but still there is 128MB default value in phpinfo().

Am I missing sth ? Is there additional task needed expect adding handler? Or is there a known bug?

ps. after change handler back to 5.3.10, (default installation) there also custom PHP settings file seems not to be processed.
I did not tested earlier maybe upgrade Plesk to v12 broked sth?
Any advice what should I check?
I have tried to delete (and let psa recreate) php.ini from vhost/system/mydomain.com/ but also did not helped


Please help.
 
Last edited:
First, I would investigate, if all php-handler are listed:

/usr/local/psa/bin/php_handler --list

Second, I would check, if you installed the additional PHP - version regarding to this KB - article:


Afterwards, make sure that you created the custom conf's and php.ini's for the desired domains with the command ( if not already automatically done by Plesk, after choosing the custom PHP-handler at your domain hosting settings )

/usr/local/psa/admin/sbin/httpdmng --reconfigure-all
or
/usr/local/psa/admin/sbin/httpdmng --reconfigure-domain <domain>


Your custom php.ini - settings for a domain should be changed in your domain hosting settings, due to the fact that Plesk may overwrite standard files with any update/upgrade, but will leave custom configurations untouched. These custom php.ini's can as well be found at "/var/www/vhosts/system/YOURDOMAIN_OR_YOURCOMPLETESUBDOMAIN.COM/etc/"
 
Last edited by a moderator:
Your custom php.ini - settings for a domain should be changed in your domain hosting settings, due to the fact that Plesk may overwrite standard files with any update/upgrade, but will leave custom configurations untouched. These custom php.ini's can as well be found at "/var/www/vhosts/system/YOURDOMAIN_OR_YOURCOMPLETESUBDOMAIN.COM/etc/"


As I mentioned in first post, my php app on new PHP installation runs ok, I have added to handler etc, changed in plesk as well to new php
File php.ini under /var/www/vhosts/system/MYDOMAIN/etc is also changed every time I change PHP settings with plesk settings.

Problem is that this custom plesk generated config /var/www/vhosts/system/MYDOMAIN/etc/php.ini IT IS NOT LOADED as phpinfo shows
"Loaded Configuration File /etc/php5/cgi/php.ini"
 
Are the additional configurations from "/etc/php5/fpm/pool.d/" loaded within the FASTCGI - config at : /etc/php5/fpm/php-fpm.conf
( the correct include would look like this: "include=/etc/php5/fpm/pool.d/*.conf" )

Is the addtional configuration for FASTCGI for the specific domain listed in /etc/php5/fpm/pool.d/ ?

Is the path to your PHP 5.3.29 installation included in your open_basedir?
( i.e.: php_value[open_basedir] = "/var/www/vhosts/YOURDOMAIN.COM/:/tmp/:/usr/bin:/bin:/usr/share/php:/usr/share/php5:/usr/local/php5329" )
 
I don't have mentioned folders at all /etc/php5/fpm/ or /etc/php5/fpm/
OS: Ubuntu 12.04.5
Plesk version: 12.0.18 Update #17 , (updated from v11.5)

As for open_basdir php5329 installation I haven't got specified this value, but now changed that in main php.ini, value has changed(checked php info)
But still custom Plesk PHP settings from /var/www/vhosts/system/MYDOMAIN/etc/php.ini seems to be not loaded.
 
I'm pretty unsure about your modifications and edits here and there, expecially when it comes to the point, that editing your "main" php.ini at "/etc/apache2/php.ini" will be overwritten by Plesk, if you either change any website hosting settings, or if Plesk has an update/upgrade. You may definetly do any changes, you would like to, but I would recommend the ways, that Parallels suggests in the documentations or in KB - articles. You broke something with your installation, de-installation and re-installation...., but I can't figure out on the first and second view what it is.

For now, I would suggest to investigate your logs and configurations ( Parallels Plesk Panel for Linux services logs and configuration files ( KB: 111283 ) ) and set them back to the standards again and I even would suggest to run "/usr/local/psa/admin/bin/autoinstaller --select-product-id plesk --select-release-current --reinstall-patch --install-component base", just to be sure, that no needed extension from Plesk is missing and the latest patches are installed without errors.

You might as well open a support - ticket ( Parallels - Support ), if you think, that your way should be right and think that Parallels should fix the problems/issues.
 
I did not make any own modifications expect install new PHP in separate folder
By "main" php.ini I mean main for new php installation folder: /usr/local/php5329/etc/php.ini

Running this:
"/usr/local/psa/admin/bin/autoinstaller --select-product-id plesk --select-release-current --reinstall-patch --install-component base"
 
Last edited:
'./configure' '--with-mcrypt' '--enable-mbstring' '--with-openssl' '--with-mysql' '--with-mysql-sock' '--with-gd' '--with-jpeg-dir=/usr/lib' '--enable-gd-native-ttf' '--with-pdo-mysql' '--with-libxml-dir=/usr/lib' '--with-curl' '--enable-zip' '--enable-sockets' '--with-zlib' '--enable-exif' '--enable-ftp' '--with-iconv' '--with-gettext' '--enable-gd-native-ttf' '--with-t1lib=/usr' '--with-freetype-dir=/usr' '--prefix=/usr/local/php5329' '--with-config-file-path=/usr/local/php5329/etc' '--with-mysqli' '--with-pdo-mysql' '--with-pcre-regex' '--with-snmp' '--with-xmlrpc' '--with-xsl' '--without-gdbm'

this is my php configure options, can you take a look?
Maybe something is wrong there with php build parameters and plesk config file is simply ignored by psa ?
 
Last edited:
missing is : '--enable-fastcgi' ... and a lot of other suggested options....

'--enable-fastcgi' is uknown build option for configure php 5.3.29.
What other suggested options you mean ?

Is there a reason, why you would like to compile without some suggested things and go away from the suggested paths from the KB - article 118378 ( How to enable multiple PHP Versions in Parallels Plesk 11.5 and Plesk Automation 11.5 on Linux ) ?

Yes, first one that it does not work on Ubuntu 12.04(copied commands line by line)
Second reason that I need to install 5.3.29 not 5.4.0
 
missing is : '--enable-fastcgi' ... and a lot of other suggested options....

--enable-fastcgi is unknown option for configure php 5.3.29
What other suggested options important you mean?

Is there a reason, why you would like to compile without some suggested things and go away from the suggested paths from the KB - article 118378 ( How to enable multiple PHP Versions in Parallels Plesk 11.5 and Plesk Automation 11.5 on Linux ) ?

Yes I need 5.3.29, tried that from link to install this 5.4 for test but does not install errors are configure time, looks like it's not proper for Ubuntu.
 
PHP 5.3.29 is backported from PHP 5.4 and PHP 5.5 ... just for your notice. ^^

Could you please include some failure notices from logs, or installation reports, so that it is easier to find some ways to help you? A sentence like "doesn't work" or "I had errors" is just too inaccurate for further suggestions.

If you don't have any compiling options to use "--enable-fastcgi" you must handle this in another way. You might choose PHP5-FPM/PHP-FPM, because multiple PHP - versions are only possible over FASTCGI, like you may have read in the KB - article from Parallels. You find this extension in the "Web hosting features", when you visit: https://YOURSERVERDOMAIN.COM:8443/admin/update/add-components/ . I would recommend to install all nginx - components as well, because some websites are served much faster - and you may choose in your domain webhosting settings, whether nginx should handle requests, or not for the specific domain. Please let us know, when you need further assistance.
 
fastcgi is enabled by default AFAIK, this option name is no longer used anyway in 5.3.29 but --enable-cgi, --disable-cgi
It works finally! Worse that I don't know what was wrong. Solution was - Reboot Ubuntu, for some unknown reason configs were not loaded. It's too hard to investigate now why...I guess your advices reconfigure etc would also help so Thank you for patience.


About your suggestion with Nginx, I have installed with plesk and enabled service, but then cannot change to newly installed php from default 5.3.10 have only that on the list.

How to use new installed PHP by Nginx as FPM ? Or with FastCGI ?
In panel PHP version there is only 5.3.10 default on other on the list.

Can you provide me more info/links about benefits, example configurations and basic KNOW HOW about apache/nginx with plesk together as reverse proxy? I guess the biggest benefit is less memory usage, since it's not so much faster than Apache.

Please give me some more useful info about that combination and how Plesk panel can be helpful with Nginx configuration.
Thanks
 
Last edited:
You find a lot of "nginx" solutions, hints and suggestions, when you use the SEARCH - page from the forum. If you just want to get some basic informations about nginx, you might want to visit wiki.nginx.org, the wiki from the nginx community - there are as well sample configurations for a lot of applications and different server configurations.
 
Back
Top