[Solved] Create Model not working


[indent]I’m new to Yii framework. To get familiar with this framework I’m going through the Larry Ullman Series. Everything went well until I tried to create the model. Clicking on the “Model Generator” is returning a blank page as response. When I checked the apache log file “access.log” I found this message: - - [08/Nov/2010:00:13:36 +0530] "GET /firstyii/index.php/gii/model HTTP/1.1" 500 -

Here, "firstyii" is my application name. Below is my development environment information:

  • Apache 2.2
  • Php 5.3.3
  • Yii 1.1.4.r2429
  • MySql 5.1.39

How do I get to know what is going wrong? There is no information about the error. Please help me in this regard



Could it be that there’s a problem with your DB connection parameters? E.g. insufficient access rights? Did you configure the db component at all?

It’s strange that you don’t see the full exception including a trace. Maybe error reporting is turned off completely in your PHP installation?

The problem was not with apache or php or Yii. It was Windows 7. It wasn’t resolving localhost to Solved the problem by adding the entry localhost

in C:\Windows\System32\drivers\etc\hosts file. Everything is working fine now.

Thanks :)


Could you make sure you have your PHP’s error set to E_ALL? Very weird you have a blank page…


Yeah added error_reporting E_ALL | E_STRICT entry to the php.ini file. After setting this & restarting the apache server, I got error message.

Thanks for the help:)

Hmm, doesn’t really explain it, because how would you have been able to access gii in the first place and not having the problem only when you created the models, right?

Anyway, glad you fixed it.

Am having the same issue. Am trying to connect to an oracle database. The model generator and the crud generator just show a blank page.

Environment:Apache 2.4.4

       :PHP 5.4.16

       :Oracle 11g

My connection script








    'enableProfiling' => true,

    'enableParamLogging' => true, 




Kindly advice.