Guest peppy Posted August 29, 2006 Share Posted August 29, 2006 Hey, I keep getting messages like this whan i upload an image... I checked all topics here but i dont get it anymore. Can someone please help me ? Warning: imagejpeg(): Unable to access /var/www/vhosts/grotesokken.nl/httpdocs/images/uploads/thumbs/thumb_IM000015.JPG in /var/www/vhosts/grotesokken.nl/httpdocs/classes/gd.inc.php on line 296 Warning: imagejpeg(): Invalid filename '/var/www/vhosts/grotesokken.nl/httpdocs/images/uploads/thumbs/thumb_IM000015.JPG' in /var/www/vhosts/grotesokken.nl/httpdocs/classes/gd.inc.php on line 296 this is the code: function save($save="") { global $config; if ($config['gdversion']==2) { $this->img["des"] = imagecreatetruecolor($this->img["width_thumb"],$this->img["height_thumb"]); @imagecopyresampled ($this->img["des"], $this->img["src"], 0, 0, 0, 0, $this->img["width_thumb"], $this->img["height_thumb"], $this->img["width"], $this->img["height"]); } elseif ($config['gdversion']==1) { $this->img["des"] = imagecreate($this->img["width_thumb"],$this->img["height_thumb"]); @imagecopyresized ($this->img["des"], $this->img["src"], 0, 0, 0, 0, $this->img["width_thumb"], $this->img["height_thumb"], $this->img["width"], $this->img["height"]); } if ($config['gdversion']>0) { // fix for base restriction error /* $fh = fopen($this->img["des"],'w'); fclose($fh); */ if ($this->img["format"]=="JPG" || $this->img["format"]=="JPEG") { //JPEG imagejpeg($this->img["des"],$save,$this->img["quality"]); } elseif ($this->img["format"]=="PNG") { //PNG imagepng($this->img["des"],$save); } elseif ($this->img["format"]=="GIF") { //GIF imagegif($this->img["des"],$save); } imagedestroy($this->img["des"]); @chmod($this->img["des"], 0644); } } the whole function with the error. Pepijn Gottschal Quote Link to comment Share on other sites More sharing options...
Guest airjer Posted August 29, 2006 Share Posted August 29, 2006 chmod 777 your /images/uploads and /images/uploads/thumbs folders Quote Link to comment Share on other sites More sharing options...
Guest peppy Posted August 29, 2006 Share Posted August 29, 2006 chmod 777 your /images/uploads and /images/uploads/thumbs folders I chmodded it all to 777, i started uploading again and now i get: Warning: imagejpeg(): Unable to access /var/www/vhosts/grotesokken.nl/httpdocs/images/uploads/thumbs/thumb_sneakersok_rwb.JPG in /var/www/vhosts/grotesokken.nl/httpdocs/classes/gd.inc.php on line 296 Warning: imagejpeg(): Invalid filename '/var/www/vhosts/grotesokken.nl/httpdocs/images/uploads/thumbs/thumb_sneakersok_rwb.JPG' in /var/www/vhosts/grotesokken.nl/httpdocs/classes/gd.inc.php on line 296 I think that was the if ($this->img["format"]=="JPG" || $this->img["format"]=="JPEG") { //JPEG imagejpeg($this->img["des"],$save,$this->img["quality"]); } part... What now ? ;) Quote Link to comment Share on other sites More sharing options...
Guest peppy Posted August 31, 2006 Share Posted August 31, 2006 Anyone ? I'm getting desperate of this... Quote Link to comment Share on other sites More sharing options...
Guest vrakas Posted September 1, 2006 Share Posted September 1, 2006 Is the GD set correctly? Quote Link to comment Share on other sites More sharing options...
Guest peppy Posted September 1, 2006 Share Posted September 1, 2006 I shall check it again... PHPinfo:gd GD Support enabled GD Version bundled (2.0.28 compatible) FreeType Support enabled FreeType Linkage with freetype GIF Read Support enabled GIF Create Support enabled JPG Support enabled PNG Support enabled WBMP Support enabled XBM Support enable in the setting of cubecart i have the following information: 2 Yes 75 390 80 I just tried it again and get the same message... Quote Link to comment Share on other sites More sharing options...
Guest peppy Posted September 8, 2006 Share Posted September 8, 2006 //solved Quote Link to comment Share on other sites More sharing options...
Guest vrakas Posted September 8, 2006 Share Posted September 8, 2006 And what was the problem if we may know? */* Quote Link to comment Share on other sites More sharing options...
Guest peppy Posted September 9, 2006 Share Posted September 9, 2006 something with GD, i just made in photoshop thumbnails from the origional pics and looked at other site's how the thubs are called. like if your photo called 'sock' then the thumb must be 'thumb_sock'. and that's how i solved it */* Quote Link to comment Share on other sites More sharing options...
Guest alholloway Posted September 13, 2006 Share Posted September 13, 2006 Hi I'm trying upload product pictures and although the show up on the detailed description there's no thumbnail. And, in fact, sometimes when I try to upload a jpg, I get this error. do you have any advice..? Fatal error: Call to undefined function: imagecreatefromjpeg() in e:\domains\t\turtlemouth.co.uk\user\htdocs\classes\gd.inc.php on line 49 Quote Link to comment Share on other sites More sharing options...
Guest peppy Posted September 13, 2006 Share Posted September 13, 2006 can you post the whole php block (where the function starts till it ends) ? Quote Link to comment Share on other sites More sharing options...
rowdyplace Posted September 13, 2006 Share Posted September 13, 2006 Hi I'm trying upload product pictures and although the show up on the detailed description there's no thumbnail. And, in fact, sometimes when I try to upload a jpg, I get this error. do you have any advice..? Fatal error: Call to undefined function: imagecreatefromjpeg() in e:\domains\t\turtlemouth.co.uk\user\htdocs\classes\gd.inc.php on line 49 Fought same problem. Changing server hosting companies was my solution...But look at this link: http://www.cubecart.com/site/forums/index....amp;#entry95905 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.