Pixelpost Forum

Pixelpost Forum (http://www.pixelpost.org/forum/index.php)
-   Bug Report 1.4.x (http://www.pixelpost.org/forum/forumdisplay.php?f=19)
-   -   Thumbnail creation stopped... PHP 4.4.1 + 5.1 (http://www.pixelpost.org/forum/showthread.php?t=2699)

Connie 11-21-2005 08:58 AM

Thumbnail creation stopped... PHP 4.4.1 + 5.1
 
More and more of our users run into the problem with thumbnails not created...

changelog of PHP says:
http://www.php.net/ChangeLog-4.php#4.4.1
"Added missing safe_mode checks for image* functions and cURL."

but they test "readable" not "writeable"
if a file does not exist yet, it is not readable
that's why the test fails and thumbnail is not created

well, there are some infos out already:

http://bugs.php.net/bug.php?id=35060
http://bugs.php.net/bug.php?id=35071

the new PHP versions are buggy and so GD lib thumbnail creation fails
I could not find info at GD LIB homepage (www.boutel.com), but the 2 bug-infos show also the way to solve this:

Code:

touch($filename);
before
Code:

  $img = @imagecreatefromjpeg($image_path);
in functions.php / function createthumbnail($file)

Quote:

bool touch ( string filename [, int time [, int atime]] )
Attempts to set the access and modification time of the file named by filename to the value given by time. If the parameter time is not given, uses the present time. This is equivalent to what utime (sometimes referred to as utimes) does. If the third parameter atime is present, the access time of the given filename is set to the value of atime. Note that the access time is always modified, regardless of the number of parameters.

If the file does not exist, it is created. Returns TRUE on success or FALSE on failure.
could we do that in the near future and release that in BETA 1.5
and/or 1.4.3 / 1.4.4

we could also offer just an updated functions.php at the download-section for those who run into that..

germanseneca 11-22-2005 11:02 PM

I really would appreciate if you could offer any kind of soultion for this problem.

unseen 11-23-2005 03:47 AM

did you contact your host? i was having the same problem so i sent them a support ticket and they fixed the php on my site and it works now. send them a link to this thread too.

raminia 11-23-2005 12:21 PM

@Connie,
why don't you use file_exist function instead of touch?

Connie 11-23-2005 01:36 PM

Ramin,

I just cited what other people suggested, and the sexy behaviour of "touch" is that it creates the file if it is not existing

I did not go into any coding because it's not my time for being concise, you know, I made too many mistakes in the last time because of my influenca ;=)

but I think, both ways show possible solutions

raminia 11-23-2005 01:54 PM

you're great Connie.
yeah. I think both could be solutions. But people should not combine these two seperate solutions for seperate problems.

germanseneca 11-24-2005 09:21 PM

So, just replace $img = @imagecreatefromjpeg($image_path); with touch($filename);?
Did not work with my site. A bummer...
Anything else I can do?
Thanks
Richard

raminia 11-24-2005 10:21 PM

Quote:

Originally Posted by germanseneca
So, just replace $img = @imagecreatefromjpeg($image_path); with touch($filename);?
Did not work with my site. A bummer...
Anything else I can do?
Thanks
Richard

nope! search forum for PHP 5


All times are GMT. The time now is 03:43 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.