Closed Thread
Results 1 to 6 of 6

Thread: Uploading file problem

  1. #1
    HyDr@ is offline x10 Sophmore HyDr@ is an unknown quantity at this point
    Join Date
    Jul 2006
    Location
    UK - Kent
    Posts
    134

    Uploading file problem

    File (HyDrA-Art_KarimB_16342.jpg) uploaded!
    Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: gd-jpeg, libjpeg: recoverable error: Premature end of JPEG file in /home/hydra/public_html/hydraportfolio5/thumb.php on line 32

    Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: gd-jpeg: JPEG library reports unrecoverable error: in /home/hydra/public_html/hydraportfolio5/thumb.php on line 32

    Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: 'work/wallpaper/HyDrA-Art_KarimB_16342.jpg' is not a valid JPEG file in /home/hydra/public_html/hydraportfolio5/thumb.php on line 32

    Warning: Division by zero in /home/hydra/public_html/hydraportfolio5/thumb.php on line 35

    Warning: Division by zero in /home/hydra/public_html/hydraportfolio5/thumb.php on line 36

    Warning: imagecreatetruecolor() [function.imagecreatetruecolor]: Invalid image dimensions in /home/hydra/public_html/hydraportfolio5/thumb.php on line 38

    Warning: imagecopyresampled(): supplied argument is not a valid Image resource in /home/hydra/public_html/hydraportfolio5/thumb.php on line 41

    Warning: imagecolorallocate(): supplied argument is not a valid Image resource in /home/hydra/public_html/hydraportfolio5/thumb.php on line 46

    Warning: imageline(): supplied argument is not a valid Image resource in /home/hydra/public_html/hydraportfolio5/thumb.php on line 47

    Warning: imageline(): supplied argument is not a valid Image resource in /home/hydra/public_html/hydraportfolio5/thumb.php on line 48

    Warning: imageline(): supplied argument is not a valid Image resource in /home/hydra/public_html/hydraportfolio5/thumb.php on line 49

    Warning: imageline(): supplied argument is not a valid Image resource in /home/hydra/public_html/hydraportfolio5/thumb.php on line 50

    Warning: imagepng(): supplied argument is not a valid Image resource in /home/hydra/public_html/hydraportfolio5/thumb.php on line 51

    Warning: imagedestroy(): supplied argument is not a valid Image resource in /home/hydra/public_html/hydraportfolio5/thumb.php on line 52

    Warning: imagedestroy(): supplied argument is not a valid Image resource in /home/hydra/public_html/hydraportfolio5/thumb.php on line 53

    Dont see whats the problem, tried uploading the same image to my old host which contain all the same scripts, its fine with the other host, so I guess its the server problem or something... :dunno:

    Everything is perfectly fine except I can't upload images to the server through php.

    I think the problem is it cant create a thumbnail of the img Im uploading, something must be messed up with the library.
    Last edited by HyDr@; 08-20-2006 at 10:46 AM.

    - Portfolio of High quality Anime and Gaming Wallpapers/Website Creation/Anime Scans/Photoshop Tutorials
    - Devright.org ~ The right way to develop

  2. #2
    Brandon's Avatar
    Brandon is offline Fired Brandon is on a distinguished road
    Join Date
    Jun 2006
    Location
    Tewksbury, MA
    Posts
    9,579

    Re: Uploading file problem

    Quote Originally Posted by HyDr@
    Dont see whats the problem, tried uploading the same image to my old host which contain all the same scripts, its fine with the other host, so I guess its the server problem or something with the library... :dunno:

    Everything is perfectly fine except I can't upload images to the server through php.
    I think its saying the file is not a jpg...if you renamded the extention PHP wont beable to process it.
    Thanks,
    Brandon Long

  3. #3
    Bryon is offline Administrator Bryon has disabled reputation
    Join Date
    Apr 2005
    Location
    Northfield, NH
    Posts
    7,582

    Re: Uploading file problem

    By looking at this error:
    Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: gd-jpeg, libjpeg: recoverable error: Premature end of JPEG file in /home/hydra/public_html/hydraportfolio5/thumb.php on line 32
    I can tell that it is somethign wrong with the image file after it is uploaded, "Premature end of JPEG file." Thus the image functions are not able to manipulate the image, since it's not "valid."

    If you can/want to, post the script and I can take a look at it for you. :-)
    Last edited by Bryon; 08-20-2006 at 10:52 AM.

  4. #4
    HyDr@ is offline x10 Sophmore HyDr@ is an unknown quantity at this point
    Join Date
    Jul 2006
    Location
    UK - Kent
    Posts
    134

    Re: Uploading file problem

    im pretty sure it is, it does upload it on my other hosting, also I tried different jpg img, and all failed, lemme check the CHMOD, that MIGHT be the problem.


    to Bryon, k, wait a sec.................................

    also, have you seen my pm I sent you, i need some help, i can send the pm again.

    EDIT: nope, nothing to do with CHMOD :< also it doesnt work with ALL the jpeg files I upload... ^_^


    this is my script, its a bit rubbish, i never touched the library thing before.



    PHP Code:
    <?php

    $fileparts 
    explode("."$filename);
    if (
    $fileparts[1]==jpg)
    {
    $filetype="jpeg";}
    else
    if (
    $fileparts[1]==gif)
    {
    $filetype="gif";}
    else
    if (
    $fileparts[1]==png)
    {
    $filetype="png";}
    $imagecreatefrom='imagecreatefrom'.$filetype;
    $src_img $imagecreatefrom("work/$categories/$filename");
    $src_size getimagesize("work/$categories/$filename");
    $ratio=$src_size[0]/150;
    $dest_x $src_size[0] / $ratio;
    $dest_y $src_size[1] / $ratio;
    $dst_img imagecreatetruecolor
    ($dest_x$dest_y);
    imagecopyresampled($dst_img$src_img000,
    0$dest_x$dest_y$src_size[0], 
    $src_size[1]);


    $widthm1 $dest_x 1;
    $heightm1 $dest_y 1;
    $color imagecolorallocate($dst_img161171181);
    imageline$dst_img0,0$widthm10$color);
    imageline$dst_img$widthm10$widthm1$heightm1$color);
    imageline$dst_img$widthm1$heightm10$heightm1$color);
    imageline$dst_img0$heightm100$color);
    imagepng($dst_img"work/$categories/small_$filename");
    imagedestroy($src_img);
    imagedestroy($dst_img);
    $resolution="$src_size[0]"."x"."$src_size[1]";
    mysql_query("UPDATE `work` SET `resolution` = '$resolution' WHERE `filename` = '$filename'");
    ?>
    By the way, the script DID work for x10hosting a while back, didn't know when it started to cock up, its been like a month since I uploaded any wallpapers xD
    Last edited by HyDr@; 08-20-2006 at 11:24 AM.

    - Portfolio of High quality Anime and Gaming Wallpapers/Website Creation/Anime Scans/Photoshop Tutorials
    - Devright.org ~ The right way to develop

  5. #5
    HyDr@ is offline x10 Sophmore HyDr@ is an unknown quantity at this point
    Join Date
    Jul 2006
    Location
    UK - Kent
    Posts
    134

    Re: Uploading file problem

    Can someone help me?....

    - Portfolio of High quality Anime and Gaming Wallpapers/Website Creation/Anime Scans/Photoshop Tutorials
    - Devright.org ~ The right way to develop

  6. #6
    HyDr@ is offline x10 Sophmore HyDr@ is an unknown quantity at this point
    Join Date
    Jul 2006
    Location
    UK - Kent
    Posts
    134

    Re: Uploading file problem

    Problem solved, im pretty sure it was some kind of server problem, because it suddenly started working again

    - Portfolio of High quality Anime and Gaming Wallpapers/Website Creation/Anime Scans/Photoshop Tutorials
    - Devright.org ~ The right way to develop

Closed Thread

Similar Threads

  1. Mini File Host - Uploading script like rapidshare megaupload
    By fakhruddin in forum Scripts & 3rd Party Apps
    Replies: 10
    Last Post: 08-31-2006, 04:45 PM
  2. problem uploading
    By hyeclass in forum Scripts & 3rd Party Apps
    Replies: 13
    Last Post: 06-06-2006, 11:05 AM
  3. Problem editing a .tpl file
    By blaindugan in forum Free Hosting
    Replies: 2
    Last Post: 05-21-2006, 12:44 AM
  4. File permission problem
    By cetutnx1 in forum Free Hosting
    Replies: 6
    Last Post: 02-16-2006, 10:05 AM
  5. Index file problem
    By Pim in forum Free Hosting
    Replies: 2
    Last Post: 02-20-2005, 10:21 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers