Bug #67568 [NEW]: PHP cannot run a command line application if there is a dash in its path

From: Date: Fri, 04 Jul 2014 09:11:31 +0000
Subject: Bug #67568 [NEW]: PHP cannot run a command line application if there is a dash in its path
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-186463@lists.php.net to get a copy of this message
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
-- 



Thread (3 messages)

« previous php.bugs (#186463) next »