The Joomla! Forum ™



Forum rules


Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.



Post new topic Reply to topic  [ 50 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Mon Nov 20, 2006 4:04 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Tue Oct 31, 2006 2:11 am
Posts: 8
Mod Note: Split from http://forum.joomla.org/index.php/topic,115866.0.html -RobS

I'm having a similar login issue, but on the administrator side.  For some reason when i go to http://www.mysite.com/administrator and enter my username and passsword it just refreshes the page and ends up at the same place.  I can login as many times as I want, but it just refreshes the page. 

I was having the double login issue on the front end, but the files posted at the beginning of this thread fixed that problem.

Any help will be appreciated.

Thanks


Last edited by miki89 on Tue Nov 21, 2006 12:24 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Admin Login Issues
PostPosted: Mon Nov 20, 2006 1:51 pm 
Joomla! Guru
Joomla! Guru
Offline

Joined: Sat Sep 10, 2005 10:31 pm
Posts: 842
Hi jkcarr2,

jkcarr2 wrote:
I'm having a similar login issue, but on the administrator side.  For some reason when i go to http://www.mysite.com/administrator and enter my username and passsword it just refreshes the page and ends up at the same place.  I can login as many times as I want, but it just refreshes the page. 


There can different reasons why the admin login keeps faling. One thing you could check: in your PHP configuration, session.auto_start must be switched off. If that doesn't help, please post (or send by PM) a URL where this can be seen, sometimes it's possible to find the cause just by watching the servers response to a login request.


P.S.:I would like to keep this thread related to frontend login issues. Can some MOD please split these two posts into a new tread?

_________________
We may not be able to control the wind, but we can always adjust our sails


Top
 Profile  
 
 Post subject: Re: Admin Login Issues
PostPosted: Mon Nov 20, 2006 5:46 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Wed Nov 08, 2006 9:23 pm
Posts: 17
I have the same problem as jkcarr2 and it gives me awful headache. I am searching for solution for three days. Somethimes I can log on, and sometimes for a half day not. I noticed that when i could not login I have the poll (enabled cookies) issue. In configuration.php I did not found session.auto_start. What else can i try?

P.S. On the same server I have another joomla folder and it's works just fine.


Top
 Profile  
 
 Post subject: Re: Admin Login Issues
PostPosted: Mon Nov 20, 2006 6:15 pm 
User avatar
Joomla! Ace
Joomla! Ace
Offline

Joined: Mon Dec 05, 2005 10:17 am
Posts: 1367
Location: New Orleans, LA, USA
session.auto_start would not be in the configuration.php file.  It would be in the PHP settings. 

If you feel comfortable, try editing the ./administrator/index.php ~39 you will see

Code:
if (isset( $_POST['submit'] )) {
         /** escape and trim to minimise injection of malicious sql */
         $usrname        = stripslashes( mosGetParam( $_POST, 'usrname', NULL ) );
         $pass           = stripslashes( mosGetParam( $_POST, 'pass', NULL ) );
 
         if($pass == NULL) {
                 echo "<script>alert('Please enter a password'); document.location.href='index.php?mosmsg=Please enter a password'</script>\n";
                 exit();
         } else {
                 $pass = md5( $pass );
         }


Change it to:

Code:
if (isset( $_POST['submit'] )) {
         /** escape and trim to minimise injection of malicious sql */
         $usrname        = stripslashes( mosGetParam( $_POST, 'usrname', NULL ) );
         $pass           = stripslashes( mosGetParam( $_POST, 'pass', NULL ) );
 
         if( ini_get ( 'session.auto_start' ) ) {
                 echo "<script>document.location.href='index.php?mosmsg=PHP\'s session.auto_start setting is on.  You must turn this setting off before you will be able to login.'</script>\n";
         }

         if($pass == NULL) {
                 echo "<script>alert('Please enter a password'); document.location.href='index.php?mosmsg=Please enter a password'</script>\n";
                 exit();
         } else {
                 $pass = md5( $pass );
         }


The next time you try to login to the Administrator interface, if session.auto_start is on a message will show above the login form alerting you about the setting.

Edit: Note, you have to actually submit the form once before the message will show up.

_________________
Rob Schley - Open Source Matters
Webimagery - http://www.webimagery.net/ - Professional Consulting Services
JXtended - http://www.jxtended.com/ - Free and Commercial Joomla! Extensions


Last edited by RobS on Mon Nov 20, 2006 6:22 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Admin Login Issues
PostPosted: Mon Nov 20, 2006 9:29 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Tue Oct 31, 2006 2:11 am
Posts: 8
Thanks for the replies.  I am experiencing this problem with every upgrade to 1.0.11 I try.  I was going to try changing the code that RobS recommended, but I couldn't find it in adminstrator/index.php.  Is there anywhere else it may be?

Thanks again


Top
 Profile  
 
 Post subject: Re: Admin Login Issues
PostPosted: Mon Nov 20, 2006 10:07 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Wed Nov 08, 2006 9:23 pm
Posts: 17
Thanks for reply from my side to. I replace the code in /administrator/index.php but there is no change. What else can I try?


Top
 Profile  
 
 Post subject: Re: Admin Login Issues
PostPosted: Mon Nov 20, 2006 10:43 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Tue Oct 31, 2006 2:11 am
Posts: 8
I found the code in administrator/index.php.  Not sure why I didn't see it first time. I replaced it, but it didn't fix.  After I enter my username and password and hit submit it goes to index2.php for a second, then just goes back to the login page.  The address bar then says http://www.wiseowlconsulting.com/admini ... to%20login.


Top
 Profile  
 
 Post subject: Re: Admin Login Issues
PostPosted: Mon Nov 20, 2006 11:58 pm 
User avatar
Joomla! Ace
Joomla! Ace
Offline

Joined: Mon Dec 05, 2005 10:17 am
Posts: 1367
Location: New Orleans, LA, USA
Could you both make sure that you have cookies enabled in your browsers?  I know it sounds obvious but sometimes people forget and it happens...

_________________
Rob Schley - Open Source Matters
Webimagery - http://www.webimagery.net/ - Professional Consulting Services
JXtended - http://www.jxtended.com/ - Free and Commercial Joomla! Extensions


Top
 Profile  
 
 Post subject: Re: Admin Login Issues
PostPosted: Tue Nov 21, 2006 12:03 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Tue Oct 31, 2006 2:11 am
Posts: 8
I do have cookies enabled.


Top
 Profile  
 
 Post subject: Re: Admin Login Issues
PostPosted: Tue Nov 21, 2006 12:29 am 
Joomla! Guru
Joomla! Guru
Offline

Joined: Sat Sep 10, 2005 10:31 pm
Posts: 842
About the problem at Cyb3r's site (thanks for sending me the link by PM): looks like cookies are disabled on your site at all! No cookie is set after loging in (since I got redirected to index2.php, I know the username/PW was accepted). The strange thing is this: also on the frontend site, no cookies are set! Do you manage to log in to the frontend at all? I guess not?

To jkcarr2: Cookies get set on the frontend of your site. Can you please take a look at your php config (usually php.ini), and make sure the setting for session.use_cookies is set to 1? Also, make sure the session path is writeable. E.g. if your servers hard drive is full, it can't store the settings for your session.

_________________
We may not be able to control the wind, but we can always adjust our sails


Top
 Profile  
 
 Post subject: Re: Admin Login Issues
PostPosted: Tue Nov 21, 2006 1:00 am 
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Thu Apr 20, 2006 1:47 pm
Posts: 165
One thing that happened to me once was to encode the lang file on UTF-8 with Windows NotePad, and didn't noticed, it adds some non-printable characters before the start of the text. Those non-printable chars fill the output buffer avoiding the site to set the cookies.
Here's how to check if this is your error:

With FireFox disable JavaScript and try to login - This is to avoid JS to send you back to login form.
Check if you have an error like "Can't set cookie. Headers already sent...."

To correct:

Open your lang file with a another (more decent) Text Editor, like EMACS (for Windows ftp://ftp.gnu.org/gnu/emacs/windows/) and delete any weird stuff before

_________________
Due to a HD failure my personal website is down... will try to get it back ASAP


Top
 Profile  
 
 Post subject: Re: Admin Login Issues
PostPosted: Tue Nov 21, 2006 1:19 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Tue Oct 31, 2006 2:11 am
Posts: 8
I checked the php.ini file and it had session.use_cookies set to 1.  I also tried the disable java script.  It didn't refresh the page like usual, but it didn't let me in the system either.  It just took me to a blank white page.  I didn't see anything about errors.  I'm new to most of this stuff and am not sure how to check to make sure the session path is writeable.  I use a server through a hosting company (powweb) 

Also tried to PM you earlier friesengeist, but for some reason I keep getting an error saying I can't PM.  Is there something I have to do to enable that feature?

Thanks again for all of the help!


Top
 Profile  
 
 Post subject: Re: Admin Login Issues
PostPosted: Tue Nov 21, 2006 1:22 am 
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Thu Apr 20, 2006 1:47 pm
Posts: 165
Try check your server's error log.

_________________
Due to a HD failure my personal website is down... will try to get it back ASAP


Top
 Profile  
 
 Post subject: Re: Admin Login Issues
PostPosted: Tue Nov 21, 2006 1:23 am 
Joomla! Guru
Joomla! Guru
Offline

Joined: Sat Sep 10, 2005 10:31 pm
Posts: 842
Good catch, sirathur!

sirarthur wrote:
With FireFox disable JavaScript and try to login - This is to avoid JS to send you back to login form.
Check if you have an error like "Can't set cookie. Headers already sent...."


I just checked Cyb3r's site by sniffing the request, and indeed, there seem to be some BOM bytes at the beginning of the response data. No error messages though, probably display_errors disabled, like on every good production site. Cyb3r, could you please also check your error log?

_________________
We may not be able to control the wind, but we can always adjust our sails


Top
 Profile  
 
 Post subject: Re: Admin Login Issues
PostPosted: Tue Nov 21, 2006 1:25 am 
Joomla! Guru
Joomla! Guru
Offline

Joined: Sat Sep 10, 2005 10:31 pm
Posts: 842
jkcarr2 wrote:
Also tried to PM you earlier friesengeist, but for some reason I keep getting an error saying I can't PM.  Is there something I have to do to enable that feature?


Sorry about that, for protection against spammers, you need to have at least five posts here at the forum before you can send PMs. So now you should be fine ;) I just forgot about that.

_________________
We may not be able to control the wind, but we can always adjust our sails


Top
 Profile  
 
 Post subject: Re: Admin Login Issues
PostPosted: Tue Nov 21, 2006 7:02 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Wed Nov 08, 2006 9:23 pm
Posts: 17
This happens when i try to log as administrator (from error log):
Code:
[21-Nov-2006 07:55:49] PHP Warning:  session_start(): Cannot send session cookie - headers already sent by (output started at C:\apache2triad\htdocs\holy-colly\includes\version.php:1) in C:\apache2triad\htdocs\holy-colly\administrator\index.php on line 91
[21-Nov-2006 07:55:49] PHP Warning:  session_start(): Cannot send session cache limiter - headers already sent (output started at C:\apache2triad\htdocs\holy-colly\includes\version.php:1) in C:\apache2triad\htdocs\holy-colly\administrator\index.php on line 91
[21-Nov-2006 07:55:50] PHP Warning:  session_start(): Cannot send session cookie - headers already sent by (output started at C:\apache2triad\htdocs\holy-colly\includes\version.php:1) in C:\apache2triad\htdocs\holy-colly\administrator\index2.php on line 30
[21-Nov-2006 07:55:50] PHP Warning:  session_start(): Cannot send session cache limiter - headers already sent (output started at C:\apache2triad\htdocs\holy-colly\includes\version.php:1) in C:\apache2triad\htdocs\holy-colly\administrator\index2.php on line 30


friesengeist, I send you PM with atached index.php and index2.php. Keep in mind that I changed part of code with RobS code (discrbed few posts earlier).


Top
 Profile  
 
 Post subject: Re: Admin Login Issues
PostPosted: Tue Nov 21, 2006 7:12 am 
Joomla! Guru
Joomla! Guru
Offline

Joined: Sat Sep 10, 2005 10:31 pm
Posts: 842
Cyb3r wrote:
This happens when i try to log as administrator (from error log):
Quote:
[...] headers already sent by (output started at C:\apache2triad\htdocs\holy-colly\includes\version.php:1) in C:\apache2triad\htdocs\holy-colly\administrator\index.php on line 91



Looks like you need to re-edit your version.php. Like sirarthur states:
sirarthur wrote:
Open your [...] file with a another (more decent) Text Editor, like EMACS (for Windows ftp://ftp.gnu.org/gnu/emacs/windows/) and delete any weird stuff before


At least you know where it's coming from now ;)

_________________
We may not be able to control the wind, but we can always adjust our sails


Top
 Profile  
 
 Post subject: Re: Admin Login Issues
PostPosted: Tue Nov 21, 2006 7:24 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Wed Nov 08, 2006 9:23 pm
Posts: 17
I checked version.php with UltraEdit and it's looks just fine to me. File version.php atached.


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
 Post subject: Re: Admin Login Issues
PostPosted: Tue Nov 21, 2006 7:34 am 
Joomla! Guru
Joomla! Guru
Offline

Joined: Sat Sep 10, 2005 10:31 pm
Posts: 842
When opening with WeaverSlave (http://www.weaverslave.ws, my favorite editor), the beginning looks like this:

Code:
<?php


You need to save the file without the BOM (Byte Ordering Mark), either with UltraEdit, if you can specify how it should be saved, or with another editor.

_________________
We may not be able to control the wind, but we can always adjust our sails


Top
 Profile  
 
 Post subject: Re: Admin Login Issues
PostPosted: Tue Nov 21, 2006 7:50 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Wed Nov 08, 2006 9:23 pm
Posts: 17
Hello, my name is Cyb3r and I'm a new WeaverSlave user. :D
Thank you guys for helping me! I can't belive this was the issue.


Top
 Profile  
 
 Post subject: Re: Admin Login Issues
PostPosted: Tue Nov 21, 2006 11:00 am 
User avatar
Joomla! Master
Joomla! Master
Offline

Joined: Thu Aug 18, 2005 10:41 am
Posts: 15733
Enno,

Any idea if jkcarr2 his report is actually a bug? Or more of a setup problem. I'd like to determine if I need to follow up on this topic.

Thanks Robin

_________________
Regards Robin

http://www.linkedin.com/in/robinmuilwijk - http://twitter.com/i_robin


Top
 Profile  
 
 Post subject: Re: Admin Login Issues
PostPosted: Tue Nov 21, 2006 11:44 am 
Joomla! Guru
Joomla! Guru
Offline

Joined: Sat Sep 10, 2005 10:31 pm
Posts: 842
No, it's a setup problem, session path not writeable. I got some error logs from him. No need to take this "under review" or anything ;)

_________________
We may not be able to control the wind, but we can always adjust our sails


Top
 Profile  
 
 Post subject: Re: Admin Login Issues
PostPosted: Tue Nov 21, 2006 12:24 pm 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Wed Jan 04, 2006 3:28 pm
Posts: 397
Location: Milan, Italy
Tagged as Not Bug

_________________
Imagination is more important than knowledge... (Albert Einstein)


Top
 Profile  
 
PostPosted: Tue Nov 21, 2006 12:32 pm 
User avatar
Joomla! Master
Joomla! Master
Offline

Joined: Thu Aug 18, 2005 10:41 am
Posts: 15733
Thanks; moving from Q&T 1.0 >> Installation

_________________
Regards Robin

http://www.linkedin.com/in/robinmuilwijk - http://twitter.com/i_robin


Top
 Profile  
 
PostPosted: Tue Nov 21, 2006 1:36 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Wed Nov 08, 2006 9:23 pm
Posts: 17
jkcarr2, did you solve the problem? It's the same I have had, so try what they recommened to me.


Top
 Profile  
 
PostPosted: Tue Nov 21, 2006 10:51 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Tue Oct 31, 2006 2:11 am
Posts: 8
Problem solved thanks to friesengeist.  It was a problem in my php.ini file. 

Thanks to everyone who helped!


Top
 Profile  
 
PostPosted: Wed Nov 22, 2006 8:15 am 
User avatar
Joomla! Ace
Joomla! Ace
Offline

Joined: Mon Dec 05, 2005 10:17 am
Posts: 1367
Location: New Orleans, LA, USA
Okay, great.  Glad that is all worked out.

_________________
Rob Schley - Open Source Matters
Webimagery - http://www.webimagery.net/ - Professional Consulting Services
JXtended - http://www.jxtended.com/ - Free and Commercial Joomla! Extensions


Top
 Profile  
 
PostPosted: Fri Nov 24, 2006 7:53 am 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Fri Nov 24, 2006 7:48 am
Posts: 4
Guys I have same problem... the matter is I'm forking on IIS :( so I cant find version.php file... anyone can help me?

When I disable javascript on Firefox and try to login it redirect me to
page is>http://localhost/gradeznistvo/administrator/index.php

and says

Quote:
PHP Warning: session_start() [function.session-start]: open(C:\DOCUME~1\Dimitar\LOCALS~1\Temp\php\upload\sess_fc4vpcg9rgbp98ried3bm0nnl4, O_RDWR) failed: No such file or directory (2) in C:\Inetpub\wwwroot\gradeznistvo\administrator\index.php on line 92 PHP Warning: session_write_close() [function.session-write-close]: open(C:\DOCUME~1\Dimitar\LOCALS~1\Temp\php\upload\sess_fc4vpcg9rgbp98ried3bm0nnl4, O_RDWR) failed: No such file or directory (2) in C:\Inetpub\wwwroot\gradeznistvo\administrator\index.php on line 135 PHP Warning: session_write_close() [function.session-write-close]: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (C:\DOCUME~1\Dimitar\LOCALS~1\Temp\php\upload) in C:\Inetpub\wwwroot\gradeznistvo\administrator\index.php on line 135


Top
 Profile  
 
PostPosted: Fri Nov 24, 2006 8:12 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Wed Nov 08, 2006 9:23 pm
Posts: 17
The domain doesn't start with localhost (localhost represents you home computer and works only in you net). Replace 'localhost' (in link) with your domain or IP. But this will not solve your problem.

Find version.php with search/find apllication.


Top
 Profile  
 
PostPosted: Fri Nov 24, 2006 8:37 am 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Fri Nov 24, 2006 7:48 am
Posts: 4
Cyb3r wrote:
The domain doesn't start with localhost (localhost represents you home computer and works only in you net). Replace 'localhost' (in link) with your domain or IP. But this will not solve your problem.

Domain STARTS with localhost... but i try my address (to be sure) and nothing... its same..
Joomla is instaled on my computer! and.. when I login in main page
http://localhost/gradeznistvo/index.php it is ok, it says HI administrator ... and so on... but problem is in administrator/index.php

Cyb3r wrote:
Find version.php with search/find application.

Ok, I find it in C:\Inetpub\wwwroot\gradeznistvo\includes I edit with Weaverslave and... there are not some characters before
So nothing... I think is session directory problem, but i don't know how to fix it :(


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 50 posts ]  Go to page 1, 2  Next



Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group