Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Overriding global php.ini file

Tags:

php

I don't have access to global php.ini file since I am running my application on shared hosting and now what happens is I need to put my php.ini file in every directory to use the settings. But I am wondering whether there is a way to override the global php.ini file in my root directory for every sub folders instead of putting the php.ini file inside of every and each folder which isn't a good practice for further times.

If you are asking which specific option I need to change is auto_prepend_file

like image 663
Tarik Avatar asked Oct 16 '11 02:10

Tarik


1 Answers

Yes! Not all php.ini options can be set, but many can be changed through .htaccess files, or the ini_set function, etc. See these pages.

like image 72
imm Avatar answered Oct 17 '22 01:10

imm