Post by madfish » Fri Feb 22, 2013 8:53 am

Hello,

my server crashes all of sudden with this error : Warning: mysql_connect(): Too many connections in /home/profumino/public_html/system/database/mysql.php on line 6 Error: Could not make a database connection using root@localhost Warning: mysql_close() expects parameter 1 to be resource, boolean given in /home/profumino/public_html/system/database/mysql.php on line 67

In the opencart log i find this (the error comes every 30seconds ) :


2013-02-22 1:15:24 - PHP Warning: imagecopyresampled() expects parameter 2 to be resource, null given in /home/profumino/public_html/system/library/image.php on line 87
2013-02-22 1:15:24 - PHP Warning: imagedestroy() expects parameter 1 to be resource, null given in /home/profumino/public_html/system/library/image.php on line 88
2013-02-22 1:15:53 - PHP Warning: imagecopyresampled() expects parameter 2 to be resource, null given in /home/profumino/public_html/system/library/image.php on line 87
2013-02-22 1:15:53 - PHP Warning: imagedestroy() expects parameter 1 to be resource, null given in /home/profumino/public_html/system/library/image.php on line 88
2013-02-22 1:16:10 - PHP Warning: imagecopyresampled() expects parameter 2 to be resource, null given in /home/profumino/public_html/system/library/image.php on line 87
2013-02-22 1:16:10 - PHP Warning: imagedestroy() expects parameter 1 to be resource, null given in /home/profumino/public_html/system/library/image.php on line 88
2013-02-22 1:16:10 - PHP Warning: imagecopyresampled() expects parameter 2 to be resource, null given in /home/profumino/public_html/system/library/image.php on line 87
2013-02-22 1:16:10 - PHP Warning: imagedestroy() expects parameter 1 to be resource, null given in /home/profumino/public_html/system/library/image.php on line 88
2013-02-22 1:16:24 - PHP Warning: imagecopyresampled() expects parameter 2 to be resource, null given in /home/profumino/public_html/system/library/image.php on line 87
2013-02-22 1:16:24 - PHP Warning: imagedestroy() expects parameter 1 to be resource, null given in /home/profumino/public_html/system/library/image.php on line 88
2013-02-22 1:16:56 - PHP Warning: imagecopyresampled() expects parameter 2 to be resource, null given in /home/profumino/public_html/system/library/image.php on line 87
2013-02-22 1:16:56 - PHP Warning: imagedestroy() expects parameter 1 to be resource, null given in /home/profumino/public_html/system/library/image.php on line 88
2013-02-22 1:17:20 - PHP Warning: imagecopyresampled() expects parameter 2 to be resource, null given in /home/profumino/public_html/system/library/image.php on line 87
2013-02-22 1:17:20 - PHP Warning: imagedestroy() expects parameter 1 to be resource, null given in /home/profumino/public_html/system/library/image.php on line 88



What should I do ??? Thank you.

My fragrance parfum site profumi


New member

Posts

Joined
Thu Dec 03, 2009 8:49 pm


Post by JAY6390 » Fri Feb 22, 2013 9:19 am

They are two unrelated issues, though the second may inadvertently be caused by the first. The first is pretty simple. Your server can't handle the number of requests to MYSQL meaning your database is overloaded with connections. If you're on a shared server this is pretty common. The second error is because your image likely doesn't exist, possibly because the image name can't be retrieved from the database as a result of the mysql error

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by madfish » Fri Feb 22, 2013 9:30 am

Thank your for your answer. Well I dont use a shared server, but a VPS.

Yes I understand, but the problem started 3 hours ago, until than it worked fine. Is there anyone able to take a look ? I will pay for the service of course.

My fragrance parfum site profumi


New member

Posts

Joined
Thu Dec 03, 2009 8:49 pm


Post by JAY6390 » Fri Feb 22, 2013 9:36 am

It appears your traffic is causing the mysql error and there's little other than configuration or a better server that will accomodate this. If you have a host that offers tech support, I would recommend you contact them first to see if they can fix the issue as it may even be a problem with the server

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by cheepnis » Thu Apr 04, 2013 6:57 pm

I've been getting a lot of the second errors, but no issues with mysql. This seems to be during an image resize function, based upon the code that triggers it. Any ideas?

PHP Warning: imagecopyresampled() expects parameter 2 to be resource, null given in /home/renamed/public_html/store/system/library/image.php on line 109
PHP Warning: imagedestroy() expects parameter 1 to be resource, null given in /home/renamed/public_html/store/system/library/image.php on line 110

http://www.CheesyFlix.com


User avatar
New member

Posts

Joined
Fri Feb 15, 2013 3:56 am

Post by cheepnis » Sat May 04, 2013 9:44 am

I think I found the problem. This function cannot handle BMG image files. File was converted to jpg and the problem seems to have gone away. 8)

http://www.CheesyFlix.com


User avatar
New member

Posts

Joined
Fri Feb 15, 2013 3:56 am

Post by Thales3 » Sun Oct 06, 2013 4:51 pm

I get the same errors :
...PHP Warning: imagecopyresampled() expects parameter 1 to be resource, null given in...
...PHP Warning: imagecopyresampled() expects parameter 2 to be resource, null given in...
but i don't have any file with BMP extension.
Any ideea how to solve this ?

New member

Posts

Joined
Fri Sep 20, 2013 10:58 pm

Post by butte » Mon Oct 07, 2013 1:33 pm

You can check images' integrities locally before sending them up (initially or after testing) by using badpeggy (http://download.cnet.com/Bad-Peggy/3000 ... 91203.html and https://github.com/coderslagoon/BadPeggy among others). It was useful in reviewing images in context of a bad feed at http://forum.opencart.com/viewtopic.php ... 18#p439018 .

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by khantisari » Fri Jul 24, 2015 6:01 pm

yes, this thread help me.. and the bmpg file is the trouble.. and delete it.. everything is fine

baju korea | baju import


Newbie

Posts

Joined
Fri Jul 13, 2012 5:16 pm

Post by techpertz » Sun Oct 02, 2016 7:47 am

Same Issue...
Warning: imagecopyresampled() expects parameter 2 to be resource, null given in /home/kondlibazar121/public_html/system/library/image.php on line 118Warning: imagedestroy() expects parameter 1 to be resource, null given in /home/kondlibazar121/public_html/system/library/image.php on line 119

and one more thing
When I add an image while adding product from admin then the image is not visible on image popup window but it shows link just like visible image and is being selected on clicking on it, now there on main window of product adding (Data tab) it is not visible. And It's not visible on Store as well.

Screenshots are attached.

FYI: I switched my website from a Hostingraja's server to GoDaddy's VPS
It was working fine on old server

OC Version 2.1.0.1

It seems that I have to go to old server. GoDaddy's Team (Indian Team) is a worst tech team. They just ask to upgrade the package instead of sorting the issue. Well it's long story... :(

Please HELP

Thanks

Attachments

Image-uploading-issue-2.png

Image-uploading-issue-2.png (110.6 KiB) Viewed 4804 times

Image-uploading-issue.png

Image-uploading-issue.png (136.91 KiB) Viewed 4804 times


Newbie

Posts

Joined
Sun Feb 16, 2014 5:15 am
Who is online

Users browsing this forum: No registered users and 123 guests