This morning, I received a emails telling me that there is a big problem on a website that I host. Users are not able to upload any image on the server. (Warning: imagejpeg(): Unable to access 474/10434/59107.jpg in /www/libs/functions.php on line 226) Weird... The problem is in a daily used function which has been running for years. The only recent changed was the migration from v4.4.0 => v4.4.1 of PHP few days ago.
Because of the time difference, I only saw this problem when I woke up this morning. And fortunately, Julien has been able to find a temporary workaround... By disabling the safe mode... Dirty but it fixes the problem.
In the first place, I thought it was a change in the default configuration of PHP but I received a other email about the same kind of problems. Let's see the bug tracker of PHP... Ok, I am not the first one who has this issue.
http://bugs.php.net/bug.php?id=35060
http://bugs.php.net/bug.php?id=35071
One of the workaround that I found in this bug report is to make a touch() before calling the imagejpeg() function... Almost worster than the safe mode fix as I use it everywhere.
And I saw that Sniper is considering this as a feature (this is not a bug but a feature). Well, I don't see the point of touching a file before creating it after but well...
And people are complaining about this. Like this message :
Changing the way functions work within a minor update (version+=0.0.1) is an irresponsible way of maintaining software. This bug (please don't call it a "feature") caused a lot of trouble on our servers.
And I don't think that the way Sniper is any answering really help in the first bug report.
However, it seems that he considers this as a bug in the second bug report. The modification here shows it : http://cvs.php.net/php-src/ext/gd/php_gd.h (details here : http://cvs.php.net/diff.php/php-src/ext/gd/php_gd.h?r1=1.59.2.1&r2=1.59.2.2&ty=u).
Now, let's see if they are going to release a 4.4.1.1 version or we will stay with a safe_mode=off for a little while...
Edit : Comments closed. Thank you spammers.