• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

PHP Settings under domain

NicolasP.

Regular Pleskian
Hello everyone.

I am trying to change the default php settings under domain (upload_max_filesize & post_max_size) but nothing happens. I am running PHP 5.5 in FastCGI. I also changed it to Centos default PHP (5.4.16) but nothing happens again.
It only works when PHP runs as Apache module. The problem is on FastCGI Application.

My server: Centos 7, Plesk 12
Check the screenshot for installed components.

Thanks


phpinfo.jpg Plesk Installer.jpg
 
Last edited:
Please check directly in domain's php.ini file that these settings were really added.
 
Yes the actions are the same.
I found php.ini under /var/www/vhosts/system/DOMAINNAME/etc/php.ini.
As this file created automatically from plesk, I made no changes.
But the php values into the file don't change when I change the settings in "php settings" under plesk.
 
But if you add upload_max_filesize & post_max_size settings in Plesk UI - does it is reflected in /var/www/vhosts/system/DOMAINNAME/etc/php.ini ?
 
Try to enable debugging in panel.ini It should be like:

Code:
[log]
priority=7
show.util_exec_io = on

Then add parameters in Plesk UI and check related entries of phpinimng in panel.log. It should be something like this:

Code:
[2015-07-17 13:34:38] DEBUG [util_exec] [0469fb97bcb5226aa3f53cc6bb269900][0] Starting: phpinimng --virtual-host ppu12-0.demo.pp.plesk.ru --override /var/www/vhosts/system/ppu12-0.demo.pp.plesk.ru/conf/php.ini --type cgi --global-config /opt/plesk/php/5.6/etc/php.ini, stdin: 
;
; This is an automatically generated PHP configuration file
; for 'ppu12-0.demo.pp.plesk.ru'.
;

[PHP]
; General settings
open_basedir = "/var/www/vhosts/ppu12-0.demo.pp.plesk.ru/:/tmp/"
; Performance settings
post_max_size = 254M
upload_max_filesize = 33M
; Additional directives


[2015-07-17 13:34:38] DEBUG [util_exec] [0469fb97bcb5226aa3f53cc6bb269900][0] Finished in 0.05536s, Error code: 0, stdout: , stderr:
 
Looks like you are using our PHP package for this domain, if yes, you should modify php.ini that located in another folder. Just list all available PHP handlers and you will see correct php.ini file for your PHP version:

# /usr/local/psa/admin/bin/php_handlers_control --list

It should be somewhere in /opt/plesk/php/5.4/etc/php.ini if it is Odin package.

Try this one.
 
Try to enable debugging in panel.ini It should be like:

Code:
[log]
priority=7
show.util_exec_io = on

Then add parameters in Plesk UI and check related entries of phpinimng in panel.log. It should be something like this:

Code:
[2015-07-17 13:34:38] DEBUG [util_exec] [0469fb97bcb5226aa3f53cc6bb269900][0] Starting: phpinimng --virtual-host ppu12-0.demo.pp.plesk.ru --override /var/www/vhosts/system/ppu12-0.demo.pp.plesk.ru/conf/php.ini --type cgi --global-config /opt/plesk/php/5.6/etc/php.ini, stdin:
;
; This is an automatically generated PHP configuration file
; for 'ppu12-0.demo.pp.plesk.ru'.
;

[PHP]
; General settings
open_basedir = "/var/www/vhosts/ppu12-0.demo.pp.plesk.ru/:/tmp/"
; Performance settings
post_max_size = 254M
upload_max_filesize = 33M
; Additional directives


[2015-07-17 13:34:38] DEBUG [util_exec] [0469fb97bcb5226aa3f53cc6bb269900][0] Finished in 0.05536s, Error code: 0, stdout: , stderr:

I am getting this in panel.log

Code:
[2015-07-18 03:10:22] DEBUG [util_exec] [0cd646870b00f9fced2032e430272e5c][0] Starting: phpinimng --virtual-host citypoint.terrahosting.gr --override /var/www/vhosts/system/citypoint.terrahosting.gr/conf/php.ini --type cgi --global-config /etc/php.ini, stdin: ;
; This is an automatically generated PHP configuration file
; for 'citypoint.terrahosting.gr'.
;

[PHP]
; General settings
open_basedir = "/var/www/vhosts/terrahosting.gr/:/tmp/"
; Performance settings
post_max_size = 16M
upload_max_filesize = 8M
; Additional directives

I am using PHP 5.5
(Igor check your PM)​
 
Last edited:
No errors in panel.log and now I see bigger values of these parameters in domain's phpinfo output. Is it ok for you?
 
@Nicholasp,

Earlier, you stated

I just create php.ini under httpdocs (no permissions in etc folder) but nothing happens again

and you should not do that.

Furthermore, in order to check which php.ini file is used, run: php --ini (from the command line).

However, do not adjust the php.ini files manually.

Also, you stated earlier

There is no php.ini under httpdocs or etc folder.

and that is normal, the php.ini will be created and changed if you change the settings via Plesk UI, under "PHP Settings".

Note that changing the settings for <domain>.<tld> will also (automatically) apply the settings to (all) <subdomain>.<domain>.<tld>, with the possibility to use different settings in all the <subdomain>.<domain>.<tld>, but that requires a separate setup at the subdomain level, under "PHP Settings" of the subdomain.

By the way, you created a php.ini and part of the problems encountered can be due to the php.ini file creation, so remove that file (if still present) and set "PHP Settings".

Finally, with respect to (alleged) issue on hand (as represented in the first post), you should be aware of the facts that

a) a run of the web-based "installation of components" (i.e. your lower screenshot) can be taking a considerate amount of time,

b) a run of the web-based "installation of components", simultaneous with the (plesk) autoinstaller from the command line, can result in various errors,

c) most important, a check of default php settings (i.e. your first screenshot) provides results from the default php.ini (that can be found with the command "php --ini") and not the results of the php.ini files under /var/www/vhosts/system/<domain> (which php.ini files can be set by changing values in the Plesk UI, under "PHP Settings").

In short, it seems to be the case that nothing was wrong with your PHP setup.

Note that the above can imply that your customizations of PHP settings (if any still reside) can cause new problems (not related to PHP setup, but to customization).

If you encounter any problems, just let me know, by sending a mail (i.e. starting a personal conversation).

Kind regards.....
 
No errors in panel.log and now I see bigger values of these parameters in domain's phpinfo output. Is it ok for you?

No it doesn't work. I just edit php.ini manually in order to finish my job.

I am going to reinstall my server. So everything will work fine after that
 
Last edited:
@Nicholasp,

Manually editing the default php.ini, that can be found by running the command "php --ini", has no use, since this file is overridden by php.ini files in /var/www/vhosts/system/<domain>.

Again, do not adjust the php.ini files manually.

None of the php.ini files, since every update and/or change in the Plesk UI will undo any manual change.

Re-installation of your (entire) server is not required, just use the (command line) autoinstaller to remove /re-install PHP (that is, the PHP version giving issues).

Note that some cleanup of (only) files (!) will also suffice, I personally doubt that re-installing PHP is required.

Kind regards....
 
I do not know what's happening.
I have 19 domains in Plesk (all with same problem). I thought that the problem was the server. I order a NEW server in hosting company. I test it before migrate the whole server. All worked fine. PHP settings changed through Plesk UI.
After migration all the domains has the same problem again. What the f***k?

I create then a new test subscription. And PHP settings works. So what is the problem with other subcriptions? Is there any command to reset the plesk settings?

Please help.....

/// And finally i found this (I don't know if that is the problem) in Webserver Configurations Troubleshooter.

The test domain is "test123.gr" and one of the domains I migrate is "terrahosting.gr"
See screenshot

In "terrahosting.gr" only httpd.conf and nginx.conf
and in "test123.gr" (i created after migration) httpd.conf,httpd_ip_default.conf,nginx.conf and nginx_ip_default.conf

I rebuild all but nothing changed.
 

Attachments

  • Troubleshooter.jpg
    Troubleshooter.jpg
    113.8 KB · Views: 5
Last edited:
@Nicholasp,

Manually editing the default php.ini, that can be found by running the command "php --ini", has no use, since this file is overridden by php.ini files in /var/www/vhosts/system/<domain>.

Again, do not adjust the php.ini files manually.

None of the php.ini files, since every update and/or change in the Plesk UI will undo any manual change.

Re-installation of your (entire) server is not required, just use the (command line) autoinstaller to remove /re-install PHP (that is, the PHP version giving issues).

Note that some cleanup of (only) files (!) will also suffice, I personally doubt that re-installing PHP is required.

Kind regards....

I reinstall PHP but the problem still remains.
 
@Nicholasp,

I order a NEW server in hosting company. I test it before migrate the whole server. All worked fine. PHP settings changed through Plesk UI. After migration all the domains has the same problem again. What the f***k?

This is very likely due to the fact that you migrate old, buggy PHP settings to the new server.

However, it is not certain that the errors are related to PHP settings, I personally have the idea that file corruption is present (for instance, as a result of customizations).

Note that the httpd_ip_default.conf and nginx_ip_default.conf can and should be removed.

Furthermore, check file ownership and file permissions, that can be an explanation.

Keep me updated.....
 
Thank you all for your help!
As you can't find the solution, I made this..... and it worked.


Whole server Backup or only the subscription that you want to restore
Delete Subscription (ex. domain.com)
Add New Subscription (domain.com) from the customer's page.
Delete all files that Plesk creates
Restore "File of domains" and choose "httpdocs"
Restore "Database" and "Mail Accounts"

That's all. But I need to do this for every subscription.
 
Back
Top