Can't get past Gii login page
#1
Posted 03 June 2010 - 04:27 AM
When I get to the section in regards to setting up and logging into Gii, everything goes fine until I actually try to log into the application. When I log in and provide the correct password (the one I set within the main.php file), it takes me back to the login prompt. If I provide an incorrect password, it gives me an error indicating the password is incorrect. So, I know it's using my correct password. It's like the page is in an infinite loop or it's having problems loading the index.php page for some reason. Any ideas?
I also noticed that I get the following error in my apache error logs when using the Gii application (NOTE: C:/localwork/workspace_pprl is my Apache DocumentRoot):
[Thu Jun 03 04:59:52 2010] [error] [client 127.0.0.1] File does not exist: C:/localwork/workspace_pprl/testdrive/fancybox
[Thu Jun 03 04:59:52 2010] [error] [client 127.0.0.1] File does not exist: C:/localwork/workspace_pprl/testdrive/fancybox
[Thu Jun 03 04:59:52 2010] [error] [client 127.0.0.1] File does not exist: C:/localwork/workspace_pprl/testdrive/fancybox
[Thu Jun 03 04:59:52 2010] [error] [client 127.0.0.1] File does not exist: C:/localwork/workspace_pprl/testdrive/fancybox
[Thu Jun 03 04:59:52 2010] [error] [client 127.0.0.1] File does not exist: C:/localwork/workspace_pprl/testdrive/fancybox
[Thu Jun 03 04:59:52 2010] [error] [client 127.0.0.1] File does not exist: C:/localwork/workspace_pprl/testdrive/fancybox
I am using Apache 2.2.15 / PHP 5.2.3 on Windows XP with IE 7 and Firefox 3.6.3.
Any help would be greatly appreciated. I've been stuck here for a couple days now and have not been able to find anything on the web describing what may be going on.
#3
Posted 03 June 2010 - 06:59 AM
Well at least now I'm getting beyond the login page. I am now getting an access denied error...which I now need to research.

Quote
You are not allowed to access this page.
I first added the following IP filter, which didn't do anything
'ipFilters' => array('127.0.0.1','localhost','172.20.10.186'),
I then added the dreaded 'false' setting, which then caused the access Error page:
'ipFilters'=>array('false'),
Any suggestions? I saw there was a post earlier that didn't have an answer on the fix....other than localhost is suppose to be the default.
From the (Gii Documentation, it says that access to Gii from localhost is enabled by default...which is what I'm doing.
Quote
I guess that really threw me off. I thought about adding localhost as a filter, but if it's enabled by default...why would I. I'll have to put in a change request to get that corrected in the documentation.
Any more help would be greatly appreciated.
#4
Posted 03 June 2010 - 07:46 AM
From checking the code of GiiModule, this is the way Gii finds your current IP:
Yii::app()->request->userHostAddress
So maybe print that out from some action to see, what's the actual IP address Gii is seeing for your client.
About access denied: What error do you get?
#5
Posted 03 June 2010 - 07:49 AM
#6
Posted 03 June 2010 - 12:07 PM
Yii::app()->request->userHostAddressdid return 127.0.0.1. Therefore, that explains why the addition of the ipFilters for localhost or 127.0.0.1 didn't change anything.
If I set the ipFilters to 'false', I get the following error
in C:\localwork\workspace_pprl\testdrive\index.php (12) 2010/06/03 12:59:01 [error] [exception.CHttpException.403] exception 'CHttpException' with message 'You are not allowed to access this page.' in C:\localwork\workspace_pprl\yii\framework\gii\GiiModule.php:162 Stack trace: #0 C:\localwork\workspace_pprl\yii\framework\web\CController.php(255): GiiModule->beforeControllerAction(Object(DefaultController), Object(CInlineAction)) #1 C:\localwork\workspace_pprl\yii\framework\web\CWebApplication.php(320): CController->run('login') #2 C:\localwork\workspace_pprl\yii\framework\web\CWebApplication.php(120): CWebApplication->runController('gii/default/log...') #3 C:\localwork\workspace_pprl\yii\framework\base\CApplication.php(135): CWebApplication->processRequest() #4 C:\localwork\workspace_pprl\testdrive\index.php(12): CApplication->run() #5 {main} REQUEST_URI=/testdrive/index.php?r=gii/default/login 2010/06/03 12:59:01 [trace] [system.CModule] Loading "errorHandler" application component 2010/06/03 12:59:01 [trace] [system.CModule] Loading "user" application component in C:\localwork\workspace_pprl\yii\framework\gii\GiiModule.php (168) 2010/06/03 12:59:01 [trace] [system.CModule] Loading "session" application component in C:\localwork\workspace_pprl\yii\framework\gii\GiiModule.php (168) 2010/06/03 12:59:01 [trace] [system.CModule] Loading "clientScript" application component in C:\localwork\workspace_pprl\yii\framework\gii\views\layouts\main.php (2) in C:\localwork\workspace_pprl\yii\framework\gii\views\layouts\column1.php (7) in C:\localwork\workspace_pprl\yii\framework\gii\controllers\DefaultController.php (27) 2010/06/03 12:59:01 [trace] [system.CModule] Loading "assetManager" application component in C:\localwork\workspace_pprl\yii\framework\gii\GiiModule.php (136) in C:\localwork\workspace_pprl\yii\framework\gii\views\layouts\main.php (3) in C:\localwork\workspace_pprl\yii\framework\gii\views\layouts\column1.php (7)
So I would like to stick with the localhost issue without turning off the ipFilters. In addition to getting the errors from the apache server (mentioned in original post), I get the following from the apache access logs
127.0.0.1 - - [03/Jun/2010:12:54:21 -0400] "GET /testdrive/index.php?r=gii/default/login HTTP/1.1" 200 2403 127.0.0.1 - - [03/Jun/2010:12:54:21 -0400] "GET /testdrive/assets/4e9f0adc/css/screen.css HTTP/1.1" 304 - 127.0.0.1 - - [03/Jun/2010:12:54:21 -0400] "GET /testdrive/assets/4e9f0adc/css/print.css HTTP/1.1" 304 - 127.0.0.1 - - [03/Jun/2010:12:54:21 -0400] "GET /testdrive/assets/4e9f0adc/css/ie.css HTTP/1.1" 304 - 127.0.0.1 - - [03/Jun/2010:12:54:21 -0400] "GET /testdrive/assets/4e9f0adc/css/main.css HTTP/1.1" 304 - 127.0.0.1 - - [03/Jun/2010:12:54:21 -0400] "GET /testdrive/assets/4e9f0adc/js/fancybox/jquery.fancybox-1.3.1.css HTTP/1.1" 304 - 127.0.0.1 - - [03/Jun/2010:12:54:21 -0400] "GET /testdrive/assets/c4b0baf3/jquery.js HTTP/1.1" 304 - 127.0.0.1 - - [03/Jun/2010:12:54:21 -0400] "GET /testdrive/assets/4e9f0adc/js/tools.tooltip-1.1.3.min.js HTTP/1.1" 304 - 127.0.0.1 - - [03/Jun/2010:12:54:21 -0400] "GET /testdrive/assets/4e9f0adc/js/fancybox/jquery.fancybox-1.3.1.pack.js HTTP/1.1" 304 - 127.0.0.1 - - [03/Jun/2010:12:54:21 -0400] "GET /testdrive/assets/4e9f0adc/js/main.js HTTP/1.1" 304 - 127.0.0.1 - - [03/Jun/2010:12:54:21 -0400] "GET /testdrive/assets/4e9f0adc/images/logo.png HTTP/1.1" 304 - 127.0.0.1 - - [03/Jun/2010:12:54:21 -0400] "GET /testdrive/assets/4e9f0adc/js/fancybox/blank.gif HTTP/1.1" 304 - 127.0.0.1 - - [03/Jun/2010:12:54:21 -0400] "GET /testdrive/fancybox/fancy_loading.png HTTP/1.1" 404 234 127.0.0.1 - - [03/Jun/2010:12:54:21 -0400] "GET /testdrive/fancybox/fancy_close.png HTTP/1.1" 404 232 127.0.0.1 - - [03/Jun/2010:12:54:21 -0400] "GET /testdrive/fancybox/fancy_nav_right.png HTTP/1.1" 404 236 127.0.0.1 - - [03/Jun/2010:12:54:21 -0400] "GET /testdrive/fancybox/fancy_nav_left.png HTTP/1.1" 404 235 127.0.0.1 - - [03/Jun/2010:12:54:21 -0400] "GET /testdrive/fancybox/fancy_shadow_nw.png HTTP/1.1" 404 236 127.0.0.1 - - [03/Jun/2010:12:54:21 -0400] "GET /testdrive/fancybox/fancy_shadow_w.png HTTP/1.1" 404 235 127.0.0.1 - - [03/Jun/2010:12:54:21 -0400] "GET /testdrive/fancybox/fancy_shadow_sw.png HTTP/1.1" 404 236 127.0.0.1 - - [03/Jun/2010:12:54:21 -0400] "GET /testdrive/fancybox/fancy_shadow_s.png HTTP/1.1" 404 235 127.0.0.1 - - [03/Jun/2010:12:54:21 -0400] "GET /testdrive/fancybox/fancy_shadow_se.png HTTP/1.1" 404 236 127.0.0.1 - - [03/Jun/2010:12:54:21 -0400] "GET /testdrive/fancybox/fancy_shadow_e.png HTTP/1.1" 404 235 127.0.0.1 - - [03/Jun/2010:12:54:21 -0400] "GET /testdrive/fancybox/fancy_shadow_ne.png HTTP/1.1" 404 236 127.0.0.1 - - [03/Jun/2010:12:54:21 -0400] "GET /testdrive/fancybox/fancy_shadow_n.png HTTP/1.1" 404 235 127.0.0.1 - - [03/Jun/2010:12:54:23 -0400] "POST /testdrive/index.php?r=gii/default/login HTTP/1.1" 302 - 127.0.0.1 - - [03/Jun/2010:12:54:24 -0400] "GET /testdrive/index.php?r=gii HTTP/1.1" 302 - 127.0.0.1 - - [03/Jun/2010:12:54:24 -0400] "GET /testdrive/index.php?r=gii/default/login HTTP/1.1" 200 2403 127.0.0.1 - - [03/Jun/2010:12:54:24 -0400] "GET /testdrive/assets/4e9f0adc/css/screen.css HTTP/1.1" 304 - 127.0.0.1 - - [03/Jun/2010:12:54:24 -0400] "GET /testdrive/assets/4e9f0adc/css/print.css HTTP/1.1" 304 - 127.0.0.1 - - [03/Jun/2010:12:54:24 -0400] "GET /testdrive/assets/4e9f0adc/css/ie.css HTTP/1.1" 304 - 127.0.0.1 - - [03/Jun/2010:12:54:24 -0400] "GET /testdrive/assets/4e9f0adc/css/main.css HTTP/1.1" 304 - 127.0.0.1 - - [03/Jun/2010:12:54:24 -0400] "GET /testdrive/assets/4e9f0adc/js/fancybox/jquery.fancybox-1.3.1.css HTTP/1.1" 304 - 127.0.0.1 - - [03/Jun/2010:12:54:24 -0400] "GET /testdrive/assets/c4b0baf3/jquery.js HTTP/1.1" 304 - 127.0.0.1 - - [03/Jun/2010:12:54:24 -0400] "GET /testdrive/assets/4e9f0adc/js/tools.tooltip-1.1.3.min.js HTTP/1.1" 304 - 127.0.0.1 - - [03/Jun/2010:12:54:24 -0400] "GET /testdrive/assets/4e9f0adc/js/fancybox/jquery.fancybox-1.3.1.pack.js HTTP/1.1" 304 - 127.0.0.1 - - [03/Jun/2010:12:54:24 -0400] "GET /testdrive/assets/4e9f0adc/js/main.js HTTP/1.1" 304 - 127.0.0.1 - - [03/Jun/2010:12:54:24 -0400] "GET /testdrive/assets/4e9f0adc/images/logo.png HTTP/1.1" 304 - 127.0.0.1 - - [03/Jun/2010:12:54:24 -0400] "GET /testdrive/assets/4e9f0adc/js/fancybox/blank.gif HTTP/1.1" 304 - 127.0.0.1 - - [03/Jun/2010:12:54:24 -0400] "GET /testdrive/fancybox/fancy_loading.png HTTP/1.1" 404 234 127.0.0.1 - - [03/Jun/2010:12:54:24 -0400] "GET /testdrive/fancybox/fancy_close.png HTTP/1.1" 404 232 127.0.0.1 - - [03/Jun/2010:12:54:24 -0400] "GET /testdrive/fancybox/fancy_nav_right.png HTTP/1.1" 404 236 127.0.0.1 - - [03/Jun/2010:12:54:24 -0400] "GET /testdrive/fancybox/fancy_nav_left.png HTTP/1.1" 404 235 127.0.0.1 - - [03/Jun/2010:12:54:24 -0400] "GET /testdrive/fancybox/fancy_shadow_nw.png HTTP/1.1" 404 236 127.0.0.1 - - [03/Jun/2010:12:54:24 -0400] "GET /testdrive/fancybox/fancy_shadow_w.png HTTP/1.1" 404 235 127.0.0.1 - - [03/Jun/2010:12:54:24 -0400] "GET /testdrive/fancybox/fancy_shadow_sw.png HTTP/1.1" 404 236 127.0.0.1 - - [03/Jun/2010:12:54:24 -0400] "GET /testdrive/fancybox/fancy_shadow_s.png HTTP/1.1" 404 235 127.0.0.1 - - [03/Jun/2010:12:54:24 -0400] "GET /testdrive/fancybox/fancy_shadow_se.png HTTP/1.1" 404 236 127.0.0.1 - - [03/Jun/2010:12:54:24 -0400] "GET /testdrive/fancybox/fancy_shadow_e.png HTTP/1.1" 404 235 127.0.0.1 - - [03/Jun/2010:12:54:24 -0400] "GET /testdrive/fancybox/fancy_shadow_ne.png HTTP/1.1" 404 236 127.0.0.1 - - [03/Jun/2010:12:54:24 -0400] "GET /testdrive/fancybox/fancy_shadow_n.png HTTP/1.1" 404 235 127.0.0.1 - - [03/Jun/2010:12:55:31 -0400] "GET /testdrive/index.php?r=gii/default/login HTTP/1.1" 200 2403 127.0.0.1 - - [03/Jun/2010:12:55:31 -0400] "GET /testdrive/assets/4e9f0adc/css/screen.css HTTP/1.1" 304 - 127.0.0.1 - - [03/Jun/2010:12:55:31 -0400] "GET /testdrive/assets/4e9f0adc/css/print.css HTTP/1.1" 304 - 127.0.0.1 - - [03/Jun/2010:12:55:31 -0400] "GET /testdrive/assets/4e9f0adc/css/ie.css HTTP/1.1" 304 - 127.0.0.1 - - [03/Jun/2010:12:55:31 -0400] "GET /testdrive/assets/4e9f0adc/css/main.css HTTP/1.1" 304 - 127.0.0.1 - - [03/Jun/2010:12:55:31 -0400] "GET /testdrive/assets/c4b0baf3/jquery.js HTTP/1.1" 304 - 127.0.0.1 - - [03/Jun/2010:12:55:31 -0400] "GET /testdrive/assets/4e9f0adc/js/fancybox/jquery.fancybox-1.3.1.css HTTP/1.1" 304 - 127.0.0.1 - - [03/Jun/2010:12:55:31 -0400] "GET /testdrive/assets/4e9f0adc/js/tools.tooltip-1.1.3.min.js HTTP/1.1" 304 - 127.0.0.1 - - [03/Jun/2010:12:55:31 -0400] "GET /testdrive/assets/4e9f0adc/js/fancybox/jquery.fancybox-1.3.1.pack.js HTTP/1.1" 304 - 127.0.0.1 - - [03/Jun/2010:12:55:31 -0400] "GET /testdrive/assets/4e9f0adc/js/main.js HTTP/1.1" 304 - 127.0.0.1 - - [03/Jun/2010:12:55:31 -0400] "GET /testdrive/assets/4e9f0adc/images/logo.png HTTP/1.1" 304 - 127.0.0.1 - - [03/Jun/2010:12:55:32 -0400] "GET /testdrive/assets/4e9f0adc/js/fancybox/blank.gif HTTP/1.1" 304 - 127.0.0.1 - - [03/Jun/2010:12:55:32 -0400] "GET /testdrive/fancybox/fancy_loading.png HTTP/1.1" 404 234 127.0.0.1 - - [03/Jun/2010:12:55:32 -0400] "GET /testdrive/fancybox/fancy_close.png HTTP/1.1" 404 232 127.0.0.1 - - [03/Jun/2010:12:55:32 -0400] "GET /testdrive/fancybox/fancy_nav_right.png HTTP/1.1" 404 236 127.0.0.1 - - [03/Jun/2010:12:55:32 -0400] "GET /testdrive/fancybox/fancy_nav_left.png HTTP/1.1" 404 235 127.0.0.1 - - [03/Jun/2010:12:55:32 -0400] "GET /testdrive/fancybox/fancy_shadow_nw.png HTTP/1.1" 404 236 127.0.0.1 - - [03/Jun/2010:12:55:32 -0400] "GET /testdrive/fancybox/fancy_shadow_w.png HTTP/1.1" 404 235 127.0.0.1 - - [03/Jun/2010:12:55:32 -0400] "GET /testdrive/fancybox/fancy_shadow_sw.png HTTP/1.1" 404 236 127.0.0.1 - - [03/Jun/2010:12:55:32 -0400] "GET /testdrive/fancybox/fancy_shadow_s.png HTTP/1.1" 404 235 127.0.0.1 - - [03/Jun/2010:12:55:32 -0400] "GET /testdrive/fancybox/fancy_shadow_se.png HTTP/1.1" 404 236 127.0.0.1 - - [03/Jun/2010:12:55:32 -0400] "GET /testdrive/fancybox/fancy_shadow_e.png HTTP/1.1" 404 235 127.0.0.1 - - [03/Jun/2010:12:55:32 -0400] "GET /testdrive/fancybox/fancy_shadow_ne.png HTTP/1.1" 404 236 127.0.0.1 - - [03/Jun/2010:12:55:32 -0400] "GET /testdrive/fancybox/fancy_shadow_n.png HTTP/1.1" 404 235 127.0.0.1 - - [03/Jun/2010:12:55:35 -0400] "POST /testdrive/index.php?r=gii/default/login HTTP/1.1" 302 - 127.0.0.1 - - [03/Jun/2010:12:55:35 -0400] "GET /testdrive/index.php?r=gii HTTP/1.1" 302 - 127.0.0.1 - - [03/Jun/2010:12:55:36 -0400] "GET /testdrive/index.php?r=gii/default/login HTTP/1.1" 200 2403 127.0.0.1 - - [03/Jun/2010:12:55:36 -0400] "GET /testdrive/assets/4e9f0adc/css/print.css HTTP/1.1" 304 - 127.0.0.1 - - [03/Jun/2010:12:55:36 -0400] "GET /testdrive/assets/4e9f0adc/css/screen.css HTTP/1.1" 304 - 127.0.0.1 - - [03/Jun/2010:12:55:36 -0400] "GET /testdrive/assets/4e9f0adc/css/ie.css HTTP/1.1" 304 - 127.0.0.1 - - [03/Jun/2010:12:55:36 -0400] "GET /testdrive/assets/4e9f0adc/js/fancybox/jquery.fancybox-1.3.1.css HTTP/1.1" 304 - 127.0.0.1 - - [03/Jun/2010:12:55:36 -0400] "GET /testdrive/assets/4e9f0adc/css/main.css HTTP/1.1" 304 - 127.0.0.1 - - [03/Jun/2010:12:55:36 -0400] "GET /testdrive/assets/c4b0baf3/jquery.js HTTP/1.1" 304 - 127.0.0.1 - - [03/Jun/2010:12:55:36 -0400] "GET /testdrive/assets/4e9f0adc/js/tools.tooltip-1.1.3.min.js HTTP/1.1" 304 - 127.0.0.1 - - [03/Jun/2010:12:55:36 -0400] "GET /testdrive/assets/4e9f0adc/js/fancybox/jquery.fancybox-1.3.1.pack.js HTTP/1.1" 304 - 127.0.0.1 - - [03/Jun/2010:12:55:36 -0400] "GET /testdrive/assets/4e9f0adc/js/main.js HTTP/1.1" 304 - 127.0.0.1 - - [03/Jun/2010:12:55:36 -0400] "GET /testdrive/assets/4e9f0adc/images/logo.png HTTP/1.1" 304 - 127.0.0.1 - - [03/Jun/2010:12:55:36 -0400] "GET /testdrive/assets/4e9f0adc/js/fancybox/blank.gif HTTP/1.1" 304 - 127.0.0.1 - - [03/Jun/2010:12:55:36 -0400] "GET /testdrive/fancybox/fancy_loading.png HTTP/1.1" 404 234 127.0.0.1 - - [03/Jun/2010:12:55:36 -0400] "GET /testdrive/fancybox/fancy_close.png HTTP/1.1" 404 232 127.0.0.1 - - [03/Jun/2010:12:55:36 -0400] "GET /testdrive/fancybox/fancy_nav_right.png HTTP/1.1" 404 236 127.0.0.1 - - [03/Jun/2010:12:55:36 -0400] "GET /testdrive/fancybox/fancy_nav_left.png HTTP/1.1" 404 235 127.0.0.1 - - [03/Jun/2010:12:55:36 -0400] "GET /testdrive/fancybox/fancy_shadow_nw.png HTTP/1.1" 404 236 127.0.0.1 - - [03/Jun/2010:12:55:36 -0400] "GET /testdrive/fancybox/fancy_shadow_w.png HTTP/1.1" 404 235 127.0.0.1 - - [03/Jun/2010:12:55:36 -0400] "GET /testdrive/fancybox/fancy_shadow_sw.png HTTP/1.1" 404 236 127.0.0.1 - - [03/Jun/2010:12:55:36 -0400] "GET /testdrive/fancybox/fancy_shadow_s.png HTTP/1.1" 404 235 127.0.0.1 - - [03/Jun/2010:12:55:36 -0400] "GET /testdrive/fancybox/fancy_shadow_se.png HTTP/1.1" 404 236 127.0.0.1 - - [03/Jun/2010:12:55:36 -0400] "GET /testdrive/fancybox/fancy_shadow_e.png HTTP/1.1" 404 235 127.0.0.1 - - [03/Jun/2010:12:55:36 -0400] "GET /testdrive/fancybox/fancy_shadow_ne.png HTTP/1.1" 404 236 127.0.0.1 - - [03/Jun/2010:12:55:36 -0400] "GET /testdrive/fancybox/fancy_shadow_n.png HTTP/1.1" 404 235
Not sure why it's trying to reference the /testdrive/fancybox/ because that doesn't exist. I tried to actually copy the /fancybox/ directory at the document root as well, and it cleaned up the messages, but still no go.
The application.log under /protected/runtime/ didn't have anything that looked useful. I didn't change any of the debug/trace info in the index.php
// remove the following lines when in production mode defined('YII_DEBUG') or define('YII_DEBUG',true); defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
And have the following levels in the main.php to enable logging (error, warning, debug, trace, info).
Here is what's in application.log after I hit submit with the password:
2010/06/03 13:06:20 [trace] [system.CModule] Loading "log" application component in C:\localwork\workspace_pprl\testdrive\index.php (12) 2010/06/03 13:06:20 [trace] [system.CModule] Loading "request" application component in C:\localwork\workspace_pprl\testdrive\index.php (12) 2010/06/03 13:06:20 [trace] [system.CModule] Loading "urlManager" application component in C:\localwork\workspace_pprl\testdrive\index.php (12) 2010/06/03 13:06:20 [trace] [system.base.CModule] Loading "gii" module in C:\localwork\workspace_pprl\testdrive\index.php (12) 2010/06/03 13:06:20 [trace] [system.CModule] Loading "user" application component in C:\localwork\workspace_pprl\yii\framework\gii\GiiModule.php (168) in C:\localwork\workspace_pprl\testdrive\index.php (12) 2010/06/03 13:06:20 [trace] [system.CModule] Loading "session" application component in C:\localwork\workspace_pprl\yii\framework\gii\GiiModule.php (168) in C:\localwork\workspace_pprl\testdrive\index.php (12) 2010/06/03 13:06:20 [trace] [system.CModule] Loading "log" application component in C:\localwork\workspace_pprl\testdrive\index.php (12) 2010/06/03 13:06:20 [trace] [system.CModule] Loading "request" application component in C:\localwork\workspace_pprl\testdrive\index.php (12) 2010/06/03 13:06:20 [trace] [system.CModule] Loading "urlManager" application component in C:\localwork\workspace_pprl\testdrive\index.php (12) 2010/06/03 13:06:20 [trace] [system.base.CModule] Loading "gii" module in C:\localwork\workspace_pprl\testdrive\index.php (12) 2010/06/03 13:06:20 [trace] [system.CModule] Loading "user" application component in C:\localwork\workspace_pprl\yii\framework\gii\GiiModule.php (168) in C:\localwork\workspace_pprl\testdrive\index.php (12) 2010/06/03 13:06:20 [trace] [system.CModule] Loading "session" application component in C:\localwork\workspace_pprl\yii\framework\gii\GiiModule.php (168) in C:\localwork\workspace_pprl\testdrive\index.php (12) 2010/06/03 13:06:20 [trace] [system.CModule] Loading "log" application component in C:\localwork\workspace_pprl\testdrive\index.php (12) 2010/06/03 13:06:20 [trace] [system.CModule] Loading "request" application component in C:\localwork\workspace_pprl\testdrive\index.php (12) 2010/06/03 13:06:20 [trace] [system.CModule] Loading "urlManager" application component in C:\localwork\workspace_pprl\testdrive\index.php (12) 2010/06/03 13:06:20 [trace] [system.base.CModule] Loading "gii" module in C:\localwork\workspace_pprl\testdrive\index.php (12) 2010/06/03 13:06:20 [trace] [system.CModule] Loading "user" application component in C:\localwork\workspace_pprl\yii\framework\gii\GiiModule.php (168) in C:\localwork\workspace_pprl\testdrive\index.php (12) 2010/06/03 13:06:20 [trace] [system.CModule] Loading "session" application component in C:\localwork\workspace_pprl\yii\framework\gii\GiiModule.php (168) in C:\localwork\workspace_pprl\testdrive\index.php (12) 2010/06/03 13:06:20 [trace] [system.CModule] Loading "clientScript" application component in C:\localwork\workspace_pprl\yii\framework\gii\views\layouts\main.php (2) in C:\localwork\workspace_pprl\yii\framework\gii\views\layouts\column1.php (7) in C:\localwork\workspace_pprl\yii\framework\gii\controllers\DefaultController.php (47) 2010/06/03 13:06:20 [trace] [system.CModule] Loading "assetManager" application component in C:\localwork\workspace_pprl\yii\framework\gii\GiiModule.php (136) in C:\localwork\workspace_pprl\yii\framework\gii\views\layouts\main.php (3) in C:\localwork\workspace_pprl\yii\framework\gii\views\layouts\column1.php (7)
Sorry this is long winded.
Thanks again for your help.
#7
Posted 03 June 2010 - 08:52 PM
'modules'=>array( 'gii'=>array( 'class'=>'system.gii.GiiModule', 'password'=>false, ), ),
Not sure why when I provide a password, I can't get off the login page. I've been using 'test' as the password (tried a few others as well). It's like it's recognizing the password because if it put in the wrong password...then it give me the invalid password message.
It looks like it has to do something in the GIIModule.php beforeControllerAction(...) method. I did a trace on the $route variable and it's default/login...which is correct. I assume we are always going to be a Guest?
Any thoughts? I'll continue to research.
#8
Posted 03 June 2010 - 09:14 PM
Yii::app()->user->login($this->_identity);
If I pass in a numerical value greater than 0.....it works! (see below)
Yii::app()->user->login($this->_identity,100);
Is this a bug? Can you explain to me why I need to do this and everyone else doesn't...if it's not a bug.
The CWebUser login(..) method has the following comments:
* @param integer number of seconds that the user can remain in logged-in status. Defaults to 0, meaning login till the user closes the browser. * If greater than 0, cookie-based login will be used. In this case, {@link allowAutoLogin} * must be set true, otherwise an exception will be thrown.
Any ideas?
#9
Posted 04 June 2010 - 01:49 AM
#10
Posted 06 June 2010 - 07:54 AM
It's like the web server isn't able to store sessions at all. I created a simple PHP page that starts a session, stores a variable (if it doesn't exist or increments it if it does exist), then display it on the web page. Every time the page is hit, a new session is created.
The one good thing that is coming out of this is that I got hands on use of debugging PHP files in Eclipse PDT. It seems to work OK, although I had to have my workspace root as the document root in order to be able to modify and run them. Not sure if that is the best practice...but it worked for now.
#11
Posted 06 June 2010 - 10:56 AM

It was a setting within the php.ini file. I had a full directory path for the
session.save_pathvariable instead of a relative path from the PHP root directory.
I originally had (tried it with the \ as file separators as well)
session.save_path = "c:/localwork/php/temp"
but then changed it to
session.save_path = "/temp"
and now the session works OK within the Apache/PHP server and the Gii application works as well.
Thank you Mike for all your help. If you have any recommendations or can point me to best practices for a development environment for PHP/Yii development...that would be great. I come from 13 years experience with Java/J2EE development with EAR/WAR packaging, etc. I see some things are pretty similar, but others are different.
Thanks again.
#12
Posted 05 February 2012 - 06:19 PM
#13
Posted 05 February 2012 - 06:23 PM
Do not change the defaults unless you know exactly what you are doing!
And by default: you don't.

Wampserver installation routine needs to make this more clear.
#14
Posted 01 March 2012 - 07:48 PM
#15
Posted 11 May 2013 - 08:27 PM
#16
Posted 30 December 2013 - 10:50 AM
joseph, on 06 June 2010 - 10:56 AM, said:

It was a setting within the php.ini file. I had a full directory path for the
session.save_pathvariable instead of a relative path from the PHP root directory.
I originally had (tried it with the \ as file separators as well)
session.save_path = "c:/localwork/php/temp"
but then changed it to
session.save_path = "/temp"
and now the session works OK within the Apache/PHP server and the Gii application works as well.
Thank you Mike for all your help. If you have any recommendations or can point me to best practices for a development environment for PHP/Yii development...that would be great. I come from 13 years experience with Java/J2EE development with EAR/WAR packaging, etc. I see some things are pretty similar, but others are different.
Thanks again.
mine is set to
session.save_path="/Applications/XAMPP/xamppfiles/temp/"
and permission is set to 777 for the temp/ folder. still no luck here
