The Joomla! Forum ™





Post new topic Reply to topic  [ 137 posts ]  Go to page 1, 2, 3, 4, 5  Next
Author Message
PostPosted: Sat Oct 21, 2006 10:08 pm 
Joomla! Guru
Joomla! Guru

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

there are quite a few users who are experiencing problems upon their first frontend login, however, the login works the second time for most of them. The corresponding threads are at least these:
http://forum.joomla.org/index.php/topic,76935.0.html
http://forum.joomla.org/index.php/topic,92425.0.html
http://forum.joomla.org/index.php/topic,67290.0.html
http://forum.joomla.org/index.php/topic,87929.0.html
http://forum.joomla.org/index.php/topic,72398.0.html
http://forum.joomla.org/index.php/topic,71369.0.html

I believe that most of these issues occur for users visiting your page from a URL other than the livesite URL set in your global config. Lets imagine your livesite URL is http://www.example.com, but a user visits you under example.com. Indeed, there is no possibility for this user to login on the first attempt. Now, if you encounter such problems, you might be lucky, as some (if not all) these issues have been identified.

If you are willing to test this proposed solution, please follow these steps. But before you start, keep in mind that all such changes could as well break your site, so I wouldn't use it on a production system, but rather only on a test system.
  • Use the attached files only on Joomla! 1.0.11. They are not compatible with other versions!
  • Make a backup of the files /includes/joomla.php and /modules/mod_login.php first.
  • Download the zip-file which is attached to this post, und unzip it to a temporary location.
  • Overwrite /includes/joomla.php with joomla.php.
  • Overwrite /modules/mod_login.php with mod_login.php.
  • If you have set a value for the "Login Redirection URL" for the login module, please delete it or make sure the domain matches the domain you use as your live_site in global configuration.
  • Please report back if you are still experiencing any login issues.

As said, I would never use any patches directly on a production server, so use them only on a testing server or know what you are doing :)

Looking forward to your feedback,
Enno


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

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


Last edited by friesengeist on Sat Oct 21, 2006 10:10 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Sat Oct 21, 2006 10:46 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Oct 10, 2006 8:57 pm
Posts: 11
This works Lekker!

Nice - IE and FireFox both login , both on http:// and http://www and first time too.

Installed brand new site , and there was this login problem , then put patch , and perfect!

I then put it on my live site , and it worked perfectly.

Now I have a suggestion : Go get a few beers and celebrate. I now have 12 sites that have login capability!

Seriously....Paypal Address? Send me email.....


Top
 Profile  
 
PostPosted: Mon Oct 23, 2006 9:49 am 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Thu Aug 18, 2005 8:54 am
Posts: 104
Location: Denmark - Kolding
Hi,

I have also try and it works fine for me to....

Thanks...

/cyberbo


Top
 Profile  
 
PostPosted: Mon Oct 23, 2006 3:58 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Mon Aug 22, 2005 7:01 pm
Posts: 233
thanks.

All it´s fine! :D

_________________
Manager of http://www.GalleryWebs.com/
http://www.Mercadeo-web.com/


Top
 Profile  
 
PostPosted: Mon Oct 23, 2006 7:35 pm 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Thu Aug 18, 2005 5:53 pm
Posts: 1958
Location: Washington D.C. & Baltimore, MD Metro
What about adding the following to the configuration.php file? I've found that this fixes the whole issue of sites being accessed from http://www.domain.com or domain.com.
Code:
$mosConfig_live_site = 'http://' . $_SERVER['HTTP_HOST'];

_________________
Thanks,
Roger Raymond
TECHNO PUZZLE :: http://technopuzzle.com :: Putting the technology pieces together for you
Unsolicited support requests via PM/email will be considered as your implicit solicitation of my services and you will be charged accordingly.


Top
 Profile  
 
PostPosted: Tue Oct 24, 2006 8:31 am 
User avatar
Joomla! Intern
Joomla! Intern

Joined: Thu Apr 27, 2006 7:24 pm
Posts: 51
THank you  :P
unixboymd

Just what I needed

I began to sweat :o  because I got this problem with log in and my users start writingand I did what you told to do with the configuration.php file,

Thank You once again.

Torben

_________________
hilsen
Torben Munk Nielsen
http://www.lysetskilde.com


Top
 Profile  
 
PostPosted: Tue Oct 24, 2006 8:38 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Sun Oct 08, 2006 10:37 pm
Posts: 2
Fan &*$%ing -tastic!!!

Great job!  Thanks so much!  Go Joomla! :laugh:


Top
 Profile  
 
PostPosted: Tue Oct 24, 2006 8:56 pm 
User avatar
Joomla! Exemplar
Joomla! Exemplar

Joined: Thu Aug 18, 2005 8:43 pm
Posts: 7846
Location: New York
I don't know why this isn't considered the standard fix for so many of these problems.

_________________
So we must fix our vision not merely on the negative expulsion of war, but upon the positive affirmation of peace. MLK 1964.
http://officialjoomlabook.com Get it at http://www.joomla.org/joomla-press-official-books.html Buy a book, support Joomla!.


Top
 Profile  
 
PostPosted: Tue Oct 24, 2006 9:23 pm 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Thu Aug 18, 2005 5:53 pm
Posts: 1958
Location: Washington D.C. & Baltimore, MD Metro
Me either. I found it in the forums someplace.

_________________
Thanks,
Roger Raymond
TECHNO PUZZLE :: http://technopuzzle.com :: Putting the technology pieces together for you
Unsolicited support requests via PM/email will be considered as your implicit solicitation of my services and you will be charged accordingly.


Top
 Profile  
 
PostPosted: Tue Oct 24, 2006 10:04 pm 
Joomla! Guru
Joomla! Guru

Joined: Sat Aug 20, 2005 3:15 pm
Posts: 508
Hello all,

I never had this problem, but I am doing something that will also fix this, by adding the following to my .htaccess :
Code:
RewriteCond %{HTTP_HOST} ^mydomain\.com [NC]
RewriteRule (.*) http://www.mydomain.com/$1 [R=301,L,NC]

every request form mydomain.com/xxxx is redirected to http://www.mydomain.com/xxxx, through a permanent redirection (you can do it the other way around if you like of course, from www to non-www).

The big advantage (that was the reason to do it in the first place) is to avoid duplicate-content penalties in search engines, as your site is going to be indexed twice. if you do not do something like that mydomain.com/mypage.html and http://www.mydomain.com/mypage.html will have same content on the same domain, but differing sub-domain and URL.

_________________
See all about sh404sef at http://dev.anything-digital.com/
I don't reply to PM anymore. Thanks for using sh404SEF


Top
 Profile  
 
PostPosted: Wed Oct 25, 2006 12:42 pm 
User avatar
Joomla! Exemplar
Joomla! Exemplar

Joined: Thu Aug 18, 2005 8:43 pm
Posts: 7846
Location: New York
;)
http://forum.joomla.org/index.php/topic ... #msg464303

Someone showed it to me back on Mambo.

_________________
So we must fix our vision not merely on the negative expulsion of war, but upon the positive affirmation of peace. MLK 1964.
http://officialjoomlabook.com Get it at http://www.joomla.org/joomla-press-official-books.html Buy a book, support Joomla!.


Last edited by mcsmom on Wed Oct 25, 2006 12:46 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Wed Oct 25, 2006 1:48 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Jul 07, 2006 7:48 pm
Posts: 37
Location: Charlottesville, VA
So the .htaccess the safest method? I've placed the code into my .htaccess file, but its not working. Does something need to be removed, or do these lines need to be in a specific place?  Sorry for the confusion. I'm new to this.


Top
 Profile  
 
PostPosted: Wed Oct 25, 2006 2:11 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Mar 07, 2006 9:47 am
Posts: 6
Still getting the same issue after applying this patch on my Joomla site running under IIS (so I can't use .htaccess method).

The only fix I can find that works is either ticking the remember me box or checking the login message parameter on the login module which says "You are now logged in". These work - but aren't great solutions !

Have tried removing my login redirection, tried the attached files, tried the other '0' session fix - but still not working as it was before  :(


Top
 Profile  
 
PostPosted: Wed Oct 25, 2006 8:33 pm 
Joomla! Guru
Joomla! Guru

Joined: Sat Sep 10, 2005 10:31 pm
Posts: 842
unixboymd wrote:
What about adding the following to the configuration.php file? I've found that this fixes the whole issue of sites being accessed from http://www.domain.com or domain.com.
Code:
$mosConfig_live_site = 'http://' . $_SERVER['HTTP_HOST'];



Joomla! 1.5 is doing something quite similiar - no mosConfig_live_site anymore. I doubt it though that this will change for 1.0.x - it changes behavior, and is probably out of scope of a stability release. I can also see one problem arise from this change: let's imagine your users log in on http://www.example.com. Now lets assume you have a hardcoded Link in your content to example.com/index.php?whatever. The user logged in on http://www.example.com, and will be treated as a guest on example.com - this would just create one new instance where a user might think he got logged out. That's why I'm not in favour of adjusting the livesite dynamically in 1.0.x. I'd rather get the login issues fixed, and leave the livesite settings alone (except for the https switchover which will probably make it into 1.0.12).

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


Top
 Profile  
 
PostPosted: Wed Oct 25, 2006 8:38 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Mar 07, 2006 9:47 am
Posts: 6
Tried that too - didn't fix my problem when running under IIS I'm afraid  :(


Top
 Profile  
 
PostPosted: Wed Oct 25, 2006 8:41 pm 
User avatar
Joomla! Exemplar
Joomla! Exemplar

Joined: Thu Aug 18, 2005 8:43 pm
Posts: 7846
Location: New York
Maybe I am just very consistent in my hard coded links, but I haven't noticed this problem.

_________________
So we must fix our vision not merely on the negative expulsion of war, but upon the positive affirmation of peace. MLK 1964.
http://officialjoomlabook.com Get it at http://www.joomla.org/joomla-press-official-books.html Buy a book, support Joomla!.


Top
 Profile  
 
PostPosted: Wed Oct 25, 2006 8:47 pm 
Joomla! Guru
Joomla! Guru

Joined: Sat Sep 10, 2005 10:31 pm
Posts: 842
davemacd wrote:
The only fix I can find that works is either ticking the remember me box or checking the login message parameter on the login module which says "You are now logged in". These work - but aren't great solutions !


Interesting find, the thing about the login message.

I don't have access to IIS, and found out that it's not within the MSDN Academic Alliance, from where I thought I could get it.
I'll take a look at it this weekend and ask some of the other devs to test this on IIS. I've seen some interesting posts about redirection, cookies and IIS somewhere, just need to digg it up ;)

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


Top
 Profile  
 
PostPosted: Wed Oct 25, 2006 8:50 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Mar 07, 2006 9:47 am
Posts: 6
Thanks, much appreciated.

For now I am using the login message and it's working round the problem so no massive hurry  ;)


Top
 Profile  
 
PostPosted: Wed Oct 25, 2006 8:51 pm 
Joomla! Guru
Joomla! Guru

Joined: Sat Sep 10, 2005 10:31 pm
Posts: 842
mcsmom wrote:
Maybe I am just very consistent in my hard coded links, ...


That's a good thing. I never write the domain name into the links, but have the SEF-URL-Mambot run on it, so that it will use the live_site when converting the link to the SEF-version.

mcsmom wrote:
... but I haven't noticed this problem.


Try this to simulate the bahviour I'm describing:
Clear all cookies, log in on http://www.yourdomain.com, and go to yourdomain.com afterwards. You should find out that Joomla! treats you as a guest...

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


Top
 Profile  
 
PostPosted: Wed Oct 25, 2006 9:04 pm 
User avatar
Joomla! Guru
Joomla! Guru

Joined: Thu Aug 18, 2005 8:53 am
Posts: 824
Location: Switzerland
friesengeist wrote:
unixboymd wrote:
What about adding the following to the configuration.php file? I've found that this fixes the whole issue of sites being accessed from http://www.domain.com or domain.com.
Code:
$mosConfig_live_site = 'http://' . $_SERVER['HTTP_HOST'];



Joomla! 1.5 is doing something quite similiar - no mosConfig_live_site anymore. I doubt it though that this will change for 1.0.x - it changes behavior, and is probably out of scope of a stability release. I can also see one problem arise from this change: let's imagine your users log in on http://www.example.com. Now lets assume you have a hardcoded Link in your content to example.com/index.php?whatever. The user logged in on http://www.example.com, and will be treated as a guest on example.com - this would just create one new instance where a user might think he got logged out. That's why I'm not in favour of adjusting the livesite dynamically in 1.0.x. I'd rather get the login issues fixed, and leave the livesite settings alone (except for the https switchover which will probably make it into 1.0.12).


livesite setting needs to stay in 1.0.12, agreeing.

i would rather have joomla redirecting to the correct site automatically in case of an alias site than removing the livesite.

friesengeist wrote:
Try this to simulate the bahviour I'm describing:
Clear all cookies, log in on http://www.yourdomain.com, and go to yourdomain.com afterwards. You should find out that Joomla! treats you as a guest...


That's absolutely normal: for cookies, these are two different sites, and browsers don't allow cookies to spread.

Thus, the only cure is redirecting in case of wrong site, either in the dot htacceess file or in joomla itself ;)

_________________
Beat 8)
www.joomlapolis.com <= Community Builder + CBSubs Joomla membership payment system - team
hosting.joomlapolis.com <= Joomla! Hosting, by the CB Team


Top
 Profile  
 
PostPosted: Thu Oct 26, 2006 1:44 pm 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Mon Oct 09, 2006 9:52 pm
Posts: 1176
Location: Tampuh Floriduh - The jewels of America's wang.
Ok..go slow for a newbie. 

From what I can gather from this thread, there are 3 proposed solutions to the issue. 

- Overwriting the files as in the original post by friesengeist
- changing .htaccess as suggested by shumisha
- changing the configuration.php as suggested by unixboymd.

Is there any kind of consensus?  ???

I've been using Joomla for all of about a month or so and reading some of these threads can get kind of confusing!  :-[

_________________
http://www.tdandt.com


Top
 Profile  
 
PostPosted: Thu Oct 26, 2006 1:50 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Jul 07, 2006 7:48 pm
Posts: 37
Location: Charlottesville, VA
Agreed. I'm still  lost on the best solution and I can't get the dot htaccess change to solve the problem.
I added the code, and when I go to domain.com it does not automatically take me to http://www.mydomain.com.


Top
 Profile  
 
PostPosted: Thu Oct 26, 2006 3:35 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sun Oct 22, 2006 2:34 pm
Posts: 36
Me too....so which one is the best solution it ... ???


Last edited by ks_tiwari on Thu Oct 26, 2006 3:52 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Thu Oct 26, 2006 6:07 pm 
User avatar
Joomla! Intern
Joomla! Intern

Joined: Sun Nov 27, 2005 5:19 am
Posts: 54
Location: Houston
Enno's solution works for me. Just need to back up before patching production site.

_________________
Live free or die
http://www.geekoffice.com


Top
 Profile  
 
PostPosted: Thu Oct 26, 2006 6:16 pm 
Joomla! Guru
Joomla! Guru

Joined: Sat Sep 10, 2005 10:31 pm
Posts: 842
MrRoyce wrote:
Ok..go slow for a newbie. 

From what I can gather from this thread, there are 3 proposed solutions to the issue. 

- Overwriting the files as in the original post by friesengeist
- changing .htaccess as suggested by shumisha
- changing the configuration.php as suggested by unixboymd.

Is there any kind of consensus?  ???

I've been using Joomla for all of about a month or so and reading some of these threads can get kind of confusing!  :-[


All three are valid, let me try to explain the differences:
  • The initial post of this thread is meant for getting feedback from users, if it solves all know login issues. So far, I'm satisfied with the results, only Microsoft's Internet Information Server (IIS) still has problems. So something quite similiar to this will probably be used in 1.0.12, I'll discuss some details with Beat in the next days.
  • Changing .htaccess will not work on every server, as a special module (mod_rewrite) needs to be loaded by the server. I have no clue how this would look like in IIS, but I doubt it that you can use a .htaccess (written for Apache) on IIS. So this is indeed a good solution, but not really within the scope of Joomla!, as it depends to much on your server config. However, this avoids penalties for duplicate content from search engines, as your content can only be found under one doamin - so it's basically a good thing.
  • Changing the configuration.php (or achieving the same thing in any other file) is IMHO out of scope for 1.0.12, as stated earlier by me.

So it's your choice, use what ever solves the issues for you :)

BTW, thanks to everyone who tested the patch! Let me hear if there is anyone for whom this is not working (except for IIS).

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


Last edited by friesengeist on Thu Oct 26, 2006 6:18 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Thu Oct 26, 2006 10:36 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Thu Oct 26, 2006 10:09 pm
Posts: 1
i have jommla 1.0.8 and the patch will ot work.
can you give me a help with this version?


Top
 Profile  
 
PostPosted: Thu Oct 26, 2006 11:00 pm 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Thu Aug 18, 2005 5:53 pm
Posts: 1958
Location: Washington D.C. & Baltimore, MD Metro
Upgrading to the latest and greatest release of Joomla not only fixes bugs but also helps keep your site secure.

jave wrote:
i have jommla 1.0.8 and the patch will ot work.
can you give me a help with this version?

_________________
Thanks,
Roger Raymond
TECHNO PUZZLE :: http://technopuzzle.com :: Putting the technology pieces together for you
Unsolicited support requests via PM/email will be considered as your implicit solicitation of my services and you will be charged accordingly.


Top
 Profile  
 
PostPosted: Fri Oct 27, 2006 6:12 am 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Mon Dec 05, 2005 10:17 am
Posts: 1367
Location: New Orleans, LA, USA
To reinforce Enno's last post. 

This topic of this thread is on feedback for the proposed solution.  Let's stay on this topic please.

Thanks.

_________________
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 Oct 27, 2006 7:10 pm 
User avatar
Joomla! Exemplar
Joomla! Exemplar

Joined: Thu Aug 18, 2005 8:43 pm
Posts: 7846
Location: New York
Quote:
ry this to simulate the bahviour I'm describing:
Clear all cookies, log in on http://www.yourdomain.com, and go to yourdomain.com afterwards. You should find out that Joomla! treats you as a guest...


That's a different issue, but it is okay if you log in as one or the other since the above solution solves the javascript problems that come from www v. non www.

_________________
So we must fix our vision not merely on the negative expulsion of war, but upon the positive affirmation of peace. MLK 1964.
http://officialjoomlabook.com Get it at http://www.joomla.org/joomla-press-official-books.html Buy a book, support Joomla!.


Top
 Profile  
 
PostPosted: Fri Oct 27, 2006 8:56 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Fri Oct 27, 2006 8:06 pm
Posts: 4
ok,i installed 1.0.11,registered my self as a regular member( i have a seperate login for admin).would try to log in and it shows as having one guest online,go to admin,shows my user as registered and such but not logged in.i tried the 2 file overwrites and still the same problem.and yes the log in is from the same IP as backend.tried from another PC in the house with same results. this might be why i couldnt get Community Builder to work for me as well.any help is appreciated.
Brian


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



Who is online

Users browsing this forum: No registered users and 0 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