Here are the errors I am recieving:
Warning: fopen("Resource id #4","wb") - Permission denied in
/path/to/asciiartist.php on line 295
Warning: Supplied argument is not a valid File-Handle resource in
/path/to/asciiartist.php on line 296
Warning: Supplied argument is not a valid File-Handle resource in
/path/to/asciiartist.php on line 297
Warning: getimagesize: Unable to open 'Resource id #4' for reading. in
/path/to/asciiartist.php on line 303
ASCIIArtist(): Cannot determine image type of shared/image02.jpg.
I have checked the file permissions for the files and directory in question
and they are all set to read & write, so I know this is not the problem.
Here is the function that I am trying to get to work.
function ASCIIArtist($image)
{
if ($input = @fopen($image, "rb")) {
$image_data = fread ($input, 2048576);
fclose($input);
$tmp_image = tmpfile();
$output = fopen($tmp_image, "wb");
fwrite($output, $image_data);
fclose($output);
} else {
exit("Cannot access ".$image." for reading. (Does not exist or
has wrong permissions)");
}
This code is from http://www.sebastian-r.de/. And everything works fine
until it hits this function. Could I get some enlightenment on why it cannot
create a temp file named $tmp_image? (ecspecially when the permissions for
the file are correct?) Thanks in advance,
Jas
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php