php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38023 -c option does not work in command line when defined in the #!/bin/php line
Submitted: 2006-07-06 15:17 UTC Modified: 2006-07-06 15:48 UTC
From: hjubin27 at yahoo dot com Assigned:
Status: Not a bug Package: PHP options/info functions
PHP Version: 5.1.4 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: hjubin27 at yahoo dot com
New email:
PHP Version: OS:

 

 [2006-07-06 15:17 UTC] hjubin27 at yahoo dot com
Description:
------------
Under Linux (mandriva 2006.0) php 5.1.4
The -c php.ini-path does not work when invoqued as an argument in first shell command line with a blank between 
the -c and the path



Reproduce code:
---------------
phpinfo.php (bogus version):

#!/usr/bin/php -c /home/hjubin/php.ini
<?php
phpinfo();
?>

phpinfowkr.php (workaround version):

#!/usr/bin/php -c/home/hjubin/php.ini
<?php
phpinfo();
?>


Expected result:
----------------
Using the following command line:
php -c /home/hjubin phpinfo.php | grep php.ini
Result: 
Configuration File (php.ini) Path => /ldisk/home/hjubin/php.ini
That is CORRECT
sing the following command line:
phpinfowkr.php | grep php.ini
Result: 
Configuration File (php.ini) Path => /ldisk/home/hjubin/php.ini
That is CORRECT

Actual result:
--------------
Using the following command line:
./phpinfo.php | grep php.ini
returns : 
Configuration File (php.ini) Path => /etc

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-07-06 15:48 UTC] tony2001@php.net
Duplicate of bug #37352.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 11:01:30 2024 UTC