.user.ini / php.ini (in public_html) not parsed if PHP-FPM is enabled for the domain
Title says it all: .user.ini / php.ini (in public_html) not parsed if PHP-FPM is enabled for the domain.
I have seen lots of discussion... but is it just not an option with PHP-FPM enabled, or am I missing something?
I would like to be able to turn display_errors for a domain, while leaving it off for the server. I can use ini_set() but makes it a file by file setting which is not really practical for my use.
-
Hey there! That sounds right - the files for PHP-FPM are held in a different area. We have details on this here:
and here:
Does that help to clear things up?
1 -
Aaaaaand... life is good! :) Thanks, cPRex! I had a typo in .user.ini so my version wasn't working. (One little thing; so picky! lol) Changing it through cPanel sorted that and then I found it! :)
For my purposes uploading .user.ini alone does what I want and is easiest. But here's what I learned about how cPanel handles it, just FYI for the next guy:
- cPanel Editor tab reads the live php.ini (if exist) in the selected location
- cPanel Basic refers to php.ini BUT does NOT reflect manual changes made anywhere (.user.ini, php.ini, .htaccess - all of which cPanel will sync/modify on saving), not sure why
- cPanel (Editor or Basic) will sync .user.ini to php.ini on save (of course, since .user.ini overrides a local php.ini)
- just uploading a .user.ini will do what you want but cPanel will not be aware of it in the interface, so best to choose one method (manual, or cPanel) and NOT mix methods. ;)
1 -
Thanks for sharing that! And yes, we've all been caught by one weird character in a config file or DNS zone before!
1 -
To be more clear/helpful, my typo was in the file name!
With PHP-FPM disabled ANY .ini file is parsed so I didn't catch my file name error, but with PHP-FPM on it must be .user.ini
0
Please sign in to leave a comment.
Comments
4 comments