Author Topic: php.ini configuration per user  (Read 12536 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
php.ini configuration per user
« on: October 25, 2014, 08:22:55 PM »
you can make php.ini per user account,  user only needs is to create php.ini file and add values in it.

Location of the php.ini file is
/home/USERNAME/php.ini

How to test php.ini changes?
Simple create phpinfo.php file in the users public_html folder and add the following content in it.

Example location: /home/USERNAME/public_html/phpinfo.php
Code: [Select]
<?php
phpinfo
();
?>


Now open url in your browser (Apache restart is NOT needed):
http://your-domain.com/phpinfo.php



PHP.ini values
http://php.net/manual/en/ini.list.php
AntiDDoS Protection (web + mail)
http://centos-webpanel.com/website-ddos-protection-proxy

Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp


Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor


Do you need Fast and FREE Support included for your CWP linux server?
http://centos-webpanel.com/noc-partner-list
Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services

Offline
*
Re: php.ini configuration per user
« Reply #1 on: September 25, 2015, 10:13:46 AM »
I change, in /home/username/public_html/php.ini
then i check with php.info, but the configuration not changed? how to fix it?

Offline
*
Re: php.ini configuration per user
« Reply #2 on: September 28, 2015, 05:52:51 AM »
have you checked in phpinfo() which php.ini path is loaded ?
AntiDDoS Protection (web + mail)
http://centos-webpanel.com/website-ddos-protection-proxy

Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp


Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor


Do you need Fast and FREE Support included for your CWP linux server?
http://centos-webpanel.com/noc-partner-list
Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services

Offline
*
Re: php.ini configuration per user
« Reply #3 on: September 28, 2015, 08:44:26 AM »
Yes, the php path in my public html, http://domain.com/info.php, the configuration is loaded in here /home/shinoa/public_html/php.ini, i change upload max filesize , but when i login in wp-admin, i use wordpress, the configuration not change, upload file limit it's not change.

Offline
*
Re: php.ini configuration per user
« Reply #4 on: September 28, 2015, 09:12:39 PM »
Yes, the php path in my public html, http://domain.com/info.php, the configuration is loaded in here /home/shinoa/public_html/php.ini, i change upload max filesize , but when i login in wp-admin, i use wordpress, the configuration not change, upload file limit it's not change.

to make this change for wp-admin folder you should add php.ini file in wp-admin folder.
AntiDDoS Protection (web + mail)
http://centos-webpanel.com/website-ddos-protection-proxy

Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp


Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor


Do you need Fast and FREE Support included for your CWP linux server?
http://centos-webpanel.com/noc-partner-list
Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services

Offline
*
Re: php.ini configuration per user
« Reply #5 on: September 29, 2015, 03:10:31 AM »
Thanks, Work For me ...  ;D

Offline
***
Re: php.ini configuration per user
« Reply #6 on: December 03, 2018, 07:30:10 AM »
to make this change for wp-admin folder you should add php.ini file in wp-admin folder.

This doesn't work in CWPpro version: 0.9.8.742. Is there another method?

Offline
***
Re: php.ini configuration per user
« Reply #7 on: December 03, 2018, 07:15:56 PM »
php.ini doesn't work with php-fpm in CWPpro version: 0.9.8.741 and above. You have to change it.

from
Code: [Select]
php.ini
to
Code: [Select]
.user.ini

Offline
*
Re: php.ini configuration per user
« Reply #8 on: December 03, 2018, 09:45:12 PM »
with php-fpm you need to make a file named as ".user.ini"
VPS & Dedicated server provider with included FREE Managed support for CWP.
http://www.studio4host.com/

*** Don't allow that your server or website is down, choose hosting provider with included expert managed support for your CWP.

Offline
***
Re: php.ini configuration per user
« Reply #9 on: December 31, 2018, 03:15:44 PM »
php.ini doesn't work with php-fpm in CWPpro version: 0.9.8.741 and above. You have to change it.

from
Code: [Select]
php.ini
to
Code: [Select]
.user.ini

Is local php.ini  working for a user...?

Offline
**
Re: php.ini configuration per user
« Reply #10 on: December 31, 2018, 03:45:02 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

Offline
*
Re: php.ini configuration per user
« Reply #11 on: July 25, 2019, 09:44:57 AM »
Hello,
I switched from php-cgi to php-fpm and it can't read .user.ini from /home/user but /home/user/public_html only, where is .user.ini public and mixed with another files. Is possible a manual or template config to have .user.ini working from /home/user directory? Thank you.