#31602 [Fbk->Bgs]: tmpfile() fails

From: Date: Fri, 21 Jan 2005 10:54:28 +0000
Subject: #31602 [Fbk->Bgs]: tmpfile() fails
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-72580@lists.php.net to get a copy of this message
ID: 31602 Updated by: derick@php.net Reported By: stasonis at mcs dot suffolk dot edu -Status: Feedback +Status: Bogus Bug Type: Filesystem function related Operating System: Mandrake 10.1 PHP Version: 5.0.3 New Comment: It's a "bug" in the Mandrake package. I consulted with them and their reply was: OK. I have fixed that. TMP and TMPDIR points to /tmp now. Previousely these where zeroed out. Many runtime things can be set using the /etc/sysconfig/httpd file now. So please upgrade the their latest package (dated after today). Previous Comments: ------------------------------------------------------------------------ [2005-01-21 09:10:50] derick@php.net AFAIK does Mandrake clean the environment when starting apache, removing the TMP environment setting. This means that /root/tmp wil be chosen causing problems, as the webserver can't usually write to that. ------------------------------------------------------------------------ [2005-01-20 23:51:14] tony2001@php.net Please, execute echo $TMP in console as root and tell us what you got. ------------------------------------------------------------------------ [2005-01-19 01:48:47] stasonis at mcs dot suffolk dot edu Also, if I specify the file in imagegif(), ie: imagegof($im, "test.gif"); This works fine, even if I change the path of the file to "/tmp/test.gif" ps - I entered the wrong email on the last submission ------------------------------------------------------------------------ [2005-01-19 01:42:26] stasonis at mcs dot suffolk dot edu Description: ------------ I tried using imagegif to display an image and it gave the error: Warning: imagegif() [function.imagegif]: Unable to open temporary file in /home/stasonis/public_html/image.php on line 14 After testing the tmpfile function I realized this did not work either. Both the directory the script resides in and /tmp have rwx permissions for everyone, so I don't think it is a permissions issue Reproduce code: --------------- $temp = tmpfile(); if(!$temp){ echo "Failure"; return; } echo "Success"; Expected result: ---------------- Success to be echoed Actual result: -------------- Failure Echoed ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=31602&edit=1

« previous php.bugs (#72580) next »