Search the Community
Showing results for tags 'php cli command line sub-dir'.
-
Hiho, This one has me stumped. I've been coding for a while and never seen this sort of problem before. This issue has occured on an openSuse box. PHP from the command line reports that it is unable to find php files in a particular sub-directory. But everywhere else things work fine. There are no differences that I can identify between permissions. There is no .htaccess file. I've checked the php.ini file and there are no prescriptive settings that prohibit the offending sub-directory. The problem exists even as Super User. Below is the output from a session that highlights my issue. The same test.php file is included in the current directory, a 'test' sub-directory and the offending 'projects' sub-directory. The script permissions are the same in each directory. Also the permissions for the directories are identical. The script is simple. The script contents are the same in each directory. The output is different for the script in the 'projects' sub-directory. Apparently PHP cannot find the file. If anyone has any hints I'd love to hear them. Thanks user@machine:~> ls -l test.php -rw-r--r-- 1 user users 37 May 11 07:40 test.php user@machine:~> ls -l test/test.php -rw-r--r-- 1 user users 37 May 11 07:41 test/test.php user@machine:~> ls -l projects/test.php -rw-r--r-- 1 user users 37 May 11 07:41 projects/test.php user@machine:~> cat test.php <?php echo "is this thing on?\n"; ?> user@machine:~> diff test.php test/test.php user@machine:~> diff test.php projects/test.php user@machine:~> php test.php is this thing on? user@machine:~> php test/test.php is this thing on? user@machine:~> php projects/test.php PHP Fatal error: Unknown: Failed opening required 'projects/test.php' (include_path='.:/usr/share/php5:/usr/share/php5/PEAR') in Unknown on line 0 user@machine:~>