Re: Why do I always come up with the hard stuff?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jason Pruim wrote:
Yes I am hijacking a thread just to screw with all the people who use threaded e-mail viewers and because I'm mean like that :P

Figured since yall have to much time on your hands anyway I'd give you something else to gripe about... :)

Now... My question :)

<?php
$mysqli = new mysqli("localhost", "user", "password", "database");

/* check connection */
if (mysqli_connect_errno()) {
    printf("Connect failed: %s\n", mysqli_connect_error());
    exit();
}

printf("Host information: %s\n", $mysqli->host_info);

/* close connection */
$mysqli->close();
?>

[Tue Aug 7 11:19:20 2007] [error] PHP Fatal error: Trying to clone an uncloneable object of class mysqli in /Volumes/RAIDer/webserver/Documents/tests/legion/mysqli.php on line 2


What is wrong with line 2? The login info is correct since I use it to connect with the old mysql_connect stuff and it works just fine... What am I missing?

Are you trying to use mysqli with PHP4? Either way you can probably get rid of the error by putting an & between the = and the new.

-Stut

--
http://stut.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux