|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34902 $mysqli::character_set_name() - undefined method
Submitted: 2005-10-18 09:07 UTC Modified: 2005-10-18 12:02 UTC
From: max at webscript dot ru Assigned:
Status: Closed Package: MySQLi related
PHP Version: 5CVS-2005-10-18 (snap) OS: Windows XP Pro
Private report: No CVE-ID:
 [2005-10-18 09:07 UTC] max at webscript dot ru
Method character_set_name() is undefined but procedural style works fine.

PHP 5.1.0RC4-dev 
MySQL client - 4.1.14

Reproduce code:
// procedural style (works fine)
$conn = mysqli_connect($db_host, $db_user, $db_pass, $db_name);
// oop style - got error
$conn = new mysqli($db_host, $db_user, $db_pass, $db_name);

Expected result:
string(17) "latin1_swedish_ci"
string(17) "latin1_swedish_ci"
string(17) "latin1_swedish_ci"
string(17) "latin1_swedish_ci"

Actual result:
string(17) "latin1_swedish_ci"
string(17) "latin1_swedish_ci"
string(17) "latin1_swedish_ci"

Fatal error: Call to undefined method mysqli::character_set_name() in C:\usr\mysqli\a.php on line 9


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-10-18 12:02 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2015 The PHP Group
All rights reserved.
Last updated: Mon Nov 30 20:01:36 2015 UTC