Control Web Panel

WebPanel => PHP => Topic started by: ring_c on December 06, 2018, 04:15:47 PM

Title: Can't use personal php.ini
Post by: ring_c on December 06, 2018, 04:15:47 PM
Hi,


I was going through this (http://wiki.centos-webpanel.com/php-open_basedir) 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.
Title: Re: Can't use personal php.ini
Post by: ring_c on December 09, 2018, 08:40:40 AM
Sorry forgot to add the link to the guide I mentioned:
http://wiki.centos-webpanel.com/php-ini-per-folder
Title: Re: Can't use personal php.ini
Post by: ring_c on December 09, 2018, 08:52:03 AM
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.
Title: Re: Can't use personal php.ini
Post by: 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.
Title: Re: Can't use personal php.ini
Post by: ring_c on December 09, 2018, 06:17:54 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?
Title: Re: Can't use personal php.ini
Post by: GTMAN on December 09, 2018, 07:15:00 PM
Yes I have a .user.ini and phpinfo() reads it but WordPress doesn't
Title: Re: Can't use personal php.ini
Post by: ring_c on December 10, 2018, 05:41:54 AM
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!
Title: Re: Can't use personal php.ini
Post by: kortibu on December 29, 2018, 04:50:32 AM
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.
Title: Re: Can't use personal php.ini
Post by: ring_c on December 29, 2018, 04:48:35 PM
I still didn't find an answer to that.
Title: Re: Can't use personal php.ini
Post by: GTMAN on December 31, 2018, 03:40:33 PM
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

Code: [Select]
<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 (https://stackoverflow.com/questions/27226055/does-the-user-ini-file-work-for-subdirectories)
Title: Re: Can't use personal php.ini
Post by: ring_c on February 06, 2019, 01:33:01 PM
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