Zymic Forums

Webmaster resources

Zymic IRC Server

Chat in real time at irc.zymic.com - Learn More

Welcome

Welcome to the Zymic webmaster forums. Our forums are here to provide people the free ability to discuss a range of websites related topics such as design, development coding and marketing.

In order to post you will need to register for a zymic account or if you already have one simply login by using the form on the left.

left Zymic Webmaster ForumsZymic Free Web HostingDatabases & MySQL right
  Reply to this topic Start new topic
left right
The_Boss
post Apr 16 2011, 12:00 AM
Post #1


Newbie
*

Group: Members
Posts: 2
Joined: 15-April 11
Member No.: 186,656



So that's the error log :
QUOTE
Can't connect to database! Too many connections Line 114 : mysql.class.php


Normally, in morning to evening, my database works fine, and i can access to my website, but, in the night, i can't access to it (the page loads eternally) and 1 or 2 hours after, i got the error.

Yesterday, it works fine at 07:50:06 (France time), so the error continued from the night, to 7h.
Please help me, i have some visitors in the night !

Thank you. (ans sorry for my bad english)
Go to the top of the page 
 
  + Quote Post
ssfdre38
post Apr 17 2011, 04:22 PM
Post #2


THE SILENT FORUM NINJA
*******

Group: Administrators
Posts: 3,711
Joined: 23-January 10
From: on your screen
Member No.: 127,507



can you please show line 114 so we can see what the error is talking about
Go to the top of the page 
 
  + Quote Post
The_Boss
post Apr 18 2011, 12:51 AM
Post #3


Newbie
*

Group: Members
Posts: 2
Joined: 15-April 11
Member No.: 186,656



Hi .

112 : if($errors_management)
113 : {
114 : $this->_error('','Can\'t connect to database!',__LINE__,__FILE__);
115 : }
116 : else
117 : {
118 : return CONNECTION_FAILED;
119 : }

I think it's because simultaneous connections, but how i fix it ?

Thank you ssfdre38 !
Go to the top of the page 
 
  + Quote Post
adam007
post Jul 6 2011, 07:05 AM
Post #4


Ninja
***

Group: Members
Posts: 104
Joined: 27-June 11
Member No.: 196,019



use this code

<?php
// Connects to Our Database
mysql_connect("your.hostaddress.com", "username", "password") or die(mysql_error());
mysql_select_db("Database_Name") or die(mysql_error());
?>
Now, whenever we need to connect to our database, we just include this line in our PHP file:
//MySQL Database Connect
include 'datalogin.php';
Go to the top of the page 
 
  + Quote Post
 Reply to this topic Start new topic
left right
0 Members:
left right
 


Lo-Fi Version Time is now: 25th May 2013 - 03:06 PM