FPM Settings

kebirhost

Verified User
Joined
Jul 8, 2019
Messages
95
Hello,

We are using Apache and Php-fpm. Some user cannot upload themes and plugins with their wordpress panels.

Our post_max_size and upload_max is very high in php.ini.

/usr/local/php56/lib/php.ini

We should also add fpm settings as these limits? If yes how?

Thanks,
Melih
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
8,791
Location
LT, EU
If you're using CageFS PHP selector - they have different limits set there. I'd suggest uploading info.php file with the following content:
Code:
<?php
phpinfo();
?>
Open it in web browser and you'll see the limits in effect.
 

kebirhost

Verified User
Joined
Jul 8, 2019
Messages
95
Hello,

I want to say that FPM uses php.ini settings from the file below?

/usr/local/php56/lib/php.ini

Or i have to add all settings memory_limit, upload_max....etc to fpm conf file?

I am not using cloudlinux.

Thanks,
Melih
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
8,791
Location
LT, EU
It depends on PHP version used, if 5.6 - yes, but PHP-FPM is a service, it needs a restart/reload to load the new values form the ini file.
 

kebirhost

Verified User
Joined
Jul 8, 2019
Messages
95
Hello,

What do you think why user cannot upload files from WP?

Thanks,
Melih
 

kebirhost

Verified User
Joined
Jul 8, 2019
Messages
95
Hello,

Yes of course i reviewed all error logs but no help.

Thanks,
Melih
 

sparek

Verified User
Joined
Jun 27, 2019
Messages
130
Well... I mean... we're not going to know why uploads aren't happening on your server. We can't actually see the inside of your server. We cannot diagnose issues on your server.

Either the verbosity of your logs aren't showing enough or you're not looking in the right error log.

If you are using php-fpm, then each pool would have or be able to define an error_log. What error_log is defined for the pool in question? What does that error_log say when you try to upload a file but it fails?

If this is being stopped by ModSecurity or whatever (I'm going to assume you are using Apache as your web server - although that may not be the case) then you would need to check the ModSecurity rules or the Apache error log.
 

kebirhost

Verified User
Joined
Jul 8, 2019
Messages
95
Hello,

We are using php-FPM.

You mean the log file:
/var/log/php-fpm56.log

Thanks,
Melih
 

sparek

Verified User
Joined
Jun 27, 2019
Messages
130
No, it would probably be more specific to whatever specific pool is being referred to.

This illustrates why forum support can be so flaky. We do not know how your server is set up. You're wanting specific instructions "check this file right here." We're not going to know your set up and what error log to check.

You have to know how your server is set up to operate and what logs to check appropriately.

Is the account using PHP 5.6?

I'm assuming the php-fpm pool file for this user would be in

/usr/local/directadmin/data/users/%user%/php/php-fpm56.conf

It doesn't look like an error_log is added by default to the pool configuration.

Add

php_admin_value[error_log] = /home/%user%/.php/php56-php-fpm.log
php_admin_flag[log_errors] = on


to this file and reload php56-php-fpm

service php56-php-fpm reload

Now you should get an error log at

/home/%user%/.php/php56-php-fpm.log

when errors are generated in PHP in this pool.
 
Top