<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Script 14.1 - mysql_connect.php</title>
<description> I am trying to get the new improved version of this connect script working on my server. 

I have it working on my notebook using Marc Liyanage's installation of PHP Version 5.0.4 www.entropy.ch Release 1 and MySQL 4.1.16-standard

The version That I can't get running. PHP Version 5.1.2 with MySQL 4.1.18-standard. I have installed the old version of the ecommerce site from PHP&amp;amp;MySQL edition#1 and it seems to work fine.

The line causing the error is.
// Improved MySQL Version:
$dbc = mysqli_connect (DB_HOST, DB_USER, DB_PASSWORD, DB_NAME) OR die ('Could not connect to MySQL: ' . mysqli_connect_error() );

And the error is.
PHP Fatal error: Trying to clone an uncloneable object of class mysqli in /mysql_connect.php on line 15

The mysqli settings seem to be the same. except for the following.


On my notebook.

mysqli
MysqlI Support enabled
Client API version 4.1.3-beta

On the server.
mysqli
MysqlI Support enabled
Client API version 4.1.16


Anybody aware of what might be causing this error (Trying to clone an uncloneable object), and how to remidy it?

Any help greatly appreciated.





</description><link>http://www.dmcinsights.com/phorum/read.php?13,24574,24574#msg-24574</link><lastBuildDate>Thu, 09 Sep 2010 09:09:19 -0400</lastBuildDate>
<generator>Phorum 5.2.15a</generator>
<item>
<guid>http://www.dmcinsights.com/phorum/read.php?13,24574,24586#msg-24586</guid>
<title>Re: Script 14.1 - mysql_connect.php</title><link>http://www.dmcinsights.com/phorum/read.php?13,24574,24586#msg-24586</link><description><![CDATA[ Thanks for that last tip as well Paul. I was able to get the php.ini reconfigured with no affect to any of my other scripts, The ini_set() function looks like it could be very helpfull in some situations as well.<br /><br />Mark]]></description>
<dc:creator>markboyd</dc:creator>
<category>PHP and MySQL: Visual QuickPro Guide (2nd Ed.)</category><pubDate>Thu, 11 May 2006 03:30:58 -0400</pubDate></item>
<item>
<guid>http://www.dmcinsights.com/phorum/read.php?13,24574,24578#msg-24578</guid>
<title>Re: Script 14.1 - mysql_connect.php</title><link>http://www.dmcinsights.com/phorum/read.php?13,24574,24578#msg-24578</link><description><![CDATA[ You should be able to override that setting using ini_set(). Check the manual page at <a href="http://www.php.net/manual/en/function.ini-set.php" rel="nofollow" >http://www.php.net/manual/en/function.ini-set.php</a> for the syntax.]]></description>
<dc:creator>pswanson</dc:creator>
<category>PHP and MySQL: Visual QuickPro Guide (2nd Ed.)</category><pubDate>Wed, 10 May 2006 18:57:30 -0400</pubDate></item>
<item>
<guid>http://www.dmcinsights.com/phorum/read.php?13,24574,24577#msg-24577</guid>
<title>Re: Script 14.1 - mysql_connect.php</title><link>http://www.dmcinsights.com/phorum/read.php?13,24574,24577#msg-24577</link><description><![CDATA[ Thanks for finding that, and I think that you would fix the problem.<br />The problem is I don't have access to the php.ini file.<br /><br />zend.ze1_compatibility_mode<br />I did a search regarding this and found the following.<br /><br />[<a href="http://php.mirrors.ilisys.com.au/manual/en/ini.core.php" rel="nofollow" >php.mirrors.ilisys.com.au</a>]<br />---&gt;&gt;&gt;<br />zend.ze1_compatibility_mode boolean<br />Enable compatibility mode with Zend Engine 1 (PHP 4). It affects the cloning, casting (objects with no properties cast to FALSE or 0), and comparing of objects. In this mode, objects are passed by value instead of reference by default.<br /><br />See also the section titled Migrating from PHP 4 to PHP 5.<br />---&gt;&gt;&gt;<br /><br /><br />The web host that I am using this may have set it as such to allow some PHP 4 combatibility??? Should I just ask them to change the setting. What might this affect regarding other sites on the server?<br /><br /><br /><br />]]></description>
<dc:creator>markboyd</dc:creator>
<category>PHP and MySQL: Visual QuickPro Guide (2nd Ed.)</category><pubDate>Wed, 10 May 2006 18:19:51 -0400</pubDate></item>
<item>
<guid>http://www.dmcinsights.com/phorum/read.php?13,24574,24575#msg-24575</guid>
<title>Re: Script 14.1 - mysql_connect.php</title><link>http://www.dmcinsights.com/phorum/read.php?13,24574,24575#msg-24575</link><description><![CDATA[ A Google search indicates that you need to disable <i>zend.ze1_compatibility_mode</i> in the PHP.INI file on the server generating the error.<br /><br />See this thread on Zend's forum:<br /><a href="http://www.zend.com/phorum/read.php?num=6&amp;id=1304&amp;loc=0&amp;thread=1304" rel="nofollow" >http://www.zend.com/phorum/read.php?num=6&amp;id=1304&amp;loc=0&amp;thread=1304</a>.]]></description>
<dc:creator>pswanson</dc:creator>
<category>PHP and MySQL: Visual QuickPro Guide (2nd Ed.)</category><pubDate>Wed, 10 May 2006 17:06:15 -0400</pubDate></item>
<item>
<guid>http://www.dmcinsights.com/phorum/read.php?13,24574,24574#msg-24574</guid>
<title>Script 14.1 - mysql_connect.php</title><link>http://www.dmcinsights.com/phorum/read.php?13,24574,24574#msg-24574</link><description><![CDATA[ I am trying to get the new improved version of this connect script working on my server.<br /><br />I have it working on my notebook using Marc Liyanage's installation of PHP Version 5.0.4 www.entropy.ch Release 1 and MySQL 4.1.16-standard<br /><br />The version That I can't get running. PHP Version 5.1.2 with MySQL 4.1.18-standard. I have installed the old version of the ecommerce site from PHP&amp;MySQL edition#1 and it seems to work fine.<br /><br />The line causing the error is.<br />// Improved MySQL Version:<br />$dbc = mysqli_connect (DB_HOST, DB_USER, DB_PASSWORD, DB_NAME) OR die ('Could not connect to MySQL: ' . mysqli_connect_error() );<br /><br />And the error is.<br />PHP Fatal error: Trying to clone an uncloneable object of class mysqli in /mysql_connect.php on line 15<br /><br />The mysqli settings seem to be the same. except for the following.<br /><br /><br />On my notebook.<br /><br />mysqli<br />MysqlI Support enabled<br />Client API version 4.1.3-beta<br /><br />On the server.<br />mysqli<br />MysqlI Support enabled<br />Client API version 4.1.16<br /><br /><br />Anybody aware of what might be causing this error (Trying to clone an uncloneable object), and how to remidy it?<br /><br />Any help greatly appreciated.<br /><br /><br /><br /><br /><br />]]></description>
<dc:creator>markboyd</dc:creator>
<category>PHP and MySQL: Visual QuickPro Guide (2nd Ed.)</category><pubDate>Wed, 10 May 2006 16:48:09 -0400</pubDate></item>
</channel>
</rss>