|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-09-19 12:47 UTC] johannes@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 05 10:00:01 2025 UTC |
Description: ------------ require_once "DB.php"; $host = 'mysql.positive-internet.com'; $host = 'testhost.com'; $user = 'user1'; $pass ='mjasds'; $db_name ='dbtest'; $dsn = "mysql://$user:$pass@$host/$db_name"; $conn = &DB::connect($dsn); if (DB::isError($conn)) { echo 'Standard Message: ' . $conn->getMessage() . "\n"; echo 'Standard Code: ' . $conn->getCode() . "\n"; echo 'DBMS/User Message: ' . $conn->getUserInfo() . "\n"; echo 'DBMS/Debug Message: ' . $conn->getDebugInfo() . "\n"; } Reproduce code: --------------- require_once "DB.php"; $host = 'mysql.positive-internet.com'; $host = 'testhost.com'; $user = 'user1'; $pass ='mjasds'; $db_name ='dbtest'; $dsn = "mysql://$user:$pass@$host/$db_name"; $conn = &DB::connect($dsn); if (DB::isError($conn)) { echo 'Standard Message: ' . $conn->getMessage() . "\n"; echo 'Standard Code: ' . $conn->getCode() . "\n"; echo 'DBMS/User Message: ' . $conn->getUserInfo() . "\n"; echo 'DBMS/Debug Message: ' . $conn->getDebugInfo() . "\n"; } Expected result: ---------------- would set a $conn as a usable connection object for mysql database Actual result: -------------- Standard Message: DB Error: extension not found Standard Code: -25 DBMS/User Message: [DB Error: extension not found] ** mysqli://user1:mjasds@testhost.com/dbtest DBMS/Debug Message: [DB Error: extension not found] ** mysqli://user1:mjasds@testhost.com/dbtest