php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9448 It does not works / -c<path> Look for php.ini file in this directory
Submitted: 2001-02-25 17:13 UTC Modified: 2001-06-04 05:01 UTC
From: marcello dot dipietro at chello dot be Assigned:
Status: Closed Package: Installation problem
PHP Version: 4.0.4pl1 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: marcello dot dipietro at chello dot be
New email:
PHP Version: OS:

 

 [2001-02-25 17:13 UTC] marcello dot dipietro at chello dot be
I use php with apache, in the same time a crontab generate big html page from a .php source file.

#/usr/bin/php -q
<?
...
?>

, but if I use -c/usr/local/newphp to force the read of another php.ini file just for the cgi and different from the one used with php/apache it gives an error.

php -?
Usage: php [-q] [-h] [-s] [-v] [-i] [-f <file>] | {<file> [args...]}
  -q             Quiet-mode.  Suppress HTTP Header output.
  -s             Display colour syntax highlighted source.
  -f<file>       Parse <file>.  Implies `-q'
  -v             Version number
  -c<path>       Look for php.ini file in this directory
  -a             Run interactively
  -d foo[=bar]   Define INI entry foo with value 'bar'
  -e             Generate extended information for debugger/profiler
  -z<file>       Load Zend extension <file>.
  -i             PHP information
  -h             This help


-c is in the list , but not in the Usage , it should be nice to have diferent php.ini depending on scripts, excpecialy because zend optimizer works for the php/apache and not for cgi php (logically).


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-04-29 10:51 UTC] derick@php.net
You need to use a space between the -c and the path. That gives no error to me. The -h output reflects this in the upcoming PHP 4.0.5

Derick
 [2001-05-02 15:01 UTC] derick@php.net
user reports:

Indeed does not give an error but it does not work, just hung-up

#!/usr/bin/php -c /home/marcello -q
<?
echo "test";
?>

where a php.ini file reside in /home/marcello and another in
/usr/local/lib

Marcello
 [2001-05-02 15:01 UTC] derick@php.net
I confirm this, it's not working for me either.
 [2001-06-04 05:01 UTC] sniper@php.net
This is fixed in CVS. (in PHP 4.0.7 branch)

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 13:01:30 2024 UTC