anshuwap / mollify

Automatically exported from code.google.com/p/mollify
0 stars 0 forks source link

PHP 5.3 DB connection #381

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When I try to install mollify in PHP 5.3 environment I got stuck right at the 
beginning - "MySQL not detected".

It is because mollify in install/MySQLInstaller.class.php (and probably 
everywhere else) uses mysql_connect() which (as a part of mysql driver) is 
obsolete in newer versions of PHP in favour of mysqlnd (native driver).

I am absolute newcomer but has not seen any info about this elsewhere on the 
site. I would like to ask if there is any migration to mysqli or mysqlnd in 
progress.

Thank you.

I would really love to test Mollify as it seems as top level from available 
free file managers!

Original issue reported on code.google.com by kojat...@gmail.com on 23 Mar 2012 at 5:11

GoogleCodeExporter commented 9 years ago
The libmysql should not be obsolete. I quote the mysql site 
(http://dev.mysql.com/downloads/connector/php-mysqlnd/):

"The MySQL native driver for PHP is an additional, alternative way to connect 
from PHP 5.3 or newer to the MySQL Server 4.1 or newer. It is a replacement for 
the libmysql, the MySQL Client Library. As of PHP 5.3 you can use ext/mysql, 
ext/mysqli and PDO_MYSQL either together with libmysql as you did in the past 
or with mysqlnd.

We have no plans to remove libmysql support from ext/mysql, ext/mysqli or 
PDO_MYSQL, which would break existing applications. We just add a new, superior 
alternative to our PHP offerings."

So PHP 5.3 should have all the same MySQL connection possibilities, and 
besides, I'm using 5.3 as well with no problems. Perhaps you have compiled it 
yourself, or it is in some other way optimized compilation?

Anyway, Mollify does already have mysqli, at the moment it's being used only in 
installation where mysqli provides the ability to run db scripts from files. In 
theory, you could modify "include/configuration/MySQLConfiguration.class.php" 
and change lines 42 and 43 into

require_once("include/mysql/MySQLIDatabase.class.php");
$this->db = new MySQLIDatabase($host, $DB_USER, $DB_PASSWORD, $database, 
$tablePrefix, $port, $socket);

but I haven't tested this myself.

Original comment by samuli.j...@gmail.com on 26 Mar 2012 at 6:41

GoogleCodeExporter commented 9 years ago
In 1.8.9, MySQLI (ext/mysql) is now used instead of old MySQL (ext/mysql), and 
also PDO support is added.

Original comment by samuli.j...@gmail.com on 22 Jul 2012 at 12:21