baskcoder
(Sunilkumarba)
November 7, 2010, 7:10pm
1
Hi,
[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:
127.0.0.1 - - [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
[/indent]Thanks
Sunil
mikl
(Mike)
November 7, 2010, 7:41pm
2
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?
baskcoder
(Sunilkumarba)
November 7, 2010, 8:20pm
3
The problem was not with apache or php or Yii. It was Windows 7. It wasn’t resolving localhost to 127.0.0.1. Solved the problem by adding the entry
127.0.0.1 localhost
in C:\Windows\System32\drivers\etc\hosts file. Everything is working fine now.
Thanks
@baskoder
Could you make sure you have your PHP’s error set to E_ALL? Very weird you have a blank page…
Congrats
baskcoder
(Sunilkumarba)
November 7, 2010, 8:54pm
5
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:)
mikl
(Mike)
November 8, 2010, 5:46am
6
baskcoder:
The problem was not with apache or php or Yii. It was Windows 7. It wasn’t resolving localhost to 127.0.0.1. Solved the problem by adding the entry
127.0.0.1 localhost
in C:\Windows\System32\drivers\etc\hosts file. Everything is working fine now.
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.
Moonshiner
(Kennedy Gachagua)
November 19, 2013, 9:28am
7
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
‘db’=>array(
'class'=>'ext.oci8Pdo.OciDbConnection',
'connectionString'=>'oci:dbname=localhost:1521/RAYSAPP;
charset=UTF8',
'username'=>'xxxxx',
'password'=>'xxxxxx',
'enableProfiling' => true,
'enableParamLogging' => true,
),
Kindly advice.