Home Php PHP ini
Questions:Ask|Latest

 
 

Share on Google+Share on Google+

PHP ini

Advertisement
PHP provides us so many facilities, php.

PHP ini

     

PHP provides us so many facilities, php.ini file is one of them, with the help of it we can customize the behavior of php. Using this file maintaining PHP will be as easy as maintaining Apache. The php.ini file is used after implementation and using it you can configure all PHP's runtime configurations. It is also better in the sense that we do not need to recompile PHP again and again.

When PHP starts up its engine, one of the first thing it looks up for the php.ini in the current working directory, whenever we compile PHP, most of the time a copy of ini file places a copy of itself in /usr/local/lib/php.

To find out the ini file in Unix system you need to type "locate php.ini " or "find / -name php.ini -print". On the other hand in Windoows you can use the simple search option from start menu.

php.ini file allows to customize PHP dynamically but at the same time if it is running as an Apache module configuration directives reside in memory until a new Apache process has been started. The configuration information is read again and again PHP as CGI program whenever the CGI program starts a new process and this is the reason PHP considers as dynamic, otherwise until the web server starts PHP configuration remains unchanged

In the earlier versions of PHP, you could admit the configuration directives as Apache directives in either httpd.conf or .htaccess files. From PHP version 4.x onwards it became necessary to keep all directives in php.ini file.

It should be keep in mind that if we use PHP as CGI then we must keep the "safe mode" as ON, and after that set safe_mode_exec_dir directive. By doing this you can be assure that user can access only those information which are documented as root.

The structure of php.ini file is very much similar to Windows .ini files, it is based on standard "directive = value" syntax. Semicolon is used to make comments, so lines start with semicolon are ignored. To put an empty value to a directive use value blank or use keyword none. Sections are defined within  [ and ] brackets.

Advertisement

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: December 17, 2009

Related Tutorials

Ask Questions?    Discuss: PHP ini  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments
Saleem Khan
December 30, 2011
congratulation!

All tutorials from Rose India Technology has been really incredible and worthy of accolades. It is full of knowledge and learning and my hearty congratulations are always for Rose India for their exceptional tutorials. As user, I request you to add more tutorials for php form processing and more Java. Thank you once again!
DMCA.com