domain.com/info.php not reflecting settings in Virtualmin>Services>PHP-FPM Configuration

8 posts / 0 new
Last post
#1 Tue, 11/05/2019 - 14:48
adamjedgar

domain.com/info.php not reflecting settings in Virtualmin>Services>PHP-FPM Configuration

Virtualmin>Server Configuration>website Options

Run CGI scripts as domain owner? Yes  No
PHP script execution mode
CGI wrapper (run as virtual server owner)
FCGId (run as virtual server owner)
FPM (run as virtual server owner)
PHP FCGId sub-processes None   
20
Maximum PHP script run time Unlimited   
180
seconds


virtualmin>Virtual Server>Services>PHP-FPM configuration

[157298130131546]
user = wordpress
group = wordpress
listen = 8012
pm = ondemand
pm.max_children = 20
pm.start_servers = 1
pm.min_spare_servers = 1
pm.max_spare_servers = 5
php_admin_value[upload_tmp_dir] = /home/wordpress/tmp
php_admin_value[session.save_path] = /home/wordpress/tmp
php_value[memory_limit] = 16M
php_value[session.save_path] = /home/wordpress/tmp
php_value[max_execution_time] = 180
php_admin_value[upload_max_filesize] = 32M
php_admin_value[post_max_size] = 32M


domain.com/phpinfo.php

System Linux host.domain.com.au 4.9.0-11-amd64 #1 SMP Debian 4.9.189-3+deb9u1 (2019-09-20) x86_64
Build Date Oct 26 2019 14:18:28
Server API FPM/FastCGI
Virtual Directory Support disabled
Configuration File (php.ini) Path /etc/php/7.3/fpm
Loaded Configuration File /etc/php/7.3/fpm/php.ini
Scan this dir for additional .ini files /etc/php/7.3/fpm/conf.d


*Note two values for each represent "Local Value" and "Master Value"

max_execution_time 180 180
max_file_uploads 20 20
max_input_nesting_level 64 64
max_input_time 60 60
max_input_vars 1000 1000
memory_limit 4M 4M


Wordpress keeps throwing "exceeded max file upload size" error (file is only 7.12MB). Why are the above not lining up with each other for this virtual server? What am i missing here?

Tue, 11/05/2019 - 20:30
adamjedgar

also, take a look at what wordpress says the php settings are...

WP Version: [?] 5.2.4
PHP Memory Limit: [?] 256 MB

Server Environment
Server Info: [?] Apache/2.4.25
PHP Version: [?] 7.3.11-1+0~20191026.48+debian9~1.gbpf71ca0
PHP Post Max Size: [?] 8 MB
PHP Time Limit: [?] 180
PHP Max Input Vars: [?]
1000 - Recommended Value: 1500.
ZipArchive: [?] ✔
MySQL Version: [?] 5.5.5
Max Upload Size: [?] 2 MB
DOMDocument: [?] ✔
WP Remote Get: [?] ✔
WP Remote Post: [?] ✔

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

https://ajecreative.com.au

Tue, 11/05/2019 - 20:32
adamjedgar

Is there an explanation for this?

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

https://ajecreative.com.au

Wed, 11/06/2019 - 10:13
dimitrist

plz post apache config, and /home/user/php.ini.. could also be something server related.. wordpress report is usually more correct..

about some settings : memory_limit = 4M / 16M ???? can wordpress run with just 4M or 16M ? better set it to 128M as a min, IMHO... also these : pm.start_servers = 1 pm.min_spare_servers = 1 pm.max_spare_servers = 5 have no effect with ondemand manager...

Wed, 11/06/2019 - 15:12
adamjedgar

i dont have a local user account php.ini file.

In terms of the memory allocation, this is a new virtual server so I havent altered the virtualmin template or account plan yet. Having said that, wordpress runs just fine with the settings i have given it for now because if you look at my second post, you will notice that Wordpress actually has 256MB memory...not 4MB or 8MB as Virtualmin is indicating (and this is my entire point...Virtualmin hasnt a clue what is going on for some reason).

what i also cannot understand is how the wordpress system stats do not agree with phpinfo.php? I have also checked /user/etc/php7.3/php.ini and settings are

System 7.3.11-1+0~20191026.48+debian9~1.gbpf71ca0
memory_limit = 256M
Post_Max_Size = 32M
Upload_Max_Filesize = 32M

Now look again at what the Wordpress system status itself says settings are

PHP Version: [?] 7.3.11-1+0~20191026.48+debian9~1.gbpf71ca0
PHP Memory Limit: [?] 256 MB
PHP Post Max Size: [?] 8 MB
Max Upload Size: [?] 2 MB

How is this even possible?

For some reason, the user settings i am applying through Virtualmin are not being utilised...the system is overriding user settings in virtualmin. Something wrong here, surely that is not supposed to happen? (what is the point of having the ability to administer this in Virtualmin if the system is not even taking any notice of it? I suspect there is a virtualmin issue here...perhaps even a bug that needs fixing. I think i may need to put in a bug report unless Joe or erik can figure out why my install is doing this?

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

https://ajecreative.com.au

Wed, 11/06/2019 - 15:32
Dibs

Could it be a case of the php settings are the hard limits - i.e. the max. And within that there are the Wordpress settings which should be less (but if they were more - couldn't exceed the php limits)?

Wed, 11/06/2019 - 17:07
adamjedgar

I am not sure...take a look at what the php-fpm settings are...

Edit Configuration Manually
/etc/php/7.3/fpm/pool.d/157298130131546.conf


[157298130131546]
user = wordpress
group = wordpress
listen = 8012
pm = ondemand
pm.max_children = 20
pm.start_servers = 1
pm.min_spare_servers = 1
pm.max_spare_servers = 5
php_admin_value[upload_tmp_dir] = /home/wordpress/tmp
php_admin_value[session.save_path] = /home/wordpress/tmp
php_value[memory_limit] = 16M
php_value[session.save_path] = /home/wordpress/tmp
php_value[max_execution_time] = 180
php_admin_value[upload_max_filesize] = 32M
php_admin_value[post_max_size] = 32M

what i am not understanding is this...why is the webserver not applying the above settings assigned in virtualmin>Services>PHP_FPM Configuration for the Virtualmin Virtual Server?

surely this is something wrong with Virtualmin coding as these settings are supposed to be the ones that are used by this account? (Otherwise why even have the option to configure this in virtualmin in the first place??)

Perhaps you guys can do a test for yourself...go into your system and set different php.ini settings for the above control panel areas and see which one your system applies to public_html. It should be the one assigned in Virtualmin>Services>PHP-FPM Configuration, but in my case its not doing that!

What i suspect is the problem is that in virtualmin, we still have to manually restart php-fpm 7.3 (in my case)? Perhaps an inclusion could be that this automatically happens if one uses virtualmin gui to makes changes to defaults?

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

https://ajecreative.com.au

Thu, 11/07/2019 - 03:28
dimitrist

use php_admin_value in fpm pool and retry.. php_value can be overriden according to this : https://www.php.net/manual/en/install.fpm.configuration.php also check my previous comment, some options have no effect with ondemand manager.

i suppose 2M upload limit could be in /etc/php/7.3/fpm/php.ini and doesn't get overriden by php_value..