|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34798 mysqli->set_charset is an undefined method
Submitted: 2005-10-09 23:36 UTC Modified: 2005-10-10 17:49 UTC
From: jarnix at jarnix dot com Assigned:
Status: Not a bug Package: MySQLi related
PHP Version: 5.1.0RC1 OS: Windows XP SP2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: jarnix at jarnix dot com
New email:
PHP Version: OS:


 [2005-10-09 23:36 UTC] jarnix at jarnix dot com
set_charset method is undefined

Reproduce code:
$mysqli = new mysqli("localhost", "root", "", "mysql");

Expected result:

Actual result:
Fatal error: Call to undefined method mysqli::set_charset() (...) on line 2


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-10-10 09:37 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at

You have to compile PHP with a newer MySQL client library.
For MySQL 4.1 you need 4.1.13 or above, for MySQL 5.0 you need MySQL 5.0.5 or above

 [2005-10-10 17:49 UTC] jarnix at jarnix dot com
Here is an extract from the phpinfo() output :

Client API version  5.0.13-rc

I use the latest versions of PHP and Mysql client.

I'm using a Windows build. Maybe there is something wrong with this build ?
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sat Dec 09 23:01:27 2023 UTC