I have mysql installed on my sever but the installation page says it cant find a supported database, any ideal whats wrong?

Comments

tm’s picture

Operating system/version
PHP/version
MySQL/version
Web Server/version
paths (web home, drupal home etc.)
Anything else that might affect the installation.

Help others help you; give them enough info to help you troubleshoot.

Sabastion’s picture

lol sorry still really new to all of this

php is PHP Version 5.2.1
MySql is MySql server 6
web server is Windows 2003
the site directories are all D:/website but the database locations are in a diffrent spot
D:/database so maby its looking in the wrong spot.

o and drupal home is d:/website/Blogs/

tm’s picture

there are numerous threads related to drupal on windows, no database...

one of the common things is to be sure /php and php/ext (full paths!) are in your global/system PATH statement; windows seems to have difficulty findiing the dlls with it. you also need to be sure that at least one of the extensions (mysql/mysqli) are enabled in php.ini (you may have to restart the web service).

a note: not sure about php 5.2.1 and the windows connectors/dlls. you may want to visit mysql.com and look for the php connectors for windows; there is a note there, somewhere(!).

you should set up a phpinfo() file to help you troubleshoot. this thread may help you set one up: http://drupal.org/node/59680. if you do not see mysql or mysqli in there, the connectors are not working.

good luck!

Sabastion’s picture

I have that test page set up but don't know what im looking for, its its not against any rules i could post ya the link and um i have no ideal about the global/system path im taking over someone else's job until we can find a replacement, im usually just a programmer and this is outside of what i normally do.

tm’s picture

as you scroll down the page, you should see a title of "mysqli" or "mysql"; you will be good.

it's okay; i am a former end-user that got hijacked into managing networks and systems! if it is something related to a computer, they throw it at me. go figure!

Sabastion’s picture

lol yep thats totally what happed, swear they said "well it has ta do with a computer so you do it."

anyway i don't see ether of those on that page. So what do i have to do to fix that.
at least after this i should have a passing familiarity of this stuff.

tm’s picture

i am assuming you have admin access to the server...

in php.ini (in the php folder), go to the "Windows Extensions" section. ensure that "extension=php_mysql.dll" and/or "extension=php_mysqli.dll" do not have ";" in front of them. while you are in there, set "memory_limit" to at least 24M; more is better. this will help to avoid "white pages."

then

whatever the full paths to the \php and \php\ext folders (guessing C:\Program Files\PHP, C:\Program Files\PHP\ext if the installer took the defaults) are should be appended to the PATH statement in the System Variables (System, Advanced, Environment Variables). be sure that there is a ";" between each entry in the path. you will have to restart the server for this to take effect.

that should do it for your specific problem; check phpinfo again to verify. try the install again.

another assumption: you did not have to put in "index.php" and/or "install.php" in the address line to run the installer, no? otherwise, you will need to be sure that the web server/virtual server has "index.php" as its default document. just checking.

oh, and pay attention to whatever cog.rusty says; it is usually good stuff. but you will find that out as you read the posts...

good luck! (sorry so long!)

Sabastion’s picture

np hey its helping me learn i think i might be suffering from the old guys mess up. the env path thing looks like this

c:\program files\imagemagick-6.3.4-q16;C:\Perl\bin\;C:\Program Files\Windows Resource Kits\Tools\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;D:\PHP\;C:\php4\php;D:\php4\php

and another loction the
Configuration File (php.ini) Path = C:\WINDOWS\php.ini
and if im reading the server right i think the guy just tried to install php again and again and left the ones that didnt work, think i should try and remove them and do a fresh install and if so what version should i go with?

**edit**
quick little edit umm there are like 10 or so php.ini files on the server so.... ya

cog.rusty’s picture

Your php basically works, or else you wouldn't get Drupal's error message in the first place. If you want to check its MySQL connectivity before taking radical measures, try a small script such as:

$mysql = function_exists('mysql_connect') ? "mysql is here" : "mysql NOT here";
$mysqli = (function_exists('mysqli_init') || extension_loaded('mysqli')) ? "mysqli is here" : "mysqli NOT here";
$pgsql = function_exists('pg_connect') ? "pgsql is here" : "pgsql NOT here";

print "$mysql<br />";
print "$mysqli<br />";
print "$pgsql<br />";
return;
Sabastion’s picture

kk just thinking of things that might be causing this. i ran the scrips you suggested and they run fine but just don't find the mysql server. is there a spot may be that im required to tell the php where to look? Maby the guy thats gone has forgotten to set that up correctly.

cog.rusty’s picture

Did they find any database server?

Sabastion’s picture

nope all three come back as not here.
The installation of mysql was done just before he left so there might have been a step or something missed.

cog.rusty’s picture

So tm was right about the connectors. Check this:

http://dev.mysql.com/downloads/connector/php/

cog.rusty’s picture

Also in some cases the exact words of the error message helps locate the code and narrow down the exact conditions which made it appear, no matter what the error message says.

Sabastion’s picture

Ganna give it up for a while its been a 14hr day.
I downloaded those files and put them in the correct directory but its still not finding the server.
Sorry ta be such a bother, im a programmer thats way in over my head lol. Gusse ill pick this up again in the morning, fresh mind and all that. Thanks again, hopefully with your help ill be able to get this up and running soon.

gpk’s picture

May be a silly question but ... is the server running?

What happens if you try to run the MYSQL command line client interface something like

C:\<whatever-path>\mysql\bin\mysql

??

Also is it MySQL or Microsoft SQL Server (which I see listed in your PATH)?

gpk
----
www.alexoria.co.uk

Sabastion’s picture

Here maby this will help you all diagnose my problem,

www.cityofhoopeston.com/phpinfo.doc

and our server has both MySQL and MsSQL.

gpk’s picture

On our (shared) server the phpinfo output includes loads of info under the "Configure command" heading at the top, including:

'--with-mysqli' '--with-mysql=/usr'

There is then a whole section of MySQL parameters.

So it definitely looks like the "connector" is the problem.

Hope this points you in the right direction ...

gpk
----
www.alexoria.co.uk

Sabastion’s picture

any ideal how i set mine to have that info? also when i put
C:\mysql\bin\mysql into the mysql comand line it just gives me an unknown command \m \b \m

I just reinstalled everthing to make sure im not missing a step but am still having the same issue.

from looking at the linked doc can anyone see anything that im doing obviously wrong

tm’s picture

does anyone know if drupal (or php, for that matter) support mysql 6 yet?

i have not gone beyond 5.0.45 myself, sorry. maybe uninstall 6 and try v5.0.x instead?

Sabastion’s picture

had the same ideal i switched down to 5.1 but looking at the phpinfo closer its not pulling the real file its just kinda making most of the stuff up.

I followed all the tutorial i could find but its still not getting the php.ini file

cog.rusty’s picture

Try to hunt down and exterminate any copies of php.ini to know which one is taken into account. Perhaps there is one in Zend too (if it is installed).

Or add one straight into Drupal's installation directory.

Sabastion’s picture

Aparntly, or so i am being told if it cant find the php.ini file it will just use defaults from in php.

So far these are the steps i have tried to do to make that
Configuration File (php.ini) Path end in a php.ini file

I have set the PHPRC to c:\php and c:\windows

I have set
HKEY_LOCAL_MACHINE\SOFTWARE\PHP\x.y.z\IniFilePath, HKEY_LOCAL_MACHINE\SOFTWARE\PHP\x.y\IniFilePath and HKEY_LOCAL_MACHINE\SOFTWARE\PHP\x\IniFilePath
to
"IniFilePath"="C:\\PHP;C:\\windows"

umm

put c:\php at the beginning of the path environment variable thing

also have put php.ini in ever location that is in the path variable.

but for somereason the stupied field still shows C:\windows and not for example C:\windows\php.ini or C:\PHP\PHP.ini

Never had this problem before but sadly there is no way for me to get out of having to use this blasted windows machine.

tm’s picture

put c:\php at the beginning of the path environment variable thing

assuming c:\php is your for-real active php installation (following cog.rusty's advice and clearing out the other php installations):

add "c:\php\ext" to the path thingy, too. then restart windows (after you finish changing all your settings). this will help windows locate the dlls. the path statement is not recursive. you had "c:\program files\php"; is that still there? if so, it should be taken.

registry: the IniFilePath should only point to one installation (in your case), c:\php. don't know where the subpaths (version of php?) are coming from... wonder if you can prune the subpaths out and put the IniFilePath directly under PHP

then, in php.ini, be sure that extension_dir="c:\php\ext"

when this is done, could we see a new copy of your phpinfo?

tm’s picture

we are talking about downgrading mysql to v5.0.x, no?

Sabastion’s picture

ya i switched down to mysql 5.1 um someone told me to "set the --with-config-file-path" what is that and how would i try that?

Sabastion’s picture

So i tried your suggestions and its strange its seaming to pull some of the files from the php.ini but says its not finding it and still refuses to show the mysql section. here a new phpinfo

www.cityofhoopeston.com/The browser you.doc

gonefishing’s picture

Why do you have two php.ini files?

Configuration File (php.ini) Path
C:\WINDOWS
Loaded Configuration File
C:\php\php.ini

tm’s picture

if you have one in c:\windows, dump it. do a search on all your drives for php.ini and dump any not in c:\php. if it shows up again, we'll assume it is the "default fallback path."

\ext vs \includes. does c:\php have an \includes folder? does it have an \ext folder (for this version of php, should be this one)? we need to establish which one is correct (in either case, be sure it has php_mysql.dll and php_mysqli.dll in it). while we are checking, confirm that you have "libmysql.dll" in c:\php.

once we establish the includes/extensions folder:
- that path should be the one in your windows path statement.
- in php.ini:
>> i have my server's config, "includes_path" (for windows) commented out/disabled under the "paths and directories"
>> "extension_dir=.\ext"
>> under "dynamic extensions", ensure that "extension=php_mysqli.dll" is enabled (no ";" in front of it). make a note that you are using the "mysqli" connector when you get back to installing drupal (since you are using mysql5).
- save, restart your web server, run phpinfo again.

hey, getting there!