Control Web Panel
WebPanel => PHP => Topic started by: Administrator 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
<?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
-
I change, in /home/username/public_html/php.ini
then i check with php.info, but the configuration not changed? how to fix it?
-
have you checked in phpinfo() which php.ini path is loaded ?
-
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.
-
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.
-
Thanks, Work For me ... ;D
-
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?
-
php.ini doesn't work with php-fpm in CWPpro version: 0.9.8.741 and above. You have to change it.
from
php.ini
to
.user.ini
-
with php-fpm you need to make a file named as ".user.ini"
-
php.ini doesn't work with php-fpm in CWPpro version: 0.9.8.741 and above. You have to change it.
from
php.ini
to
.user.ini
Is local php.ini working for a user...?
-
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 (https://stackoverflow.com/questions/27226055/does-the-user-ini-file-work-for-subdirectories)
-
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.
-
I have the same issue. I am using this guide https://wiki.centos-webpanel.com/php-open_basedir but the per user does not work.
-
NGINX + PHP-FPM
configuration files are:
/etc/nginx/conf.d/vhosts/DOMAIN.conf
/etc/nginx/conf.d/vhosts/DOMAIN.ssl.conf
under fastcgi_param add one more line and reload/restart nginx
fastcgi_param PHP_ADMIN_VALUE "open_basedir =/home/USERNAME:/tmp:";
** Note that manual editing of the webserver vhost files is not recommended as those files get rebuilt from the template on each change.
Try checking the instructions here for the custom template build.
http://wiki.centos-webpanel.com/webservers-vhost-templates
APACHE + PHP-FPM
Configuration files are all user existing php-fpm configuration files, to get the list of files you can use this
ls -la /opt/alt/php-fpm*/usr/etc/php-fpm.d/users/USERNAME.conf
Add at the bottom
php_admin_value[open_basedir] = /home/USERNAME:/tmp
** Note that editing any of those files requires to restart php-fpm version you edited.
** Note that manual editing of the webserver vhost files is not recommended as those files get rebuilt from the template on each change.
Try checking the instructions here for the custom template build.
http://wiki.centos-webpanel.com/webservers-vhost-templates
-
So the "correct" way to do this is to:
From cwp admin panel
webserver settings -> WebServers Template Editor -> Php-fpm
Pick a file and click clone (I picked processes-50.tpl)
name it processes-51.tpl
add to the end
php_admin_value[open_basedir] = /home/%username%:/tmp
Then go to
webserver settings -> WebServers Main conf
go to the bottom
PHP-FPM Service Configuration
Choose from PHP-FPM default template: the template you just created, ffor example processes-51.tpl
check the Rebuild all vhosts on save
click save
-
https://forum.centos-webpanel.com/index.php?topic=11416.0
not working here
-
is this option only for pro ?
i test on cwp free the ?module=phpini_editor always empty everytime i refresh the page
-
https://forum.centos-webpanel.com/index.php?topic=11416.0
not working here
like this
cwp free
almalinux
-
how to solved this ?
for free CWP ?
or this is only for PRO ?
-
i use alma
so it only work using centos 7 ?
are you use cwp free ?
-
Hi, all features which work with EL7 available for EL8 as well
-
I moved to another USA Server with new a fresh install of the centos 7 version then it works seems it's related to the centos version after all
-
As Igor mentioned 7 & 8 are the same.
But he did get it working under CWPpro on AlmaLinux 8.x
-
i solved this issue too when i use cwp pro