On 8/7/07, Jason Pruim <[EMAIL PROTECTED]> 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?
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

    As far as I know, J (and I could be wrong on this), this is
actually a problem with PHP5.  Some things that you could try,
however:

    In your php.ini file, set:
        zend.ze1_compatibility_mode = Off

    Check your MySQL configuration file (mysql.cnf, my.cnf, etc.) and
use the socket specified there. By default, mysqli will attempt to
connect through /tmp/mysql.sock. If your socket path is not
/tmp/mysql.sock, the connection will fail.


-- 
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

Hey, PHP-General list.... to give something back to everyone, you guys
can have 50% off every month on hosting plans of $10/mo. or more (list
price) at http://www.pilotpig.net/.
Use the coupon code phpgeneralaug07

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

Reply via email to