I am having problems with both is_file()
and file_exists()
, i am trying to verify a featured image exists in the wp uploads
folder....both output sets of characters and create multiple errors for each thumbnail size
fopen(http://www.xxx.gf/wp-content/uploads/2014/09/1-150x150.jpg): failed to open stream: HTTP wrapper does not support writeable connections in /home/tserv/public_html/wp-includes/class-wp-image-editor.php on line 396
This is odd because i am passing a correct server path to both functions and the functions works for files outside the uploads folder. Also the filename is 1.jpg
and its appending - 150x150 and a few other sizes which are the thumbnail sizes for wordpress.
update: server path is being passed: e.g. home/user/etc.., the error is saying fopen... but im not calling fopen directly nor passing a url to file_exists
, is_file
.
Since starting this i realize i'm mad for trying to verify it like this when i can check it using wp_functions
but i would like to figure out why this is happening!
php code
if($x= is_file($upload_path.$filename) )
server- linux debian wheezy vps
open_basedir= None
safemode- off
folder permissions - 777 (temp)