php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35182 Successfully loaded, but cannot use Mysqli functions/class
Submitted: 2005-11-10 14:28 UTC Modified: 2005-11-10 14:41 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: webmaster at mif dot it Assigned:
Status: Not a bug Package: MySQLi related
PHP Version: 5.0.5 OS: Win XP Pro
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
30 - 26 = ?
Subscribe to this entry?

 
 [2005-11-10 14:28 UTC] webmaster at mif dot it
Description:
------------
Cannot use Mysqli functions, without using references.

Reproduce code:
---------------
This code:
$db = mysqli_connect('localhost','Matteo','teo28273');
and this doesn't works:
$db = new mysqli('localhost','Matteo','teo28273');

This code:
$db =& mysqli_connect('localhost','Matteo','teo28273');
and this code works:
$db =& new mysqli('localhost','Matteo','teo28273');



Expected result:
----------------
The following code (and all mysqli functions) work properly:

$db = mysqli_connect('localhost','Matteo','teo28273'); or
$db = new mysqli('localhost','Matteo','teo28273');



Actual result:
--------------
Produces this error:
#Fatal error: Trying to clone an uncloneable object of class mysqli in [***]\index.php on line 4


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-10 14:31 UTC] webmaster at mif dot it
Improving text
 [2005-11-10 14:31 UTC] webmaster at mif dot it
Editing
 [2005-11-10 14:35 UTC] johannes@php.net
You need to disable zendengine1 compatibility mode in your 
php.ini for using PHP 5 OO stuff. 
 [2005-11-10 14:41 UTC] webmaster at mif dot it
Thx, now it works properly, but some apps r really slow.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 01:01:28 2024 UTC