is_readable fails with a variable parameter

From: Date: Tue, 29 Sep 2015 16:51:04 +0000
Subject: is_readable fails with a variable parameter
Groups: php.general 
Request: Send a blank email to php-general+get-325147@lists.php.net to get a copy of this message
I am using a PHP API that uses is_readable as a check before a particular function does anything. The problem that I am having is that if I do something like is_readable($file_path_name); my code terminates as is_readable says it cannot read the file or there is a permissions issue. But if I go to the file path/name in $file_path_name (echoing it out to make sure) I can see and open the file. If I edit the same code and do something like is_readable("/path/to/the/file/filename.zip") the same code executes just fine. At first I thought the variable was some how getting over written. But it isn't. It is just somehow the variable is not be interpolated correctly by is_readable like a hard coded path/file name is. Any thoughts? This is on Linux. And this is PHP 5.4.43

« previous php.general (#325147) next »