close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

I am getting Warning: Division by zero in

Thread began 9/02/2014 12:35 pm by danny405167 | Last modified 9/02/2014 1:43 pm by Jason Byrnes | 1506 views | 6 replies |

danny405167

I am getting Warning: Division by zero in

What is causing the errors below

Warning: Division by zero in /homepages/34/d356933685/htdocs/danny/webassist/caching/CachedResize_Image.php on line 274

Warning: Division by zero in /homepages/34/d356933685/htdocs/danny/webassist/caching/CachedResize_Image.php on line 274

Warning: Division by zero in /homepages/34/d356933685/htdocs/danny/webassist/caching/CachedResize_Image.php on line 278

Warning: imagecreatetruecolor() [function.imagecreatetruecolor]: Invalid image dimensions in /homepages/34/d356933685/htdocs/danny/webassist/caching/CachedResize_Image.php on line 105

Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: gd-jpeg: JPEG library reports unrecoverable error: in /homepages/34/d356933685/htdocs/danny/webassist/caching/CachedResize_Image.php on line 106

Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: '../../login/profile_pics/' is not a valid JPEG file in /homepages/34/d356933685/htdocs/danny/webassist/caching/CachedResize_Image.php on line 106

Warning: Division by zero in /homepages/34/d356933685/htdocs/danny/webassist/caching/CachedResize_Image.php on line 174

Warning: Division by zero in /homepages/34/d356933685/htdocs/danny/webassist/caching/CachedResize_Image.php on line 174

Warning: imagecopyresampled(): supplied argument is not a valid Image resource in /homepages/34/d356933685/htdocs/danny/webassist/caching/CachedResize_Image.php on line 199

Warning: imagejpeg(): supplied argument is not a valid Image resource in /homepages/34/d356933685/htdocs/danny/webassist/caching/CachedResize_Image.php on line 219

Sign in to reply to this post

Jason ByrnesWebAssist

I'll need to troubleshoot directly, see the private message section.

Sign in to reply to this post

danny405167

Ok

Sign in to reply to this post

danny405167

OK. I found the problem. Since there is no file name in the field of UserImage, image resizer is not able to do the calculation. Thanks for responding asap.

Sign in to reply to this post

Jason ByrnesWebAssist

see pm

Sign in to reply to this post

danny405167

The problem was that when I registered, I left the field name UserImage blank. I have to make the UserImage field name in the database to have a default value to prevent the warning from appearing again.

Sign in to reply to this post

Jason ByrnesWebAssist

put an if statement around the image tag to use a default static image if the recordset column is blank:

<?php if($row_SecurityAssistusers['UserImage'] !="") { ?>
<img src="../../login/profile_pics/<?php echo $row_SecurityAssistusers['UserImage']; ?>" class="img-thumbnail" width="200" height="200" alt="pfrofile">
<?php } else { ?>
<img src="../../login/profile_pics/default.jpg" class="img-thumbnail" width="200" height="200" alt="pfrofile">
<?php } ?>
Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...