Form Tools
MySQL ver. correct but install fails- OSX - Printable Version

+- Form Tools (https://forums.formtools.org)
+-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1)
+--- Forum: Installation (https://forums.formtools.org/forumdisplay.php?fid=4)
+--- Thread: MySQL ver. correct but install fails- OSX (/showthread.php?tid=285)

Pages: 1 2


MySQL ver. correct but install fails- OSX - dmort59 - Sep 17th, 2009

I am attempting to install Forms Tools /localhost/ running on OSX .
--
Install System Check Shows:
PHP - 5.3.0 PASS
MySql - mysqlnd 5.0.5-dev - 081106 - $Revision: 1.3.2.27 $ FAIL
Write Permissions PASS
/themes/default/cache/ PASS
--
Anyone know how to rename the version to force a pass ? Shows the same version info running phpinfo.php

Thanks
Dennis


RE: MySQL ver. correct but install fails- OSX - Ben - Sep 18th, 2009

Hi Dennis,

What happens to make it fail, exactly - blank page or something? I'm also running it on OSX localhost and haven't encountered this problem yet.

Thanks!

- Ben


RE: MySQL ver. correct but install fails- OSX - dmort59 - Sep 20th, 2009

(Sep 18th, 2009, 11:17 AM)Ben Wrote: Hi Dennis,

What happens to make it fail, exactly - blank page or something? I'm also running it on OSX localhost and haven't encountered this problem yet.

Thanks!

- Ben

-Fails System check on MySQL: Requirements not met.
I have included a screenshot.jpg


RE: MySQL ver. correct but install fails- OSX - dmort59 - Sep 22nd, 2009

Here is the PHPInfo.php File as well if it helps.
Installer just stops at this point and will not continue.
Vers. 1 of Form Tools installs ok.


RE: MySQL ver. correct but install fails- OSX - Ben - Sep 22nd, 2009

Oh wow, neat! Thanks for the screenshot. Form Tools uses the mysql_get_client_info() function (see here: http://ca2.php.net/manual/en/function.mysql-get-client-info.php).

That function SHOULD return a integer-like string of the MySQL number. On your system it's that long string that it outputs in the page. It shouldn't do that! Smile

But if you'd like to just bypass it, you can just hack the code a bit. In your /install/step2.php find these lines:

PHP Code:
// 2. MySQL version (4 or later)
$valid_mysql_version false;
if (
substr(mysql_get_client_info(), 01) >= 4)
  
$valid_mysql_version true

and change them to:

PHP Code:
// 2. MySQL version (4 or later)
$valid_mysql_version true;
//if (substr(mysql_get_client_info(), 0, 1) >= 4)
//  $valid_mysql_version = true; 

I *think* that will let you bypass this problem altogether, but I can't be sure that other problems might not crop up.

- Ben


RE: MySQL ver. correct but install fails- OSX - pinkfrankenstein - Mar 11th, 2010

I'm having the same problem, the mysql_get_client_info() command is retrieving the wrong information (mysqlnd 5.0.5-dev - 081106 - $Revision: 1.3.2.27 $_) when I clearly have MySQL 5.1 installed.

This is obviously a problem with Snow Leopard or PHP 5.3 or both, but after 3 hours of Googling, I am no closer to an answer as to why or how to change it.

If I do find an answer I am going to post it here.


RE: MySQL ver. correct but install fails- OSX - pinkfrankenstein - Mar 12th, 2010

OK, I found an answer to my problem. The PHP command:
mysql_get_client_info()

returns the version of mysqlnd which is like a PHP plugin (sort of) and not the version of MySQL running on the Macintosh. I'm currently running PHP 5.3, I don't know if this is changed in later versions.

So no matter what version of MySQL you are running, this value of "mysqlnd 5.0.5-dev - 081106 - $Revision: 1.3.2.27 $" will always be returned.

In order to determine the version of MySQL you have to run this:
Code:
    <?php
$link = mysql_connect('localhost', 'user', 'pword');
if (!$link) {
    die('Could not connect: ' . mysql_error());
}
printf("MySQL server version: %s\n", mysql_get_server_info());
?>

Best just to comment out the piece of script that seeks to verify the version as mentioned above.


RE: MySQL ver. correct but install fails- OSX - Ben - Mar 14th, 2010

Hi PinkFrankenstein,

Thanks for the heads up on this. I've logged this as a bug all the same; since you're not the first person to encounter this, there should probably be a way of overriding the default behaviour via the install script interface to continue the install.
http://bugs.formtools.org/index.php?cmd=view&id=203

All the best -

Ben


RE: MySQL ver. correct but install fails- OSX - narain - Feb 8th, 2013

Hi Ben ,

I have a doubt i am using WAMP server , should mysql be installed on windows


RE: MySQL ver. correct but install fails- OSX - Joe - Feb 8th, 2013

Narain,

If you're using WAMP, MySQL will be installed when you installed WAMP.

Cheers,

Joe