Can't use personal php.ini

Started by ring_c, December 06, 2018, 04:15:47 PM

Previous topic - Next topic

ring_c

Hi,


I was going through this guide, but couldn't make the persoanl php.ini (per account, and not a global one) to work.
By the way, I beleive it was working properly before I upgraded to php-fpm yesterday.


Would appretiate if anyne can advise what I might be missing.
By the way, during the php-fpm upgrade, I was also compiling some other php versions. Might this cause such an issue?


TIA.

ring_c


ring_c

Just found out that I have to use .user.ini instead of php.ini since the update the PHP-FPM.
I can confirm it works great.

GTMAN

Are you running WordPress on any of them? I can't get WP to use local settings in the user.ini file.

ring_c

Quote from: GTMAN on December 09, 2018, 04:03:02 PM
Are you running WordPress on any of them? I can't get WP to use local settings in the user.ini file.
Yes. Only WP. Are you sure you have a .user.ini file (not user.ini) in place?

GTMAN

Yes I have a .user.ini and phpinfo() reads it but WordPress doesn't

ring_c

In some way I can relate to that. I've increased the memory allocated to wordpress to 128mb, but wordpress (elementor's system info) shows it still at 40mb. I thought it's a bug, but now that you say that... damn!

kortibu

I've same problem. I changed the php.ini, then check file phpinfo.php, everything has been changed like php.ini but Allow max upload size does'nt. I tried also to restart vps.

ring_c

I still didn't find an answer to that.

GTMAN

#9
On further research its was an Apache config error which apparently is quite common. Specifically it was a trailing slash error in the domain.ca.conf file.

/usr/local/apache/conf.d/vhosts

<IfModule proxy_fcgi_module>
<FilesMatch \.php$>
SetHandler "proxy:unix:/opt/alt/php-fpm73/usr/var/sockets/jet.sock|fcgi://localhost/"
</FilesMatch>



The trailing slash after localhost breaks the recursive search at least for ClassicPress / WordPress.



https://stackoverflow.com/questions/27226055/does-the-user-ini-file-work-for-subdirectories

ring_c

For the sake of future searchers, I've found the answer for that issue. You can see it here:
http://forum.centos-webpanel.com/php/changes-in-php-ini-won't-work!/msg21430/#msg21430