Error
Database connect failed
Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /home/content/23/4876423/html/mycommunity/inc/classes/BxDolDb.php on line 431
Fatal error: Call to a member function getParam() on a non-object in /home/content/23/4876423/html/mycommunity/inc/db.inc.php on line 83
What is the best way to figure out why this keeps happening?
Csampson |
This is mean that database connection was failed. Try to refresh this page. And if you still have same error - you will need to check DB connection info in header file. |
Yes I see the Database connect failed thank you for that but whatever this was it brought my site down for about an hour at least for me anyway and was just curious if you recognize what causes something like that........ I was not working on the site nor was anyone else why would it do that as well as just go away? Csampson |
Yes I see the Database connect failed thank you for that but whatever this was it brought my site down for about an hour at least for me anyway and was just curious if you recognize what causes something like that........ I was not working on the site nor was anyone else why would it do that as well as just go away?
maybe your host rebooted servers
|
Or the database server hung.
https://www.deanbassett.com |
Or the database server hung.
Or... maybe there was no database all along? Maybe he was connecting to the Phantom Daemon, and no one realized it until now?
BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin |
Silly gremlins are messing with things again.
https://www.deanbassett.com |
Silly gremlins are messing with things again.
There's an inside joke you don't realize.
BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin |
Ok I am sure thank you for making me the brunt of the Joke i am sure.......All I want to do is understand........ Csampson |
https://www.deanbassett.com |
Error
Database connect
failed
Warning: mysql_error(): supplied argument is not a valid
MySQL-Link resource in /home/content/23/4876423/html/mycommunity/inc/classes/BxDolDb.php on line 444
Fatal error: Call to a member function getParam() on a
non-object in /home/content/23/4876423/html/mycommunity/inc/db.inc.php on line 83
Following the posts below this seems to be a phantom thing but again the site is down because of it. This happened on April 24th and no again today can anyone point me in the direction of how to avoid this issue? Last time it just went away what is the best way to track this down?
Csampson |
CSampson,
the error is stated, Database connect failed. There are many reasons for this to happen. however, based on the Warning and Fatal Error you are getting, this would appear to me to be some mod that has been included on your site, that has a bad sql statement or missing a terminator or has an extra apostrophe, or bad string for connect. what does line 444 on /inc/classes/DxDolDb.php have on it? and what does /inc/db.inc.php line 83 have?
furthermore here is what i found by running a query on google:
Warning: mysql_errno(): supplied argument is not a valid MySQL-Link
resource
If you are getting the above error during installation, this
means either:
1. One or more of the following is wrong in your config.php file: $servername (except in rare cases, this should almost always be left as
'localhost' or '127.0.0.1') $dbusername $dbpassword $dbname
If you are unsure of what the appropriate values are then you will need
to ask your web host.
2. Or that this db user is not assigned to that database or does not
have permission to access MySQL to create or access a database. You may
need to first manually create the database and assign the db user to it.
Since each web host is different, if you do not know how to do this
then contact your web host for help.
3. Or you are running MySQL 4.1.x. As of MySQL 4.1.X there is a new
password hashing system. PHP4 does not have builtin support for it as of
yet, however PHP5 does. In order for your old PHP4 MySQL clients to be
able to connect to the MySQL 4.1.X database you need to set an
OLD_PASSWORD. You should be able to run the following Query to make it
possible for PHP4 to access the MySQL 4.1.X database.
SET PASSWORD FOR 'username'@'localhost' =
OLD_PASSWORD('password');
More info is here: http://dev.mysql.com/doc/mysql/en/password-hashing.html
Error
Database connect
failed
Warning: mysql_error(): supplied argument is not a valid
MySQL-Link resource in /home/content/23/4876423/html/mycommunity/inc/classes/BxDolDb.php on line 444
Fatal error: Call to a member function getParam() on a
non-object in /home/content/23/4876423/html/mycommunity/inc/db.inc.php on line 83
Following the posts below this seems to be a phantom thing but again the site is down because of it. This happened on April 24th and no again today can anyone point me in the direction of how to avoid this issue? Last time it just went away what is the best way to track this down?
again, i would believe this to be some addon mod that has been applied and would look at these lines that are referenced in the error and work from there. when was the last time you backed up, and when was the last time you applied a mod? i would try to track that down from that perspective.
Regards,
DosDawg
When a GIG is not enough --> Terabyte Dolphin Technical Support - Server Management and Support |
Server CPU Spikes
Network - Ethernet Saturation / Spikes
MySQL Service Restarts
Ask your host about the performance of the server you are on...
:-) |
are you using RPX Integration? |
Ok I see there is some kind of error on that page so much so when called it shows database error.........
I have seen many e-mails about site name sent to me and researched it to a point of others asking the same question but no real answer. I changed the original site title done in the admin section of basic settings but totally confused on why there would be a site name issue?
It seems as if there is some kind of MAIL issue but again this site name error issue? Any thoughts about what caused this and or how to fix it.
Here is what is in the line for 431 - 467 I assume this is what is causing the line error on the other page BC it only has a bracket on that line of code? Only guessing.......but the issue seems to be here? HA HA obviously there is an error BC it says so.....
</div> <? } else echo $out;
if( DB_DO_EMAIL_ERROR_REPORT ) { $sMailBody = "Database error in <SiteName><br /><br /> \n";
if( strlen( $query ) ) $sMailBody .= "Query: <pre>" . htmlspecialchars_adv($query) . "</pre> ";
$sMailBody .= "Mysql error: " . mysql_error($this->link) . "<br /><br /> ";
$sMailBody .= $sFoundError. '<br /> ';
$sMailBody .= "Debug backtrace:\n <pre>" . htmlspecialchars_adv(print_r( $aBackTrace, true )) . "</pre> "; $sMailBody .= "Called script: {$_SERVER['PHP_SELF']}<br /> ";
$sMailBody .= "Request parameters: <pre>" . print_r( $_REQUEST, true ) . " </pre>";
$sMailBody .= "--\nAuto-report system\n";
//$sMailBody = '<pre>' . htmlspecialchars_adv($sMailBody) . '</pre>';
sendMail( $site['bugReportMail'], "Database error in <SiteName>", $sMailBody ); }
exit; }
function setErrorChecking ($b) { $this->error_checking = $b; }
function fromCache ($sName, $sFunc) {
Csampson |
The database name site error started about a week after I started my site and I soon just set it aside as something that just must not be that important. Well I would say this error is somehow tied to this error. As it is part of it and since others are seeing the same issue do you think anyone might understand what in the world causes it and how to fix it..... Csampson |
Csampson |
Csampson |
Well I don't want to calculate the odds on sever issues for three different people getting the same message about the same lines of codes? So is there an issue or we all just had back luck on the same day with the same lines of code? Hmmmmmm
http://www.boonex.com/unity/forums/#topic/Database-connect-failed-2010-05-10.htm
Csampson |
Same error here...
<div style="border:2px solid red;padding:4px;width:600px;margin:0px auto;"> <div style="text-align:center;background-color:red;color:white;font-weight:bold;">Error</div> <div style="text-align:center;">Database connect failed</div> </div> Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /home/xxxxx/domains/xxxxx.com/public_html/inc/classes/BxDolDb.php on line 447
Fatal error: Call to a member function getParam() on a non-object in /home/xxxxx/domains/xxxxx.com/public_html/inc/db.inc.php on line 83
Life is a fatal disease, sexually transmissible - Virginity is carcinogenic! Ask here for vaccine. |
@csampson1
The answer that DosDawg gave you was as good an answer as you can possibly hope for. Lots of infomation for you to consider, to read, to research, and to learn. None of the other replies were anywhere near as helpful. I'm getting the impression that you don't know anything at all or at least not very much about SQL Databases? Well, neither do I, but I've learned a few general things to help me with our own community.
1. Errors in your database can have an effect on your entire site (as you already know) ... 2. Which is why I never install additional mods without knowing what I'm getting into first, or ... 3. I pay a little extra for someone else to do the installation in order to avoid problems that I can't handle. 4. If you want to make changes and you're not a coder, keep such changes restricted to css files only. 5. Any other changes/additions need to be researched before they're being applied in order to avoid problems. 6. You never change or mess with any of the dolphin "guts" unless you really really know what you're doing.
This having been said, you should not be receiving Database errors if your server is up to par and if your installation was done correctly. Changing your site name shouldn't have anything to do with the DB at all ... unless you're saying that you've changed the site path to coincide with a new name which would definitely have an impact that would bring about DB error messages since your DB is directly tied to the information which was initially provided to it during the installation. Dolphin has to be handled with kid gloves as far as I'm concerned. The less you know about coding, sql, servers, and so on ... the more careful you need to be and try to change little to nothing at all ... aside from colors, fonts, and the things that you can adjust in the builders section of your admin panel. Sorry, I know this probably doesn't help, but at least it's something to keep in mind for the future if you ever start over with a fresh installation.
|
Life is a fatal disease, sexually transmissible - Virginity is carcinogenic! Ask here for vaccine. |
Do you have a dedicated server?
For some reason i remember godaddy, which IMO is the worst place to host dolphin.
But if you do have a dedicated, i would check your /etc/my.cnf database config file to see if the host that setup the server for you set any specific values to override the defaults.
You would be looking for settings like
max_c alt= 500 wait_timeout = 1800 c alt= 10 max_allowed_packet = 16M
Things such as that.
I am not getting any database errors. And code that has been posted so far matches mine. Nothing wrong with it.
Normally database errors of this type are problems with the database, database server, ect. So looking into the database server and config is a step that also needs to be taken other than problems with dolphin.
https://www.deanbassett.com |
@meinecommunity How long did it take you to figure that one out :) you are correct I know very little that is why I ask...... I do know enough to question all things and then filter out what I consider to be the reason based on the very little knowledge that I do have in programming. I am not sure what you mean by the additional posts not being helpful at all........Hmmmm plz clarify as I am very good with numbers and the odds on 4 different people haveing the same error with nearly the exact same lines on code give or take 5 lines or so is astronomical. My point being all the other posts about what can be wrong are all looked at and processed in my mind but it without question is a collective effort when several suffer from the same problem. In my attempt to draw attention to all of the posts a ticket has been opened by MichelSwiss:
Ticket added: http://www.boonex.com/trac/dolphin/ticket/2011
Pointing out the issue at hand...........
In the process I have researched the site name issue to the point of there are no answers in the forum. Don't ever think that for one second that I am not looking at all the available information as I am looking at and obsorbing as much as possible and when DosDog takes the time to post a reply that in depth do you think I don't read EVERY word just as I do with all the post that people take the time to respond to. Forums are a place to learn and most important APPLY LOGIC based on the information put in front of you.
I thank everyone including you for taking the time to help people who clearly are here to learn.
Having said that and applying logic and the odds of everthing that can take place. I see this issue as something needing further action and should have had a ticket opened as an issue and if you track back and do the research that I have done about the topics in the thread you will see I am correct. Again I am tracking down all issues but please remember one thing if you have an issue until it no longer surfaces ALL things are possible. If you don't find that issue odds are it will return. Thank you for your thoughts.......
Csampson |
This is not a permanent error... As for me, I got this error message only once. I don't think that this is due to some server config parameter (different people, different hosting providers, etc...).
Don't know if there could be any correlation... but when I got this error I was logged as Standard member, playing with the Profile page customizer and trying to publish a Shared theme... (I know that this is working for Admin only)
Life is a fatal disease, sexually transmissible - Virginity is carcinogenic! Ask here for vaccine. |
home/content/23/4876423/html/mycommunity/inc/db.inc.php on line 83
I don't know but this line 83 in that file appears quite a bit when people can't log into the database it appears over and over again through out the forum when people could not connect. I assume that is the crossing point or call to access the datbase to show the opening page of Dolphin.
I have had it just randomly appear which gives a lot of weight to server side issues. I have done nothing but changes to appearance things here and there but never the core programming of the site for obvious reasons. The only issues that I thought were just that was with the mapping upgrade provided by kgmap which puts events, ads and groups on the map which did cause database issues but the others sufferring from the same issue that started this thread do not have that upgrade do they?
It seems like to me without question that the path to the database goes through these lines stated as an issue I am correct on that assumption yes?
mhgotmd
Csampson |
Csampson,
My error actually is/was the MySql Server. I started hammering my sites and sure enough I started to run into MySql connect issues .. not only on Dolphin but on my Wordpress site as well. So, the "problem" is the two ERROR LINE's are erroneous in that they don't point to anything helpful and should be removed. the CANNOT CONNECT TO DATABASE is the error... the Line 444/431 and 83 are redundant, as nothing will work with the database down :) Those just appear because that is the first things any connection to the database does. "Check if Database Caching is On" (Line 444) and "Where do I send an Email if this thing is broken" (Line 83)
I use Hostgator Reseller account and I finally found the directory where logs are kept (hehe I know .. but I'm a Windows Admin so Linux hosting is still new) and it clearly showed Server Went Away issues.
While I was still peeking & poking Mysql crashed again and stayed crashed (on two sites .. D7 and Wordpress) long enough to get a tech to see it ... who ended up having to escalate it to Tier 2. They were still working on it when I went to bed so hopefully it has been corrected.
See if you can find some error logs in Control Panel or in one of the folders above the /HTML folder using FTP.
Syde
|
@Sydeburnz Im on it thanks........ Csampson |
I thank everyone including you for taking the time to help people who clearly are here to learn.
Having said that and applying logic and the odds of everthing that can take place. I see this issue as something needing further action and should have had a ticket opened as an issue and if you track back and do the research that I have done about the topics in the thread you will see I am correct. Again I am tracking down all issues but please remember one thing if you have an issue until it no longer surfaces ALL things are possible. If you don't find that issue odds are it will return. Thank you for your thoughts.......
.
Well, thank you, but ... As far as I'm concerned there's way too much about Dolphin that has nothing at all to do with Logic anymore. So applying logic to D7 is in my opinion sheer folly which will cause you to yank your own hair out later on. For one you have to consider the fact (agreed upon often in many many posts here in the forum) that there's a lot of stuff about Dolphin that simply doesn't make a lot of sense ... hence you're missing logic right there for those particular issues, and believe me, I too love logic.
Having said that I need to personally consider the fact (even if you don't) that simply disabling phpIDS functions on our D7 setup not only corrected the issues with redundant (or so it seemed) error messages, but on top of this there were at least 4 additional instant fixes that took place simultanously, just like at the flick of a switch. This too completely defies logic and baffles me but I'm the only one who's messing with our D7 setup and so I know for a fact that on that particular day nothing else was done after disabling phpIDS.
And thirdly you have to consider our own physical server setup. We have a dedicated server for our D7 site and we hired a knowledgeable server admin to make darn sure that anything and everything was installed and in place before the installation of D7. This was actually quite affordable at under 100.00 USD. Then we paid for the professional installation of D7 as well as purchasing a few mods which were also professionally installled. So for less than 300.00 USD total we've had D7 plus mods installed and we're experiencing *ZERO* actual usage problems thus far. No more erros either and that's why I can't help but continue to wonder if most of the problems aren't coming from missing/incorrect settings in the php.ini file or the .htaccess file or a missing server mod that's required or a security conflict between existing security and phpIDS, and so on. I'm primarily a graphic artist and language translator who plays around with html/xhtml/javascripts and css. So how come our D7 setup seems to be running so smoothly .... ???
|
Rules → http://www.boonex.com/terms |
MAX Connections may be a limiting and contributing factor, especially on shared hosts. I stumbled upon a Thread at Hostgator (OP dated 2007 but as it was at the top of the forum so it may still be in play) that stated they limit SHARED hosting accounts to 25 MySql simultaneous connections. ... ick
Syde
|
So how come our D7 setup seems to be running so smoothly .... ???
The Dedicated server. Everything else was a waste of money
Syde
|
This is my php.ini file I don't see what you are asking me to change am I missing something I need to add to this file?
register_globals = off allow_url_fopen = on
expose_php = Off max_input_time = 3000 variables_order = "EGPCS" extensi alt= ./ upload_tmp_dir = /tmp precisi alt= 12 SMTP = relay-hosting.secureserver.net url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset=" asp_tags="1" [Zend] zend_extension=/usr/local/zo/ZendExtensionManager.so zend_extension=/usr/local/zo/4_3/ZendOptimizer.so
memory_limit = 500m post_max_size = 1000M file_uploads = On upload_max_filesize = 1000M max_executi alt= 300
Csampson |
This is my php.ini file I don't see what you are asking me to change am I missing something I need to add to this file?
register_globals = off allow_url_fopen = on
expose_php = Off max_input_time = 3000 variables_order = "EGPCS" extensi alt= ./ upload_tmp_dir = /tmp precisi alt= 12 SMTP = relay-hosting.secureserver.net url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset=" asp_tags="1" [Zend] zend_extension=/usr/local/zo/ZendExtensionManager.so zend_extension=/usr/local/zo/4_3/ZendOptimizer.so
memory_limit = 500m post_max_size = 1000M file_uploads = On upload_max_filesize = 1000M max_executi alt= 300
|
Could that help to use @mysql_connect rather than @mysql_pconnect ? Life is a fatal disease, sexually transmissible - Virginity is carcinogenic! Ask here for vaccine. |
Could that help to use @mysql_connect rather than @mysql_pconnect ?
Yes. This would cause available connections to max out very quickly. IMHO connections should only persist for the duration of the script, at which point the buffers should be flushed to free up memory.
/DM
Dolphin - Ajax Masturbation |
Also - from php.net
Warning
Using persistent connections can require a bit of tuning of your
Apache
and MySQL configurations to ensure that you do not exceed the number
of
connections allowed by MySQL.
Not a very good thing to use within a distro that will be run on a variety of servers with a variety of different configurations
It's no wonder there are memory issues
/DM
Dolphin - Ajax Masturbation |
Using persistent connections can require a bit of tuning of your
Apache
and MySQL configurations to ensure that you do not exceed the number
of
connections allowed by MySQL.
Not a very good thing to use within a distro that will be run on a variety of servers with a variety of different configurations
It's no wonder there are memory issues
/DM
.
AMEN to that. I can only repeat what I said before ... why on earth would anyone, with the expectation to have tens of thousands of members with potentially hundreds of thousands of files, run a community site (ANY community site) on anything but a dedicated server? Anything less is bound to increase the magnitude for errors/problems exponentially.
|
For those who want to try... just replace @mysql_pconnect with @mysql_connect (delete the p) in the file inc/classes/BxDolDb.php (line 78).
Maybe just an impression, but seems like the site is loading even faster...
Life is a fatal disease, sexually transmissible - Virginity is carcinogenic! Ask here for vaccine. |
I want a $3,000,000 house as well........ Csampson |
I want a $3,000,000 house as well........
.
Geeez, what a ridiculous remark ... If you shop around for a few hours you'll find a halfway decent root server for around 100 dollars per month. It's a big web out there and with payment services like paypal you can hunt down root servers in Canada, Australia, England, America, and so on. With FTP and SSH access it doesn't even matter where you're located, if in a 3 million dollar mansion or just a log cabin with dialup access. (ugh)
Even a small root server is a million times better than any shared service ... not to mention the upgrade hassles/dangers that you save yourself a year or two down the road when you MUST upgrade servers due to the amount of members that you have (then). It's only LOGICAL to do the best you can right from the get-go if you plan on using Dolphin for commercial purposes. Just imagine how quickly your income potential will blow up in your face when you do wind up with an upgrade filled with problems on a shared server (regardless what the reasons are) and then losing tons of your members as well as a hard earned reputation. Oh yeah, a community with the potential of myspace or youtube on a shared server, now that makes sense and is the logical way to go about it, right?
|
If you are on a shared hosting account (I am too) you SHOULD NOT use persistant connections .. it sounds cool, but it really isn't when Shared Hosts are limiting the number of simultaneous connections. Why hold the door open, letting out the conditioned air, for people on the sidewalk looking in?
Thanks for the tip .. I envisioned tracking down p_connects like everything else we want to change in D7 ... with a fifth of whiskey and a can do, won't stop attitude :)
Syde
|
You missed the point and I don't want to explain it to you.........It was a joke............
@meinecommunity of course that is the way to go and really you have no choice if you want to use ALLLLLL the features us people on shared servers know you can't use the the video comments BC you can't open the proper windows to be able to use that feature. Personally I am testing this site everyday on a shared server with GoMomma and I chose to do that BC it is the cheapest way out and when I am satisfied that everything is the way I want it to be I of course will go to a dedicated server but in case anyone didn't notice this system is a BEAST at best and takes quite a bit of thinking to just learn all the possible features that are available let alone how to apply them and or teach people how to use them let alone taking the time it takes to wonder why it did not connect up to the database today for a different line of code. I understand that you are making great points but until I get proper funding to promote this for what it can be I am going to hang out in the cheapest way I can as that makes sense to me....
Csampson |
I have the same problem... Database connect failed
No MOD installed...
I have this problem only since 7.0.1
http://www.boonex.com/unity/forums/topic/Database-connect-failed-2010-05-10.htm
Big big problem for our customer...
|
With : mysql.allow_persistent = Off in php.ini.... all is ok now ...
|
In addition to the above listed suggestions I would also offer this suggestion. Try checking to see if your
- $dbusername
- $dbpassword
- $dbname
have changed.
I tried a little experiment where I changed the mySQL database user name on the server and was able to reproduce the same errors,
I also changed the user account password, followed by deleting the entire account and was able to reproduce these errors. But when i changed the mySQL back to the original information everything worked just fine.
|
It is not dolphin related problem, it is server configuration related things.
Try to increase max number of connections in /etc/my.cnf to MySQL server (you need root access)
note: write it without spaces
Also it may help if php closes connection to mysql server each time, it may cause a little delay but help to get rid of this error, change the following option in php.ini to Off:
Also it maybe other configuration settings which cause this error, contact your hosting support for the exact cause of the problem.
Deano's recommendations may help too.