|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38846 The global PHP.INI creates deployment problems
Submitted: 2006-09-15 14:12 UTC Modified: 2006-09-17 07:54 UTC
From: teopanait at gmail dot com Assigned:
Status: Not a bug Package: *Configuration Issues
PHP Version: 5.1.6 OS: Windows and Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
31 - 3 = ?
Subscribe to this entry?

 [2006-09-15 14:12 UTC] teopanait at gmail dot com
The fact that PHP.INI is global creates deployment problems and PHP application conflicts.

PHP.INI should be local to each application.

Global configuration files are bad. The PHP developers should have made this file local to every PHP application, so it doesn't create deployment problems and conflicts.

The global PHP.INI file means one thing: no "deploy by simply uploading the PHP files to the server" for you. After you upload the files to the server, most likely you'll have to tweak PHP.INI or your code.

This is 2006 people, there has to be a better way.

Zend should implement 2 things:

- PHP.INI should be local to each PHP application.

I know that this can create security problems, but I'm sure that if they assign a brilliant software designer on this for one month, they'll find a good way to implement it which doesn't create security problems.

For example, there should be a global PHP_RESTRICTIONS.INI where the admin could add restrictions, and the PHP.INI file should be local to all applications

- There should be a way of running code written for different versions of PHP on the same web server, without modifications. This could be solved by using the local PHP.INI - in the PHP.INI directory of my app, I should be able to specify something like:


and then, the PHP interpreter should run the specified version (so we should have several interpreter versions installed, and one "main" CGI executable or apache module to route to the correct version specified in the local PHP.INI).

More details are available at

Thank you.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-09-16 00:06 UTC] judas dot iscariote at gmail dot com
you can do this, just use Fastcgi.

this is not a bug btw.. and a non-global php.ini for the apache module is likely to become a security disaster.

and no, please, I mean,, really. do not suggest more ini files or ini directives that modifies the PHP behaviuor. the list in now too big, we don't need more, in fact, we need less ;)
 [2006-09-16 00:16 UTC]
Moving to a more appropriate category.
 [2006-09-17 07:54 UTC]
No bug here, there are lots of ways to change the configuration.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sun Oct 02 06:05:52 2022 UTC