php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #62797 Add a CLI parameter to override php.ini settings for a web server instance
Submitted: 2012-08-11 11:13 UTC Modified: 2012-08-12 02:34 UTC
From: mathias at qiwi dot be Assigned:
Status: Not a bug Package: Built-in web server
PHP Version: 5.4.6RC1 OS: OS X 10.8
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mathias at qiwi dot be
New email:
PHP Version: OS:

 

 [2012-08-11 11:13 UTC] mathias at qiwi dot be
Description:
------------
During development, it can be useful to override certain php.ini settings for 
specific server instances (using the PHP built-in web server).

Of course, it’s possible to edit `php.ini` every time this is needed, (or use 
`ini_set` in the PHP code where applicable), but for small changes it would be 
very useful to just be able to specify the setting and its value as a command 
line argument/value pair.

For example, to start a test server with a custom `include_path` setting 
(without overriding `php.ini` or changing the existing PHP code by adding 
`ini_set()` calls):

    php -S localhost:8000 --set "include_path=.:/foo/bar:/baz/qux"

The syntax is just an example. Perhaps you’d prefer to do it a bit differently, 
and allow people to point to a project-specific `php.ini` file:

    php -S localhost:8000 --ini "./project.ini"

However, I’d strongly prefer the first solution.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-08-12 02:34 UTC] laruence@php.net
-Status: Open +Status: Not a bug
 [2012-08-12 02:34 UTC] laruence@php.net
php54 -d include_patch=".:/foo/bar:/baz/qux"   -S localhost:8000
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 03 12:01:30 2024 UTC