Page 1 of 1
Override php configuration in php files
Posted: Fri Feb 22, 2008 9:13 am
by m_kk
Is it possible to override the settings in php.ini file in the .php page. For example I need to the allow_url_include to be on for my program to work. Can i configure it in my php page instead of editing the php.ini file.
Thanks in advance
Re: Override php configuration in php files
Posted: Fri Feb 22, 2008 9:22 am
by liljester
try the
ini_set() function.
Re: Override php configuration in php files
Posted: Fri Feb 22, 2008 9:26 am
by Zoxive
Look at
http://www.php.net (The Manual), it will say if settings can be overridden.
http://us2.php.net/filesystem
Re: Override php configuration in php files
Posted: Fri Feb 22, 2008 10:33 am
by anjanesh
Check out
this list.
If the value you want to change has a changeable value of PHP_INI_PERDIR, then edit your directory's .htaccess file.
How to change configuration settings: Running PHP as an Apache module
If its a PHP_INI_ALL, then you can set it using ini_set.