Closed (fixed)
Project:
Drupal core
Version:
5.0
Component:
base system
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
9 Dec 2006 at 22:36 UTC
Updated:
5 Feb 2007 at 02:30 UTC
Jump to comment: Most recent file
My system: PHP 5.2.0, extension only mysqli.
When not install CMS (just copy files) index page show warning "PHP MySQL support not enabled".
Solution: add verification mysqli_* function and edit "\includes\database.mysql.inc" row 57 like this:
if (!function_exists('mysql_connect') && !function_exists('mysqli_connect')) {
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | mysql_db_check.patch | 1.33 KB | asimmonds |
Comments
Comment #1
Uwe Hermann commentedCan you reproduce this on a more recent Drupal version? Does it prevent you from installing Drupal or is it merely a warning? In the first case this would be a critical issue, IMHO.
Comment #2
4matic commentedDownload last version . Same problem. I cant install Drupal because have only warning:
Niether forms nor links that propose install Drupal.
Change status to critical.
Comment #3
4matic commentedMy solution is stupid in first post.
Comment #4
Uwe Hermann commentedConfirmed in 5.0. To reproduce, remove
extension=mysql.sofrom your PHP config file and restart Apache. Then try to install Drupal 5.0. It will fail with the above mentioned error.This is indeed critical IMHO.
Comment #5
Uwe Hermann commentedComment #6
moshe weitzman commenteddoes anyone's php ship without mysql extension? if not, i think we can downgrade this.
Comment #7
chx commentedI would dare to say that most Unix/Linux distributions ship without almost any PHP extension per default. Think of the FreeBSD (or was it NetBSD?) where the system comes without PCRE which is enabled in the normal PHP distribution but not there.
Comment #8
4matic commentedI disabled all unnecessary extensions on my server. Server is more faster and stable. mysql extention is deadend extention IMHO.
Comment #9
asimmonds commentedThe problem here is that Drupal is trying to connect to the database with the default $db_url, and if the
mysql module doesn't exist, then the redirect to ./install.php is not produced.
This only happens if ./index.php is called first, going directly to ./install.php works correctly.
If a debug_print_backtrace() is placed where this error is generated in database.mysql.inc/db_connect(), we get:
Patch attached that adds a redirect to ./install.php if mysql module doesn't exist and
the database credentials are the defaults.
The redirect code is a exact copy of what is used further down in db_connect() if
the database connection fails. Suppose it could be made into a small private function...
Comment #10
Steven commentedGood catch. Committed to HEAD and 5.0.
Comment #11
(not verified) commented