Hi Martijn

*Fatal error:* Uncaught exception 'Zend_Pdf_Exception' with message 'Cloning
> Zend_Pdf_Page object using 'clone' keyword is not supported. Use 'new
> Zend_Pdf_Page($srcPage)' syntax' in
> /usr/local/ZendFramework/1_5_3/Zend/Pdf/Page.php:349 Stack trace: #0
> /home/buur/domains/makelaardijfhbuurman.nl/public_html/wip/testpdf.php(6)<http://makelaardijfhbuurman.nl/public_html/wip/testpdf.php%286%29>:
> Zend_Pdf_Page->__clone() #1 {main} thrown in 
> */usr/local/ZendFramework/1_5_3/Zend/Pdf/Page.php
> on line 349* The problem is: this only happens on a production server over
> which i have no control. BUT, the version of ZF running on that server is
> the exact same version as i have on my localhost on which i don't have this
> problem. So, i'm guessing it's a server setting. Does anyone have any idea
> ????


This is caused by the following setting in php.ini

  zend.ze1_compatibility_mode

>From the manual

"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."

Adding the following to your bootstrap

ini_set('zend.ze1_compatibility_mode', 0);

Should fix the problem.

Note: This INI setting is due for removal in PHP 5.3

Regards

Marco

Reply via email to