sKunKbad Posted January 12, 2009 Share Posted January 12, 2009 I've got a shared hosting account, and it turns out that each directory needs its own php.ini. If I was in full control, then I could make a symbolic link in each sub-dir, and that way when a main php.ini in the www root was changed the sub-dir php.inis would also. So, am I stuck putting a php.ini in each sub-dir? Is there a way to have a symbolic link in php that mimics the behavior of the normal linux symbolic link? What are my options, if any? Link to comment https://forums.phpfreaks.com/topic/140446-solved-phpini-in-every-directory-how-to-make-one-in-www-for-all-sub-dirs/ Share on other sites More sharing options...
sKunKbad Posted January 12, 2009 Author Share Posted January 12, 2009 I found a solution that worked for me. I just put the following in my root .htaccess file: SETENV PHPRC /HOME/PUBLIC_HTML/php.ini I have a subdomain that is in a directory off of public_html, and it was showing errors after I did this, so I just put the same code in its directory, but changed the path so that it had its own php.ini, made the specific changes necessary, and all is well. I guess this only works if you or your host is running php in CGI mode, which mine is. I did however find solutions that would have worked regardless of what way php is running. Link to comment https://forums.phpfreaks.com/topic/140446-solved-phpini-in-every-directory-how-to-make-one-in-www-for-all-sub-dirs/#findComment-735061 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.