News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint PHP Blog:
How to Override PHP Configuration Options
March 04, 2010 @ 10:09:45

Craig Buckler has added a new post to the SitePoint PHP blog today that looks at some of the PHP configuration options and how you can change them from two different places (besides the php.ini file).

Configuring PHP is easy. You can change almost any aspect of the interpreter within the php.ini configuration file, e.g. modify error handling, increase memory usage, etc. Unfortunately, problems can occur when you move your application to a live hosting environment or are distributing the code to customers. ISPs usually lock down the php.ini configuration file - especially on shared hosting. This could cause your application to fail.

If you're lucky enough to be able to use htaccess files, his first method will work for you - using the "php_flag" or "php_value" directives to change settings for your entire application. The other option is more on an as needed basis - using the ini_set method to change configuration options. Be careful, though, only some configuration options can be changed using these methods. Some still require changes to the php.ini and a restart of the web server.

0 comments voice your opinion now!
override configuration options phpini tutorial


blog comments powered by Disqus

Similar Posts

Dagfinn Reiersol's Blog: Real programming with PHP 5.3 (part 4): A more realistic example

SitePoint PHP Blog: Nette Framework: First Impressions

Chris Cassell's Blog: Creating Magic Methods in PHP

WorkingSoftware.com.au: Configuring PHP4 and PHP5 to run concurrently on FreeBSD

The Tutorial Blog: Adding security to CodeIgniter forms with a custom library class


Community Events

Don't see your event here?
Let us know!


part2 api php7 composer framework opinion example community symfony series list yii2 project laravel introduction testing podcast application interview language

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework