webnix

Member
Apr 21, 2016
5
0
51
sa
cPanel Access Level
Root Administrator
Hi

I'm trying to get custom php.ini to work using .htaccess and read various threads in the form but couldnt get it to work

I use EA4/Apache 2.4/PHP56

in .htaccess I added:

------------
<IfModule mod_suphp.c>
suPHP_ConfigPath /home/user/public_html
</IfModule>
<Files php.ini>
order allow,deny
deny from all
</Files>

SetEnv PHPRC /home/user/php.ini
--------------

result of /usr/local/cpanel/bin/rebuild_phpconf --current:

DEFAULT PHP: ea-php56
ea-php56 SAPI: suphp


Thanks.
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,304
363
Houston

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,304
363
Houston
Hello @webnix

I think maybe there's a misunderstanding. I can see that the suPHP config path points to a php.ini what I'm trying to explain is that the php.ini it points to needs to be a full and complete php.ini. Before EA4 you could just add directives that were different from the global into the local php.ini