DelphiFAQ Home Search:

How can I create my own php.ini config file?


comments14 comments. Current rating: 3 stars (12 votes). Leave comments and/ or rate it.


My system has no php.ini configuration file and thus works with the default settings. How can I create a php.ini file (and where do I need to place it)?


The location for your config file was set when php was compiled (using directive --with-config-file-path=/directory. The default location on Unix machines is /usr/local/lib/php.ini and on Windows computers it is in the Windows directory e.g. c:\windows\php.ini.

To create a file in that location, take the file php.ini-dist and copy it to the above mentioned location, then rename it to php.ini. Under Windows you could also keep configuration settings in the registry but I recommend using the text file since it makes migrations easier.

Afterwards you can confirm that the php.ini file works by calling phpinfo():



2008-10-10, 16:26:33
I need also this information!

Thank you.
2008-12-28, 20:19:39
anonymous from India  
hi i want to add php.ini file but not able to get its path correctly
2015-01-31, 23:50:50
anonymous from Seattle, United States  
This inutedrcos a pleasingly rational point of view.
2018-09-21, 09:05:44
anonymous from France  
hollywood casino online <a href=';winstar world casino</a> jackpot party casino facebook <a href=' https://slotsonline...>casino games free online</a> | [url= https://slotsonline...o/]winstar world casino[/url] [url=]san manuel online casino[/url]
2018-09-21, 09:34:51
anonymous from France  
lady luck online casino <a href=' https://playonlineca..doubledown casino</a> big fish casino slots <a href=' https://playonlineca..sugarhouse online casino</a> | [url=]slots for real money[/url] [url=]hard rock casino tampa[/url]



NEW: Optional: Register   Login
Email address (not necessary):

Rate as
Hide my email when showing my comment.
Please notify me once a day about new comments on this topic.
Please provide a valid email address if you select this option, or post under a registered account.

Show city and country
Show country only
Hide my location
You can mark text as 'quoted' by putting [quote] .. [/quote] around it.
Please type in the code:

Please do not post inappropriate pictures. Inappropriate pictures include pictures of minors and nudity.
The owner of this web site reserves the right to delete such material.

photo Add a picture: