Error Cloning a Singleton is not allowed!

Topics: Developer Forum, Project Management Forum, User Forum
Apr 23, 2009 at 5:27 PM
Hola a todos alguien me puede ayudar, a alguien talvez le salio este mensaje de error, bueno les comento mi servidor tiene WINDOWS SERVER 2003 R2, es necesario que instale EXCEL en el servidor para que corra???, tiene activado la libreria zip y todo eso ahh en mi servidor instale AppServer 2.5.9 [ PHP 5.2.3 - APACHE 2.2.4]

09:20:49 Create new PHPExcel object
Fatal error: Uncaught exception 'Exception' with message 'Cloning a Singleton is not allowed!' in C:\AppServ\www\CooptumiCOM\PHPExcel2007\Classes\PHPExcel\ReferenceHelper.php:535 Stack trace: #0 C:\AppServ\www\CooptumiCOM\PHPExcel2007\Classes\PHPExcel\ReferenceHelper.php(74): PHPExcel_ReferenceHelper->__clone() #1 C:\AppServ\www\CooptumiCOM\PHPExcel2007\Classes\PHPExcel\Worksheet.php(613): PHPExcel_ReferenceHelper::getInstance() #2 C:\AppServ\www\CooptumiCOM\PHPExcel2007\Classes\PHPExcel\Worksheet.php(319): PHPExcel_Worksheet->setTitle('Worksheet') #3 C:\AppServ\www\CooptumiCOM\PHPExcel2007\Classes\PHPExcel.php(102): PHPExcel_Worksheet->__construct(Object(PHPExcel)) #4 C:\AppServ\www\CooptumiCOM\PHPExcel2007\Tests\02types.php(42): PHPExcel->__construct() #5 {main} thrown in C:\AppServ\www\CooptumiCOM\PHPExcel2007\Classes\PHPExcel\ReferenceHelper.php on line 535
Developer
Apr 24, 2009 at 2:35 PM
Check with phpinfo() your setting for zend.ze1_compatibility_mode. It must be Off.



Do like this in php.ini

zend.ze1_compatibility_mode = Off

Alternatively, put this at the beginning of your script:

<?php
ini_set('zend.ze1_compatibility_mode', '0');

...
?>

Jul 17, 2009 at 5:07 PM

thanks koyama, I was going mad.