From: tom at r dot je
Operating system: Linux
PHP version: 5.5.14
Package: CGI/CLI related
Bug Type: Bug
Bug description:PHP cannot run a command line application if there is a dash in its path
Description:
------------
This fails:
php /foo/bar-baz/foobar.php
with the error:
"Could not open input file /foo/bar-baz/foobar.php"
Similarly,
cd /foo/bar-baz
php foobar.php
fails with the same issue.
Removing the hyphen so the full path to the script is:
/foo/barbaz/foobar.php
Fixes the issue.
I just spent 40 minutes pulling my hair out trying to get better output,
checking file permissions, trying the same script in other directories
until I worked out it was the hyphen.
Ideally, php shouldn't break with a hyphen in a path name, however, at
worst a more descriptive error message would at least prevent the time
wasted tracking this down
--
Edit bug report at https://bugs.php.net/bug.php?id=67568&edit=1
--