Edit report at https://bugs.php.net/bug.php?id=70039&edit=1

 ID:                 70039
 User updated by:    spam2 at rhsoft dot net
 Reported by:        spam2 at rhsoft dot net
 Summary:            MySQL PDO ignores env-vars
 Status:             Not a bug
 Type:               Bug
 Package:            Testing related
 PHP Version:        5.5.27
 Block user comment: N
 Private report:     N

 New Comment:

XFAIL PDO MySQL Bug #41997 (stored procedure call returning single rowset 
blocks future queries) [ext/pdo_mysql/tests/bug_41997.phpt]   XFAIL REASON: 
nextRowset() problem with stored proc & emulation mode & mysqlnd
FAIL MySQL PDO->__construct() - Generic + DSN 
[ext/pdo_mysql/tests/pdo_mysql___construct.phpt]
FAIL MySQL PDO->exec(), affected rows 
[ext/pdo_mysql/tests/pdo_mysql_exec_load_data.phpt]
> PDO uses a DSN, so that's what you need to provide for the tests to run

nonsense, it's not rocket science generate the string 
"mysql:host=localhost;dbname=php_autotest" out of the already given MYSQL_TEST 
vars

the PDO_MYSQL vars seem to work, a few tests fail on 5.6.11 (i know that 
bugreport is for 5.5.27 but i did not want to rebuild on the production 
evironment which needs to stay at 5.5.x because careless regeressions like 
https://bugs.php.net/bug.php?id=68344 and 
https://bugs.php.net/bug.php?id=70038

PDO MySQL Bug #41997 (stored procedure call returning single rowset blocks 
future queries) [ext/pdo_mysql/tests/bug_41997.phpt]  XFAIL REASON: 
nextRowset() problem with stored proc & emulation mode & mysqlnd
MySQL PDOStatement->nextRowSet() 
[ext/pdo_mysql/tests/pdo_mysql_stmt_nextrowset.phpt]  XFAIL REASON: 
nextRowset() problem with stored proc & emulation mode & mysqlnd
MySQL PDO->prepare(), emulated PS 
[ext/pdo_mysql/tests/pdo_mysql_prepare_emulated.phpt] (warn: XFAIL section but 
test passes)


Previous Comments:
------------------------------------------------------------------------
[2015-07-10 11:59:33] mbecc...@php.net

PDO uses a DSN, so that's what you need to provide for the tests to run.

MYSQL_TEST_* vars are for the mysql and mysqli tests, so they have nothing to 
do with PDO tests.

I don't see any security issue in the using default localhost/root/nopassword 
combination.

If your own mysql allows the root user without a password, the problem is on 
your side.

------------------------------------------------------------------------
[2015-07-10 11:52:26] spam2 at rhsoft dot net

> When using the mysqli extension together with the 
> mysql extension you have to use the same libraries 
> and include files. mysqli extension requires the 
> location of mysql_config file, mysql
> extension requires the path of your 
> mysql installation

uhm for sure not, libmysql is not part of the game :-)

--without-mysql \
--with-mysqli=mysqlnd \
--with-mysql-sock=%{_sharedstatedir}/mysql/mysql.sock \
--with-pdo-mysql=shared,mysqlnd \

i give the PDO_TEST vars a try while i need to google what PDOTEST_DSN is 
supposed to look like but in any case it is a bug that the credentials and 
settings of the MYSQL_TEST are not used everywhere because when the dangerous 
default root without a password don't work and you override that it's pretty 
clear that the same hits all other parts trying to speak with mysqld

MYSQL_TEST_HOST="localhost" 
MYSQL_TEST_PORT="3306" 
MYSQL_TEST_USER="php_autotest" 
MYSQL_TEST_PASSWD="*****" 
MYSQL_TEST_DB="php_autotest"

------------------------------------------------------------------------
[2015-07-10 11:42:36] mbecc...@php.net

Sorry the close message was not what I meant ;)

------------------------------------------------------------------------
[2015-07-10 11:42:00] mbecc...@php.net

When using the mysqli extension together with the mysql extension
you have to use the same libraries and include files. mysqli
extension requires the location of mysql_config file, mysql
extension requires the path of your mysql installation.

If you installed MySQL 4.1 for example with prefix /usr/local/mysql-4.1
your configure settings should be
--with-mysql=/usr/local/mysql-4.1
--with-mysqli=/usr/local/mysql-4.1/bin/mysql_config



------------------------------------------------------------------------
[2015-07-10 11:41:06] mbecc...@php.net

Did you have a look at the test config.inc?

if (false !== getenv('PDO_MYSQL_TEST_DSN')) {
        # user set them from their shell
        $config['ENV']['PDOTEST_DSN'] = getenv('PDO_MYSQL_TEST_DSN');
        $config['ENV']['PDOTEST_USER'] = getenv('PDO_MYSQL_TEST_USER');
        $config['ENV']['PDOTEST_PASS'] = getenv('PDO_MYSQL_TEST_PASS');

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=70039


--
Edit this bug report at https://bugs.php.net/bug.php?id=70039&edit=1

-- 
PHP Quality Assurance Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to