By rl on
Hmm,
I installed Drupal 6 as a subdomain. I do this successfully with version 4, and 5. I get these warnings.
Warning: Couldn't fetch mysqli in /sdb/s158/home/pittsfor/public_html/trustees/includes/database.mysqli.inc on line 323
Warning: Couldn't fetch mysqli in /sdb/s158/home/pittsfor/public_html/trustees/includes/database.mysqli.inc on line 108
Warning: Couldn't fetch mysqli in /sdb/s158/home/pittsfor/public_html/trustees/includes/database.mysqli.inc on line 122
Any thoughts?
Rich
Comments
I tried this. Worked for me.
I poked around in my settings.php file to see what what up. I noticed that the database URL began with
$db_url = 'mysqli://.... That was different than my 5.0 installation. I changed it to$db_url = 'mysql://...and the warnings went away. I also can run clean URLS now.Hope this helps someone else.
Rich
your solution didn't work for me
I have the same problem but your solution didn't work for me. still trying to fix this and will post if I find a solution.
fixed - folder permissions
I thought I had successfully amended the "settings.php" file to change "mysqli" to "mysql" but it only appeared that way. I needed to set the permissions on the default folder to 777, copy the settings.php file to the local PC, change the text "$db_url = 'mysql:/..." then delete settings.php file on server and upload new version of file. Remember to change permissions on directory back to 555.
Convoluted method but it was the only way I could be sure what the file on the server said. I have now idea why it looked like the settings.php file had been amended successfully when working directly on the server copy. Would have saved me a day trawling through the Internet!
Hope this helps someone else
worked for me too. But?
It got rid of those nasty error messages but is this changing something that may cause problems down the road or is it just a bug? I'm using siteground too and it's seems anyone using siteground had to go through these same issues. I was just trying to understand the issue. I'm happy it worked and appreciate the posting.
JG
Siteground - Warning: Couldn't fetch mysqli in .../includes/data
I Neglected to mention that I was using siteground. I feel comfortable with switching the settings.php line from mysqli to mysql since that is the same way my drupal 5.x site works. There must be something in the installation and setup that makes drupal think that some feature is there when it is not fully functional. I do not have the experience to investigate this. Siteground is a popular hosting site, so I am sure others will experience this as well.
Rich
Where do you find the
Where do you find the settings.php file? I can't seem to find it anywhere.
modifying settings.php
François Granon - Paris
I had some difficulty finding settings.php and finally found it in this directory : drupal-6.0/sites/default
could someone explain this problem in depth : 1/ what is the difference between sql and sqli ? 2/why does drupal 6, on such a well known server as siteground, generates such an error ? 3/ Is the fix that I have been advised here to make (and that i made), ie replacing sqli with sql inside the settings.php file, a secure solution, or doest it risk to create other problems elsewhere ?
Is this problem the reason (or one of the reasons) why siteground doesn't provide, as a standard installation, Drupal 6, and installs only Drupal 5.3 ?
This issue is not limited to
This issue is not limited to Drupal 6. I am running into this as well on a Drupal 5 install. The site appears to work, so mysqli is presumably installed and configured properly. However, these same sorts of "Couldn't fetch mysqli" warnings are periodically dumped into the php error logs. While it's true that reverting from mysqli to mysql makes the warnings in the logs go away, it also does not seem like the ideal solution. The "i" in mysqli stands for "improved" -- it's purportedly faster and cleaner (and has become the default in Drupal 6) so we should probably use it if we can!
Although changing the connection string in settings.php cures the symptoms, the root cause of the problem remains unknown. Does anybody have any thoughts as to what could be happening? Too many connections? Something to do with the mysqli.reconnect setting in the php.ini?
Worked for me
I changed the line
$db_url = 'mysqli://root@localhost/db_drupal';
to be
$db_url = 'mysql://root@localhost/db_drupal';
and that took care of it for me. Drupal 6.19 on Windows 2000.