Error: Trying to clone an uncloneable object of class CException...

Hello Yiisers :)!

This is my first post here in the forum. First of all, sorry for my English, as it’s not my native language (by the way, I’m Brazilian ;D).

I discovered Yii yesterday and today I downloaded the "Definitive Guide to Yii 1.0" and was following the step-by-step "Creating First Yii Application" section and all went fine until the "1.3.2 Implementing CRUD Operations" section. There, when I try to run the shell, I get the following error (log as follows):


D:\Apps\yii_test> c:\Yii\framework\yiic shell

PHP Fatal error:  Trying to clone an uncloneable object of class CException in C:\Yii\framework\base\CApplication.php on line 558

PHP Stack trace: PHP  1. CApplication->handleException() C:\Yii\framework\base\CApplication.php: 0

Fatal error: Trying to clone an uncloneable object of class CException in C:\Yii\framework\base\CApplication.php on line 558

Call Stack:

    0.2289    1251328  1. CApplication->handleException() C:\Yii\framework\base\CApplication.php:0


What can be possibly wrong?

Additional info:

The Yii version that I'm using is the Revision: 623 of the SVN (the latest, up to this moment). The webserver I'm running is Apache, in a WAMP distribution called Pampa, with PHP 5.3.0alpha3. I've already tried with another WAMP distribution (MoWeS Portable), with a different PHP version (5.2, I think) but the same error occurred.

Googling the error message, I saw that it could possibly be the “zend.ze1_compatibility_mode” property in php.ini, but mine was already 0, so I don’t know what more I can do. Any help would be appreciated :)

Thanks a lot!

Best regards.

Do you have complete call stack available?

The message above is all that appears in the error.

Do I need to turn some configuration "On" or something like that, to get a more detailed Call Stack?

Could you run "php -v" and make sure it is of the right version? It seems you are not using the right php executable.

I tried to run "php -v" but then I noticed that PAMPA doesn't use php.exe, it uses just the Apache Module instead.

So I installed Apache 2.0, PHP 5.2.3 and MySQL (in their standalone versions) and everything went fine :D

Thanks for your help and sorry to have wasted your time with such question :P

No problem. Feel free to ask if you encounter issues.

I had the same problem.

My boss solved it changing this line in php.ini :

; Enable compatibility mode with Zend Engine 1 (PHP 4.x)

zend.ze1_compatibility_mode = Off

(turn OFF compatibility mode to make it work)