Req #62797 [NEW]: Add a CLI parameter to override php.ini settings for a web server instance
| From: | mathias at qiwi dot be | Date: | Sat, 11 Aug 2012 11:13:29 +0000 |
| Subject: | Req #62797 [NEW]: Add a CLI parameter to override php.ini settings for a web server instance | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-172566@lists.php.net to get a copy of this message | ||
From: mathias at qiwi dot be
Operating system: OS X 10.8
PHP version: 5.4.6RC1
Package: Built-in web server
Bug Type: Feature/Change Request
Bug description:Add a CLI parameter to override php.ini settings for a web server instance
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.
--
Edit bug report at https://bugs.php.net/bug.php?id=62797&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=62797&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=62797&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=62797&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=62797&r=fixed
Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=62797&r=needdocs
Fixed in release: https://bugs.php.net/fix.php?id=62797&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=62797&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=62797&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=62797&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=62797&r=support
Expected behavior: https://bugs.php.net/fix.php?id=62797&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=62797&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=62797&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=62797&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=62797&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=62797&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=62797&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=62797&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=62797&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=62797&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=62797&r=mysqlcfg