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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: webmaster at mif dot it
New email:
PHP Version: OS:

 

 [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

Pull Requests

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: Sun Dec 22 02:01:28 2024 UTC