akop Posted September 20, 2006 Share Posted September 20, 2006 Hello dear freaks!The script in question works with [color=blue]GD library[/color] and what it is doing normally is creating several copies of original image that was submitted via form. Like this:[color=green]$img->set_size(150, 150, "-");$img1->set_size(550, 550, "-");$img2->set_size("2250", "2250", "-");$img2->set_size("1500", "1500", "-");[/color]and some other sizes.Everything worked perfectly with my old provider but with the new provider problems started:Now it stops somewhere in the middle without any warnings or mistakes. Looks like this:Creating Database record... DoneCreating Thumbnails... DoneCreating an intermediate size inamges... DoneCreating watermark... DoneCreating an origanal size previews... DoneCreating Cover size version... DoneCreating Double size version... DoneCreating 2250 x 1490 px version... Done[color=red]Creating 1500 x 1000 px version...[/color]Now the page finished loading like if the program has reached it's end. But it did not. I’m sure that the code is fine – I tested it on three other servers and it worked perfect there. max_execution_time is set to 150, all other php settings look fine at least for me. Anyway, here is the link to phpinfo page: http://www.photo-traveller.net/phpini.phpSo the question is what might actually be the problem there?I also need to mention that the provider is very careful about security aka its own safety: there are a lot’s of restrictions when it comes to server configuration. The only thing I managed to change is put php.ini in the root folder with increased max_execution_time but it didn’t help :(. ???Thank you for any suggestions!Alex Quote Link to comment Share on other sites More sharing options...
redarrow Posted September 20, 2006 Share Posted September 20, 2006 Your best bet as it worked fine, is to get the old php.ini that did work, and try to configure the new php.ini to the old one match them up and see the diffrence.good luck.apart from that you have to let us see the code ok.dont forget that php version differ for programming example if you use an old php version thenn you get a new version your need to use the $_GET or $_POST statement.anyway good luck m8 Quote Link to comment Share on other sites More sharing options...
akop Posted September 20, 2006 Author Share Posted September 20, 2006 hi redarrow,here is the code without classes please check it first. With red I marked the place where it stops. As you can see the parts of the program that has been done immediately before are exactly of the same nature that means that is they are OK, the next one should be OK as well. And I also tried to change the order of them which didn’t help: the program now stops after the same period of time but during other resampling.[color=navy][size=10pt] // Creating thumbnails print "<b>Creating Thumbnails...</b>"; $img = new ss_image($orig_img, "f"); $img->set_size(150, 150, "-"); $new_name = $reference; $img->output($where="../photos/preview_small/".$new_name, $what="c", $method="JPG"); print " <i>Done</i><br>"; // Creating intermediate size preview print "<b>Creating an intermediate size inamges...</b>"; $img1 = new ss_image($orig_img, "f"); $img1->set_size(550, 550, "-"); $img1->commit(); print " <i>Done</i><br>"; // Watermark for intermediate size image print "<b>Creating watermark...</b>"; $img1->watermark("../images/watermark_small.gif", $transparency=20, $x=20, $y=20, $makegray=true, $src_kind="f", $desired_w="*",$desired_h="*"); $img1->output($where="../photos/preview_big/".$new_name, $what="c", $method="JPG"); print " <i>Done</i><br>"; // Creating preview with original size and watermarks print "<b>Creating an origanal size previews...</b>"; $img2 = new ss_image($orig_img, "f"); $img2->set_size("*", "*"); $img2->commit(); print " <i>Done</i><br>"; // Watermark for original size previews $img2->watermark("../images/watermark.gif", $transparency=20, $x=20, $y=20, $makegray=true, $src_kind="f", $desired_w="*",$desired_h="*"); $img2->output($where="../photos/preview_orig_size/".$new_name, $what="c", $method="JPG"); // Creating cover and double versions $path = "../photos/cover/".$new_name; print "<b>Creating Cover size version...</b>"; if(!copy($orig_img, $path)) { print "Couldn't copy the cover size file..."; } else { print " <i>Done</i><br>"; } print "<b>Creating Double size version...</b>"; $path = "../photos/double/".$new_name; if(!copy($orig_img, $path)) { print "Couldn't copy the double size file..."; } else { print " <i>Done</i><br>"; } // Creating 1/2 (2250 x 1490 px) size version print "<b>Creating 2250 x 1490 px version...</b>"; $img2 = new ss_image($orig_img, "f"); $img2->set_size("2250", "2250", "-"); $img2->output($where="../photos/size_2250/".$new_name, $what="c", $method="JPG"); $img2->commit(); print " <i>Done</i><br>"; // Creating 1/4 (1500 x 1000 px) size version [color=red]print "<b>Creating 1500 x 1000 px version...</b>";[/color] >:( $img2 = new ss_image($orig_img, "f"); $img2->set_size("1500", "1500", "-"); $img2->output($where="../photos/size_1500/".$new_name, $what="c", $method="JPG"); $img2->commit(); print " <i>Done</i><br>"; // Creating 1/8 (750 x 496 px) size version print "<b>Creating 750 x 496 px version...</b>"; $img2 = new ss_image($orig_img, "f"); $img2->set_size("750", "750", "-"); $img2->output($where="../photos/size_750/".$new_name, $what="c", $method="JPG"); $img2->commit(); print " <i>Done</i><br>"; // Copy original images to a new location $path = "../photos/originals/".$new_name; print "<b>Coping Original images into new location...</b>"; if(!copy($orig_img, $path)) { print "Couldn't copy the original file..."; } else { print " <i>Done:</i>: <b><font color=\"green\" size=\"130%\">".$new_name."</font></b> was inserted<br>"; }[/size][/color] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.