PHP-FPM and PHP user
Hi,
I am running last 11.62.17, on Cloudlinux 7.3
I configured EasyApahce4 to use PHP-FPM, but I see a strange behavour in a Wordpress site hosted on the server.
[LIST]
I had many problems installing plugins (mostly those that create files out of the plugins directory, as it turned out)
I saw that images uploaded to WP media library were not showed (nor in media library, nor on the frontend)
Troubleshooting, I had to put directories' permissions to 777 to even create dirs and files.
Going deep in my troubleshooting, I saw the problem was not the permissions, but the owner of the dirs/files, as Wordpress tried to use nobody:nobody instead of user:user (the owner of the homedir and the hosted site).
I am afraid it has to do with PHP-FPM settings non properly done, as I see no confg file for the domain and in the default one the listening user:group is nobody:nobody.
Don't even know if this is the right path to solve this, as I can't see how to properly set PHP-FPM settins.
Any help?
Thank you.
-
Looks like your file has bad ownership!. PHP-FPM pool run with user creds. Run in the document root the following commands find ./ -type f -exec chmod 644 {} \; find ./ -type d -exec chmod 755 {} \; chown -R cpaneluser:cpaneluser * That should solve all your issues. 0 -
Hi! I that's what I did to see the uploaded images (I had to upload the plugins manually as the Wordpress installer couldn't work). Any new uploaded image comes with nobody:nobody owner anyway... How can I check the FPM user? 0 -
PS: I think there's some settings to do in the pool.d/.conf file, like user/group settings, or listening user/group, but I can't find the .conf file, just default.conf and a test one. 0 -
PS 2: I use php7.0 if that's a clue. 0 -
You don't seem to be running php-fpm. Put a phpinfo file in the doc_root and see what SAPI it shows.It must be FPM/FastCGI I think you are running php as cgi . 0 -
Hello, Could you let us know the specific steps you took to enable PHP-FPM for this domain name? Are you able to upload a PHPINFO file to the account to confirm which handler is enabled, as referenced in the previous post? Thank you. 0 -
Hi, Here is the list of packages I'm provisioning through EasyApahce4: [LIST] - apache24
- apr
- apr-devel
- apr-util
- apr-util-devel
- config
- config-runtime
- cpanel-tools
- devel
- documentroot
- libmcrypt
- libtidy
- mod_bwlimited
- mod_cgid
- mod_deflate
- mod_env
- mod_expires
- mod_ext_filter
- mod_headers
- mod_hostinglimits
- mod_mpm_event
- mod_proctitle
- mod_proxy
- mod_proxy_fcgi
- mod_proxy_http
- mod_remoteip
- mod_security2
- mod_ssl
- mod_unique_id
- modsec-sdbm-util
- php-cli
- php70
- php70-libc-client
- php70-pear
- php70-php-bcmath
- php70-php-calendar
- php70-php-cli
- php70-php-common
- php70-php-curl
- php70-php-devel
- php70-php-exif
- php70-php-fileinfo
- php70-php-fpm
- php70-php-ftp
- php70-php-gd
- php70-php-imap
- php70-php-ioncube6
- php70-php-litespeed
- php70-php-mbstring
- php70-php-mcrypt
- php70-php-mysqlnd
- php70-php-opcache
- php70-php-pdo
- php70-php-posix
- php70-php-sockets
- php70-php-tidy
- php70-php-xml
- php70-php-zip
- php70-runtime
- profiles-cpanel
- tools And here's the info.php: [Removed] (cgi indeed, I didn't check as phpinfo was disabled for security and I was quite sure to have selected the right modules in EA4)
0 -
And here's the info.php: [Removed] (cgi indeed, I didn't check as phpinfo was disabled for security and I was quite sure to have selected the right modules in EA4)
PHP-FPM is enabled on a per-domain basis. You can browse to "WHM >> MultiPHP Manager" and select the domain name you'd like to enable PHP-FPM on. Thank you.0 -
I thougth I did it, but it showed FPM as disabled, probably didn't work properly the first time and I got it as done. Now I am sure it's enabled (and shows in phpinfo). .... and images are working wonderful now, thank you! 0 -
I'm happy to see it's working well. Thank you for updating us with the outcome. 0
Please sign in to leave a comment.
Comments
10 comments