Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > MISCELLANEOUS > Archives > Bug Report 1.4.x

Post Reply
 
Thread Tools
  #1  
Old 11-21-2005, 08:58 AM
Connie
Guest
 
Posts: n/a
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..
Reply With Quote
  #2  
Old 11-22-2005, 11:02 PM
germanseneca Offline
pp regular
 
Join Date: May 2005
Posts: 33
I really would appreciate if you could offer any kind of soultion for this problem.
Reply With Quote
  #3  
Old 11-23-2005, 03:47 AM
unseen's Avatar
unseen Offline
pixelpost guru
 
Join Date: Oct 2005
Location: kentucky-ish
Posts: 110
Send a message via AIM to unseen
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.
__________________
with love, jade


...click
Reply With Quote
  #4  
Old 11-23-2005, 12:21 PM
raminia's Avatar
raminia+ Offline
Team Pixelpost
 
Join Date: Jan 2005
Location: FL, US
Posts: 3,706
Send a message via Yahoo to raminia
@Connie,
why don't you use file_exist function instead of touch?
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7
Reply With Quote
  #5  
Old 11-23-2005, 01:36 PM
Connie
Guest
 
Posts: n/a
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
Reply With Quote
  #6  
Old 11-23-2005, 01:54 PM
raminia's Avatar
raminia+ Offline
Team Pixelpost
 
Join Date: Jan 2005
Location: FL, US
Posts: 3,706
Send a message via Yahoo to raminia
you're great Connie.
yeah. I think both could be solutions. But people should not combine these two seperate solutions for seperate problems.
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7
Reply With Quote
  #7  
Old 11-24-2005, 09:21 PM
germanseneca Offline
pp regular
 
Join Date: May 2005
Posts: 33
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
Reply With Quote
  #8  
Old 11-24-2005, 10:21 PM
raminia's Avatar
raminia+ Offline
Team Pixelpost
 
Join Date: Jan 2005
Location: FL, US
Posts: 3,706
Send a message via Yahoo to raminia
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
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 04:20 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. | Style Design: d3 designs