Hi , I have finally migrated my server from centos 5.3 apache 2.2 cpanel 56 to cents 7.3 apache 2.4 cpanel 64.
I have some problems in configuring virtual hosts as many configurations is changed.
I used to have per user php.ini file outsite of users directory.
I have read some pages regarding how to apply such a change in easyapache 2.4 :
The cPanel PHPRC PHP Patch for EasyApache 4 - EasyApache 4 - cPanel Documentation
PHP Handlers - EasyApache 4 - cPanel Documentation
I currently have the setting of php 5.6 with fpm : off .
the settings in /etc/suphp.conf in the part of [phprc_paths] settings are all commented. ( no active rules defined there. )
when I use .user.ini in public_html directory of <cphostuser> some directives change , but some are ignored.
for example I want to set File_uploads : off in multiphp ini editor , and have a restricted disable_functions , but allow them for some users via their own php.ini file.
when i set file_uploads=on in public_html\.user.ini then i check phpinf() it does not change .
but some other directives work for example display_errors=on works.
then I set suphp_ConfigPath in .htacceass and copy a full php.ini to a directory and set its path here. it works fine and the "loaded configuration path" changes to this php.ini that I set.
now I want to have this suphp_ConfigPath in the virtual host config of that user instead of .htaccess file that user may change it.
as this link says :
Modify Virtualhost Containers With Include Files - EasyApache - cPanel Documentation
Without SSL /usr/local/apache/conf/userdata/std/2_4/$user/$includename.conf
I put that php.ini code to this config
/usr/local/apache/conf/userdata/std/2_4/<cphostuser>/user.conf
then I update virtual host configs :
/scripts/ensure_vhost_includes --user=cphostuser
but It doesn't read the suphp code to change the php.ini address like what it does from .htaccess file.
any solutions ?
I have some problems in configuring virtual hosts as many configurations is changed.
I used to have per user php.ini file outsite of users directory.
I have read some pages regarding how to apply such a change in easyapache 2.4 :
The cPanel PHPRC PHP Patch for EasyApache 4 - EasyApache 4 - cPanel Documentation
PHP Handlers - EasyApache 4 - cPanel Documentation
The suphp.conf file
The suphp.conf file includes the [phprc_paths] section. Use this section to lock a particular PHP handler to its default php.ini file. To lock a particular PHP handler to its default php.ini file, uncomment the appropriate line in the [phprc_paths] section.
The suPHP_ConfigPath configuration directive sets the path to the php.ini file. Set the suPHP_ConfigPath directive in either the httpd.conf file or an .htaccess file.
- To prevent the use of this directive in .htaccess files, remove the Options parameter from the Apache AllowOverride directive.
- The [phprc_paths] settings in the suphp.conf file overrride any suPHP_ConfigPath settings.
I currently have the setting of php 5.6 with fpm : off .
the settings in /etc/suphp.conf in the part of [phprc_paths] settings are all commented. ( no active rules defined there. )
when I use .user.ini in public_html directory of <cphostuser> some directives change , but some are ignored.
for example I want to set File_uploads : off in multiphp ini editor , and have a restricted disable_functions , but allow them for some users via their own php.ini file.
when i set file_uploads=on in public_html\.user.ini then i check phpinf() it does not change .
but some other directives work for example display_errors=on works.
then I set suphp_ConfigPath in .htacceass and copy a full php.ini to a directory and set its path here. it works fine and the "loaded configuration path" changes to this php.ini that I set.
now I want to have this suphp_ConfigPath in the virtual host config of that user instead of .htaccess file that user may change it.
as this link says :
Modify Virtualhost Containers With Include Files - EasyApache - cPanel Documentation
Without SSL /usr/local/apache/conf/userdata/std/2_4/$user/$includename.conf
I put that php.ini code to this config
/usr/local/apache/conf/userdata/std/2_4/<cphostuser>/user.conf
then I update virtual host configs :
/scripts/ensure_vhost_includes --user=cphostuser
but It doesn't read the suphp code to change the php.ini address like what it does from .htaccess file.
any solutions ?