Yii Framework Forum: cannot login to gii - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

cannot login to gii cannot login to gii Rate Topic: ***** 1 Votes

#1 User is offline   nightingale 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 18-November 10

Posted 18 November 2010 - 12:28 AM

Hi,

I just following the yii-blog.pdf from the documentation, when I tried to login to gii, it keep showing me the login form all the time.

I create a virtual host for this like http://yii.blog
and then tried to access from http://yii.blog/index.php?r=gii

in the config/main.php
	'modules'=>array(
		// uncomment the following to enable the Gii tool
		'gii'=>array(
			'class'=>'system.gii.GiiModule',
			'password'=>'12345',
                        //'ipFilters'=>array('127.0.0.1','yii.blog')
		),
	),


when I type the wrong password the form could say "Incorrect password."
but when I type the correct one, it didn't say any error and it keep showing me the login form.

btw I am using YII 1.1.5

any idea how to solve this ?


thank you :)
1

#2 User is offline   Veseliq 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 31
  • Joined: 21-September 10
  • Location:Sofia, Bulgaria

Posted 18 November 2010 - 03:40 AM

Seems to me its either web server problem or routing problem - can you give me your routing rules.. Or there might be a session / cookie problem. Try with different browser, or try cleaning your cache.
0

#3 User is offline   awesomejuice 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 35
  • Joined: 22-July 10

Posted 18 November 2010 - 12:27 PM

Have you tried http://localhost/<sitepath>/gii/ ? Assuming you're running locally.
0

#4 User is offline   Neth 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 01-December 10

Posted 01 December 2010 - 05:36 AM

Hi,

I'm having the same problem. Yii version 1.1.5. All requirements passed. Running under xampp on windows. Freshly created webapp with

yiic webapp test

Page created and accessible via http://localhost/test/. No problems there.

Uncommenting the part in the main.php configuration file

'gii'=>array(
    'class'=>'system.gii.GiiModule',
    'password'=>'12345',
),

going to http://localhost/test/index.php?r=gii (redirected to http://localhost/tes...i/default/login)
Logging with the password and... that's it. Nothing happens. I see the same url http://localhost/tes.../default/login. When I'm using a wrong password it gives me an error. Nothing happens with the correct one.
Tried this with firefox, ie and chrome with same result.

Any ideas how to get it to work?

Cheers
Neth
0

#5 User is offline   andy_s 

  • Random Member Title
  • Yii
  • Group: Moderators
  • Posts: 1,526
  • Joined: 22-June 09
  • Location:Russia, Kostroma

Posted 03 February 2011 - 07:43 AM

I see this topic is pretty old, but the problem is not solved yet.
The same problem was discussed in the russian subforum. PHP sessions didn't work at all in Windows and the reason was a wrong config:

session.cookie_path \

changed to

session.cookie_path /

Here is a full version of the (default) working session config in Windows:

Session Support enabled
Registered save handlers        files user
Registered serializer handlers  php php_binary wddx

Directive       Local Value     Master Value
session.auto_start      Off     Off
session.bug_compat_42   Off     Off
session.bug_compat_warn Off     Off
session.cache_expire    180     180
session.cache_limiter   nocache nocache
session.cookie_domain   no value        no value
session.cookie_httponly Off     Off
session.cookie_lifetime 0       0
session.cookie_path     /       /
session.cookie_secure   Off     Off
session.entropy_file    no value        no value
session.entropy_length  0       0
session.gc_divisor      1000    1000
session.gc_maxlifetime  1440    1440
session.gc_probability  1       1
session.hash_bits_per_character 5       5
session.hash_function   0       0
session.name    PHPSESSID       PHPSESSID
session.referer_check   no value        no value
session.save_handler    files   files
session.save_path       C:\WINDOWS\Temp C:\WINDOWS\Temp
session.serialize_handler       php     php
session.use_cookies     On      On
session.use_only_cookies        On      On
session.use_trans_sid   0       0

Hope it helps.
1

#6 User is offline   Chris in Ohio 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 26-October 10

Posted 06 March 2011 - 01:57 PM

Unable to login to the Gii interface. Pretty vanilla setup. Followed this and every other thread that tries to help with this issue on this site. Have edited the PHP.INI file as suggested above for Windows. It seems to me that someone should have a simple solution, which would allow for Gii to work simply by uncommenting the module in the main.php configuration file. Instead, literally hours of precious life is lost trying to get working, what should be a minor step in using yii on a development server.

Win XP
PHP 5.3
Yii 1.1.6

'modules'=>array(
'gii'=>array(
'class'=>'system.gii.GiiModule',
'password'=>'testing',
//ipfilter...etc.

Have tried 127.0.0.1 and also my lan ip for this machine and also tried gii login by commenting out the filer param...


Also could not get phpunit working. I understand that Windows/Microsoft sucks. I am stuck with it for now, as many people are who want to be able to work with PHP.


Any idea why I am getting the wrong password error in every browser, after clearing all cookies...etc?
0

#7 User is offline   chanh 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 86
  • Joined: 09-March 09
  • Location:Seattle

Posted 06 March 2011 - 05:53 PM

If all else fail try this instead and it should work.

'ipFilters'=>array($_SERVER['REMOTE_ADDR']),
http://ongetc.com (COAddOns for Mambo, Joomla, MiaCMS & forks and HowTo)
http://mosecms.tk (Mose framework & CMS)
0

#8 User is offline   macinville 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 268
  • Joined: 25-October 10
  • Location:Marikina City, Philippines

Posted 07 March 2011 - 11:20 AM

View Postchanh, on 06 March 2011 - 05:53 PM, said:

If all else fail try this instead and it should work.

'ipFilters'=>array($_SERVER['REMOTE_ADDR']),


If Chris is experiencing an old password error, that means there is no problem with accessing Gii...Btw, Chris in Ohio, are you experiencing the incorrect password in Gii?


And uhmm..probably it would be better if a new topic will be created, instead of reviving an old topic. What do you think?
Tell your tail.
Don't be shy to upvote a post if it was able to help you
0

#9 User is offline   chanh 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 86
  • Joined: 09-March 09
  • Location:Seattle

Posted 07 March 2011 - 03:56 PM

View Postmacinville, on 07 March 2011 - 11:20 AM, said:

And uhmm..probably it would be better if a new topic will be created, instead of reviving an old topic. What do you think?


who are you directing this question to?
http://ongetc.com (COAddOns for Mambo, Joomla, MiaCMS & forks and HowTo)
http://mosecms.tk (Mose framework & CMS)
0

#10 User is offline   macinville 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 268
  • Joined: 25-October 10
  • Location:Marikina City, Philippines

Posted 07 March 2011 - 08:11 PM

Hi chanh,

I am referring to Chris. I understand you just replied to his problem as a good forum member. :)
Tell your tail.
Don't be shy to upvote a post if it was able to help you
0

#11 User is offline   xsano33 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 31-August 10

Posted 01 April 2011 - 04:21 AM

I had a same problem finally got it fixed. This was PHP's session problem, as you mentioned, in the php session directory (in my case, /var/lib/php/session) the web server user (daemon) did not have the permission to write in.

I chowned the directory from root to daemon and it worked fine.
(Fedora)
0

#12 User is offline   Vashkatsi 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 08-March 13

Posted 08 March 2013 - 03:18 PM

I have the same problem but i still can not resolve it. I chowned the directory (/var/lib/php5) from root to daemon, i have set permissions 777 for directory. It doesn`t work, please help me.
0

#13 User is offline   dellboyy 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 19-March 13

Posted 19 March 2013 - 05:15 AM

View PostVashkatsi, on 08 March 2013 - 03:18 PM, said:

I have the same problem but i still can not resolve it. I chowned the directory (/var/lib/php5) from root to daemon, i have set permissions 777 for directory. It doesn`t work, please help me.


xsano33's solution worked for me. Vashkatsi, check in your php.ini as to what dir you have set for session.save_path, and then make sure that folder is writable by your web user/group.
0

#14 User is offline   zariphix 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 13-May 14

Posted 13 August 2014 - 10:54 PM

I used memcached before.

And I change session.save_handler from memcached to file and chmod 777 of the directory, then it works fine.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users