Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MySQL Connection::checkRequirements looks for wrong drivers #1

Open
dao opened this issue Nov 6, 2015 · 6 comments
Open

MySQL Connection::checkRequirements looks for wrong drivers #1

dao opened this issue Nov 6, 2015 · 6 comments

Comments

@dao
Copy link

dao commented Nov 6, 2015

DreamFactory\Core\Database\Mysql\Connection::checkRequirements should not be looking for mysqlnd or mysql extensions. The abstract parent method already correctly checks the pdo_mysql driver.

@dao
Copy link
Author

dao commented Nov 6, 2015

This issue prevented me from adding a mysql db service to DFE. Removing the faulty checkRequirements and relying on the parent method allowed me to add and work with a mysql service as expected.

@df-admin
Copy link

df-admin commented Nov 6, 2015

What platform are you running on where this is a problem? I have run this
on Ubuntu and OS X with no issues.
On Nov 5, 2015 7:08 PM, "dylan oliver" [email protected] wrote:

This issue prevented me from adding a mysql db service to DFE. Removing
the faulty checkRequirements and relying on the parent method allowed me to
add and work with a mysql service as expected.


Reply to this email directly or view it on GitHub
#1 (comment)
.

@dao
Copy link
Author

dao commented Nov 7, 2015

ubuntu 14.04, but it's not about platform. If it works for you, it is because you have not only the (actually used) PDO mysql driver installed, but also one or both of the 'mysqlnd' or 'mysql' drivers which the code I removed is looking for even though they have nothing to do with the functionality of this code.

@leehicks
Copy link

It is my understanding that the pdo_mysql is not a standalone library, but requires one of mysql or mysqlnd, as mentioned in the PHP doc installation section. By your statement, you are saying that you have neither of those two installed and the mysql interface works for you? Could you please send me the "php -m" dump of the php that you are running DreamFactory on after removing these checks.

@dao
Copy link
Author

dao commented Nov 17, 2015

Choosing a Library:

The mysqli, PDO_MySQL and mysql PHP extensions are lightweight wrappers on top of a C client library. The extensions can either use the mysqlnd library or the libmysqlclient library. Choosing a library is a compile time decision.

ubuntu% php5-fpm -v
PHP 5.5.9-1ubuntu4.14 (fpm-fcgi) (built: Oct 28 2015 01:38:24)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
    with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies
    with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans
ubuntu% php5-fpm -i | grep mysql
/etc/php5/fpm/conf.d/20-pdo_mysql.ini,
PDO drivers => mysql, sqlite
pdo_mysql
pdo_mysql.default_socket => /var/run/mysqld/mysqld.sock => /var/run/mysqld/mysqld.sock
ubuntu% php5-fpm -m | grep mysql
pdo_mysql

@leehicks
Copy link

Thanks for the additional info. I am curious as to why you are using the libmysqlclient, as that doc you mentioned seems to have a few things that are not supported. We have not tested against that library at this point so you may run into problems that we have not seen. Obviously, we recommend using mysqlnd (primarily because it is easily installed on most of the supported platforms and recommended as per the doc you referenced).

Are you aware of a way to check for that library being used in the code? I will look into checking for that library and dropping the requirement for mysqlnd if noted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants