Guest reb_76 Posted April 3, 2007 Share Posted April 3, 2007 I created a store for a client. (http://naturekiddos.com) The store was fully functional. GD was enabled, version 2. The client began using the store. She put some items on sale. When she decided to change the items back to full price, the store began generating a 'call to undefined function' fatal error. I disabled the GD settings, as per the help topic here. It no longer generates a fatal error. It also no longer generates thumbnails in the store, although it does in the admin section. Even though I've utilized search, I can not find A: what takes a fully functional store and changes to a fatal error simply by taking an item off sale B: why fixing the fatal error means no images show up in the customer side of the store. All help is appreciated! Quote Link to comment Share on other sites More sharing options...
Guest reb_76 Posted April 3, 2007 Share Posted April 3, 2007 anyone have any ideas? thanks! Quote Link to comment Share on other sites More sharing options...
Guest reb_76 Posted April 4, 2007 Share Posted April 4, 2007 I talked to the server owner - no changes have been made on the server since I uploaded the store, and no changes have been made to the source code. the *only* thing that changed was making an item be on sale, then editing the item. is this a CubeCart bug? Quote Link to comment Share on other sites More sharing options...
markscarts Posted April 4, 2007 Share Posted April 4, 2007 It sounds like it may be, but I'm unfamiliar with the issue. What was the error message? It would tell you the name of the undefined function. That is where the problem lies, I suppose. Disabling GD would mean that no thumbs will be created automatically, simple as that. I'm sure someone will correct me if I'm wrong, IMO you need to RESTORE the GD settings, if you still get the error, copy down the entire error. Find out where the actual cause of this error is and correct the code. Disabling GD is not the answer; it may have been offered as a way to get the store back online temporarily, but that is not a solution. Quote Link to comment Share on other sites More sharing options...
Guest reb_76 Posted April 4, 2007 Share Posted April 4, 2007 Thanks for the reply, Mark! Here's my original thread with this: original post Fatal error: Call to undefined function ImageCreateFromJPEG() in /home/natureki/public_html/store/classes/gd.inc.php on line 47 Believe it or not, the help desk's solution was to disable GD Like I said, everything was working fine - and is still working on the products that weren't on sale. Quote Link to comment Share on other sites More sharing options...
Guest reb_76 Posted April 4, 2007 Share Posted April 4, 2007 here's the applicable code - are there any problems with it that you can see? class thumbnail { var $img; function thumbnail($imgfile="",$width="",$height="") { global $config; //detect image format $this->img["format"]=ereg_replace(".*\.(.*)$","\\1",$imgfile); $this->img["format"]=strtoupper($this->img["format"]); if($config['gdversion']>0) { if ($this->img["format"]=="JPG" || $this->img["format"]=="JPEG") { //JPEG $this->img["format"]="JPEG"; $this->img["src"] = imagecreatefromjpeg($imgfile); } elseif($this->img["format"]=="PNG") { //PNG $this->img["format"]="PNG"; $this->img["src"] = imagecreatefrompng($imgfile); } elseif ($this->img["format"]=="GIF") { //GIF $this->img["format"]="GIF"; $this->img["src"] = imagecreatefromgif($imgfile); } else { //DEFAULT echo "Not Supported File!"; exit(); } if($width>0 && $height>0) { Quote Link to comment Share on other sites More sharing options...
markscarts Posted April 5, 2007 Share Posted April 5, 2007 OK, well it is probably a bug with php version at your host's server if that GD function is not working. You should report that to your webhost 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.