Edit report at http://bugs.php.net/bug.php?id=51403&edit=1

 ID:               51403
 Updated by:       ras...@php.net
 Reported by:      ericp at activestate dot com
 Summary:          Multiple -d include_path command-line directives not
                   handled correctly
 Status:           Bogus
 Type:             Bug
 Package:          Scripting Engine problem
 Operating System: Any
 PHP Version:      5.3.2

 New Comment:

That's because you didn't use quotes around your value there, so the
shell ended 

your expression on the first semi-colon.  Not a PHP issue.


Previous Comments:
------------------------------------------------------------------------
[2010-03-26 21:44:23] ericp at activestate dot com

But notice that this case fails to register both paths:



php -d include_path=c:\php-5.2.8\PEAR;c:\php-5.2.8\PEAR\phpunit
test.php



- only the first path shows up.



It would be useful if the command-line version had a way to add

new directories to the include_path setting (after php.ini processing

has taken place).  I didn't see this in any existing bug.

------------------------------------------------------------------------
[2010-03-26 21:07:20] johan...@php.net

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

-d sets the setting, consequentially calls overwrite it, the last ones
wins. That's the only consistent way to do it ...

------------------------------------------------------------------------
[2010-03-26 19:57:57] ericp at activestate dot com

Description:
------------
If I try to specify more than one include_path directive on

the command-line, only one sticks.  WIth the following two

command-lines, I expected to see two entries, but only saw

the first.



1. Default case -- I see all three entries from my php.ini

$ php test.php

include_path=.;C:\apps\xampp\php\PEAR;c:\apps\smarty\libs



$ php -d include_path=c:\php-5.2.8\PEAR;c:\php-5.2.8\PEAR\phpunit
test.php

include_path=c:\php-5.2.8\PEAR



I was expecting to see both entries, not just the first.  I'd also

like an option to add to the existing include_path setting,

not just override it.





$ php -d include_path=c:\php-5.2.8\PEAR -d
include_path=c:\php-5.2.8\PEAR\phpunit test.php

include_path=c:\php-5.2.8\PEAR\phpunit



Here I get the second entry only.

Test script:
---------------
<?php

print "include_path=";

print ini_get("include_path");

print "\n";

?>

Expected result:
----------------
See the description.

Actual result:
--------------
See the description.


------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=51403&edit=1

Reply via email to