IIS Double Login - (WORKAROUND/SOLVED)

General questions relating to Joomla! There are other boards for more specific help on Joomla! features and extensions.

Moderator: General Support Moderators

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.
Locked
HPRS Brian
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Wed Dec 20, 2006 8:51 am

IIS Double Login - (WORKAROUND/SOLVED)

Post by HPRS Brian » Mon Jan 08, 2007 7:48 pm

EDIT:  (Original post is below the line)

Allright, I have a fix for you Window server users who went through the same hell I just did.

I guess you could say this is a FIX, if you don't mind straying from IIS.  But I guess it's more of a workaround!??!  I dunno, all I know is my damned site finally works.  So if you're a Windows Server/IIS user frustrated by the same problem, you're not gonna like hearing it, but you need to install Apache.  At least until this problem can be targeted and fixed.

The double-login problem affects ONLY people who have Joomla/Mambo (no other CMS seems affected by this), running Windows and IIS.

The problem is actually in IIS, and I guess it's going to take an IIS guru to figure it out eventually and find a fix for it. Either way, I installed Apache 2.2 on my Windows Server, disabled IIS, and now it runs *perfectly*.

Until a Joomla developer and/or IIS expert can offer a valid fix for this problem, the only thing I can is this:

- Double check your paths.  Make sure configuration.php is all right, make sure everything in php.ini is working right and what not.
- Read this post, it has some good tips.  Try them.  If it works for you, consider yourself blessed.  It didn't work for me.
- If you reach the end of this post and still have the same problems, don't bother searching for more answers.  Save yourself a few days of hell and just bite the bullet and install Apache.

Oh, and good luck.

Hope this helps someone who's going through the same hell I went through.

========== ORIGINAL POST STARTS HERE================
Allright, I'm violating a certain rule of this forum:  "Search firsrt" 

Well, I DID search, and all I found were 3 million posts by 3 million people who have the exact same problem as me, and absolutely NO solutions.

I've tried all the hacks and fixes and everything that was posted, and nothing worked.

- This is obviously a Windows Server/IIS/CGI issue
- This error occurs if Comm. Builder is installed or not

So, ONCE AND FOR ALL, can someone PLEASE post a fix for this bug?  I've been ripping the hair out of my head for almost a WEEK trying to get this solved.  I've done EVERYTHING I can, but no matter how you slice it, you gotta log-in twice to Joomla. Now, here are my details:

PHP built On:  Windows NT HPRSSERVER1 5.0 build 2195
Database Version: 4.1.22-community-nt
PHP Version: 5.2.0
Web Server: Microsoft-IIS/5.0
WebServer to PHP interface: cgi-fcgi
Joomla! Version: Joomla! 1.0.12 Stable [ Sunfire ] 25 December 2006 01:00 UTC
User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1
Relevant PHP Settings:
Joomla! Register Globals Emulation: ON
Register Globals: OFF
Magic Quotes: ON
Safe Mode: OFF
File Uploads: ON
Session auto start: OFF
Session save path: C:\_WebSites\Temp\
Short Open Tags: OFF
Output Buffering: OFF
Open basedir: none
Display Errors: ON
XML enabled: Yes
Zlib enabled: Yes
Disabled Functions: none
Configuration File:

Please... for the love of god and my sanity...  please someone help  :'( <-- yes, I'm close to tears
Last edited by HPRS Brian on Tue Jan 09, 2007 8:54 am, edited 1 time in total.

User avatar
nathandiehl
Joomla! Champion
Joomla! Champion
Posts: 6044
Joined: Fri Aug 19, 2005 3:03 pm
Location: Indiana, USA
Contact:

Re: IIS Double Login - ONCE AND FOR ALL

Post by nathandiehl » Mon Jan 08, 2007 8:02 pm

actually this is a pretty rare issue, i think...

i believe it is solved by accessing your site EXACTLY (NOT approximately) as the site appears in configuration.php line at $mosConfig_live_site

i.e., if it contains a www, you must access it by using the www. if it does not, you must not access it w/ it.
hope this helps!
If you're new to Joomla, Please read Anna's Joomla! Tips: http://forum.joomla.org/viewtopic.php?t=5503

http://nathandiehl.com | Find out what makes me tick

HPRS Brian
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Wed Dec 20, 2006 8:51 am

Re: IIS Double Login - ONCE AND FOR ALL

Post by HPRS Brian » Mon Jan 08, 2007 8:21 pm

Nope, same problem :(  Still have to login twice.

I've made user accounts for both of my sites (live & beta)
The user/pass you see below will work on both sites.

The live site is originally 1.0.11, patched to .12.
The beta site is a clean install, 1.0.12

Address:  http://www.hauntedprs.org/beta&nbsp; <-- Test site (virtual directory, by the way)
Address:  http://www.hauntedprs.org&nbsp; <-- Live site

Username: test
Password: test

ANY help fixing this would be greatly appreciated!!!  Thanks, J-Team

HPRS Brian
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Wed Dec 20, 2006 8:51 am

Re: IIS Double Login - ONCE AND FOR ALL

Post by HPRS Brian » Mon Jan 08, 2007 8:33 pm

Just for good measure, I went into IIS and added the following entries for "Multiple Identities for this website"

All IP's - Port 80 - [nothing]
All IP's - Port 80 - hauntedprs.org
All IP's - Port 80 - http://www.hauntedprs.org
All IP's - Port 80 - hauntedprs.org/beta
All IP's - Port 80 - http://www.hauntedprs.org/beta

Though /beta is a virtual directory, the live site is not, and I have the same problem with the live site...

And I've read where a few other users said that it only happens when they start their session the first time.  It's true for me as well, once I open my browser (firefox 2.0.0.1, by the way) I have to log in twice.  Then I can freely log out, and back in only once.

Hmm...  Lemme see if I get the same problem with IE and Opera (hold on)

-- insert hold music here --

Opera 9.10:  Exact same problem:  Initial login acts as if nothing happened, then the second login puts me in.  Then I can log out and bck in, and get it on the first try.

IE 6.0.2900.2180 / sp2;3283: Exact same problem:  Initial login acts as if nothing happened, then the second login puts me in.  Then I can log out and bck in, and get it on the first try.

So... we know it's not a FF issue, at least :)  Though I did figure out that Opera, for some ungodly reason decided to center-align my min menu.  ::shrug::

I wish I could turn this into a Linux box :\

By the way Nathan, thanks for your help :)  Though I'll disagree with you on the part about it being "rare".  Do a forum search for "Login twice" and you'll see all the articles I got...  even though us Windows server users are the minority here,  this seems to be a problem that effects most of us.  So it may indeed be a rare problem to the Joomla community at large, but not to us poor WIMP folks!!  :(

Seriously, I don't want to come off as ungrateful.. that a was a fast reply, and I appreciate it!  I hope someone can help.
Last edited by HPRS Brian on Mon Jan 08, 2007 8:40 pm, edited 1 time in total.

User avatar
Chris
Joomla! Guru
Joomla! Guru
Posts: 807
Joined: Sat Aug 20, 2005 3:58 am
Location: Australia
Contact:

Re: IIS Double Login - ONCE AND FOR ALL

Post by Chris » Mon Jan 08, 2007 8:56 pm

Shouldn't cachepath, absolutepath and live_site all point to the folder you have the 'beta" parked ?
There is no failure until you give up.

Chris

HPRS Brian
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Wed Dec 20, 2006 8:51 am

Re: IIS Double Login - ONCE AND FOR ALL

Post by HPRS Brian » Mon Jan 08, 2007 8:59 pm

uhh...should it?  Allright, lemme try that

User avatar
nathandiehl
Joomla! Champion
Joomla! Champion
Posts: 6044
Joined: Fri Aug 19, 2005 3:03 pm
Location: Indiana, USA
Contact:

Re: IIS Double Login - ONCE AND FOR ALL

Post by nathandiehl » Mon Jan 08, 2007 8:59 pm

the login seems to work fine if i access it via:

hauntedprs.org
(without the www)

can you verify this?
If you're new to Joomla, Please read Anna's Joomla! Tips: http://forum.joomla.org/viewtopic.php?t=5503

http://nathandiehl.com | Find out what makes me tick

HPRS Brian
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Wed Dec 20, 2006 8:51 am

Re: IIS Double Login - ONCE AND FOR ALL

Post by HPRS Brian » Mon Jan 08, 2007 9:07 pm

When trying to login with http://hauntedprs.org&nbsp; (no www) on both sites, with the admin account,  I get:

"You are not authorised to view this resource" (That message is in the form of a java message box not a 405 page).  Then the second login gives me access. 

Also, this double login problem only occurs the first time you try to log in AFTER starting up your browser.  So after the 2nd (successful) login, in order to re-create the problem, you need to close your browser entirely.  Not even closing the tab will do the trick.

Damned if I know why :::shrugs:::

EDIT UPDATE: I tried with the test account as well and failed...  same problem.  all around.

Oh, and I updated my config file, and pointed live site, cache path, and absolute all to the root of the beta folder, to no effect.  Same thing.
Last edited by HPRS Brian on Mon Jan 08, 2007 9:11 pm, edited 1 time in total.

User avatar
Chris
Joomla! Guru
Joomla! Guru
Posts: 807
Joined: Sat Aug 20, 2005 3:58 am
Location: Australia
Contact:

Re: IIS Double Login - ONCE AND FOR ALL

Post by Chris » Mon Jan 08, 2007 9:11 pm

HPRS Brian wrote: uhh...should it?  Allright, lemme try that
I would think so.
Now these 2 are pointing to Joomla in root and not beta.
There is no failure until you give up.

Chris

User avatar
nathandiehl
Joomla! Champion
Joomla! Champion
Posts: 6044
Joined: Fri Aug 19, 2005 3:03 pm
Location: Indiana, USA
Contact:

Re: IIS Double Login - ONCE AND FOR ALL

Post by nathandiehl » Mon Jan 08, 2007 9:16 pm

found this from RobInk:

[quote="http://forum.joomla.org/index.php/topic,52721.0.html"]
There is a little problem with PHP that it generally assumes that it is installed on Unix. Therefore, one of the default settings in the php.ini file is:

session.save_path = /tmp

This would be fine on Unix because this directory is always there, but not necessarily so on Windows. The fix is to create a subdirectory under the PHP directory, i.e. "C:\PHP\Temp" Then, change the session setting:

session.save_path = "C:\php\temp"

If this is not correct, Joomla will not work correctly! Probably, one will have problems logging in as ADMIN.
[/quote]

also, you might want to verify everything on this long list of items to check for on an IIS server: http://forum.joomla.org/index.php/topic,52721.0.html
If you're new to Joomla, Please read Anna's Joomla! Tips: http://forum.joomla.org/viewtopic.php?t=5503

http://nathandiehl.com | Find out what makes me tick

HPRS Brian
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Wed Dec 20, 2006 8:51 am

Re: IIS Double Login - ONCE AND FOR ALL

Post by HPRS Brian » Mon Jan 08, 2007 9:44 pm

That session_savepath issue was taken care of looooong ago, so that's not it... but I'll read that link!

HPRS Brian
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Wed Dec 20, 2006 8:51 am

Re: IIS Double Login - ONCE AND FOR ALL

Post by HPRS Brian » Mon Jan 08, 2007 9:50 pm

Chris wrote:
HPRS Brian wrote: uhh...should it?  Allright, lemme try that
I would think so.
Now these 2 are pointing to Joomla in root and not beta.
I'm sorry, I should've specified...  Shame on me for bad naming conventions, but here are the directories:

Live site points to: C:\_WebSites\LiveRoot
Beta site points to: C:\_WebSites\Root

I know I should've named "Root" as "Beta" but, there you go..  sorry!

The /beta tag at the end of the URL is a virtual directory (which is not causing the problem, as the same problem occurs on the live site as well)

anyway, I checked that post about the IIS checklist, and I've got everything covered.

::sigh:: this has me stumped.

HPRS Brian
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Wed Dec 20, 2006 8:51 am

Re: IIS Double Login - ONCE AND FOR ALL

Post by HPRS Brian » Tue Jan 09, 2007 2:31 am

Allright, this "false-positive" may help you, actually...

I just found out, it's definitely not a Windows problem, inherently.  What I mean by that, is it's definitely a JOOMLA/MAMBO problem, that is affecting Windows users!

Since my last post, I have installed Drupal, Geeklog, Mambo, and e107.

All of them allow logins on the first try, except for Mambo.  (I don't really like any of those other CMS's though)

So obviously there is something in the mambo login script that doesn't agree with Windows and causes this problem??  And somehow it's tied into when the session first starts, when the browser is first opened, and that's browser independant.

Now we must ask ourselves what's next? We've narrowed it down to:
- Windows Server users (apparently both 2k & 2k3)
- Joomla/Mambo login only, with or without community builder
- Browser independent
- The first attempted login since the browser was opened
- It's not because of the IIS or PHP configuration
- It's not because it's a virtual directory
- It's not a mis-configured configuration.php file
- For me anyway, it seems to be affecting 1.0.12, because I didn't have this problem with 1.0.11
- All of the hotfixes and patches and what not I found do not work.
- I DID however take someone's advice in one of these threads, which was to create a link to the login component on the main menu, and have the user login off the front page (I did this in the beta site, not the live site.. it's the last menu item on the main menu)  THIS DID WORK!!  I was able to log in on the FIRST try without ANY problems.  However, this is inconvenient and just wrong, you know??  But either way, this puts us one step closer to solving this mystery, because I can now add to the list:
- The front page is tied in to this as well, for some reason.

HPRS Brian
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Wed Dec 20, 2006 8:51 am

Re: IIS Double Login - ONCE AND FOR ALL

Post by HPRS Brian » Tue Jan 09, 2007 2:36 am

OK I just kind of inspired myself and tried something... got a few weird results, too.

Allright, each of these scenarios were tested by opening the browser, navigating to the test site, attempting to login, and closing the browser.

1.  When I clicked "Refresh" and THEN tried to log in, nothing happened.  Again, I had to log in twice.
2.  When I clicked on any other page and THEN tried to log in, IT WORKED!! i didn't have to log in twice
3.  Even though I check the "Remember me" box, when I close the browser without logging out, I have to log in again.  <-- another new problem  :::sigh:::

HPRS Brian
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Wed Dec 20, 2006 8:51 am

Re: IIS Double Login - ONCE AND FOR ALL

Post by HPRS Brian » Tue Jan 09, 2007 4:12 am

Screw it... I'm going to install Apache.  Then I'll let you know if this is a Windows problem or an IIS problem.

HPRS Brian
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Wed Dec 20, 2006 8:51 am

Re: IIS Double Login - ONCE AND FOR ALL

Post by HPRS Brian » Tue Jan 09, 2007 8:15 am

PROBLEM SOLVED.  There's more than 1 way to skin a cat!

Joomla is working *just fine* under Apache!!  No more double logins, no more 405's, no more trouble at all.  In fact, it's even running noticeably smoother now.

Allright Windows folks, there you go:  I know you hate to hear it, but an easy solution to fix all the problems listed in this thread is to kill IIS and install Apache.  Oh, and get a 6 pack, because it's going to take you a while. 

I'll be damned if I'm going to let a 12 lb. Piece of S#!t computer get the best of me.

User avatar
nathandiehl
Joomla! Champion
Joomla! Champion
Posts: 6044
Joined: Fri Aug 19, 2005 3:03 pm
Location: Indiana, USA
Contact:

Re: IIS Double Login - (WORKAROUND/SOLVED)

Post by nathandiehl » Tue Jan 09, 2007 12:42 pm

Brian,
I'm glad you finally got a solution figured out.
and really, thanks for sharing your solution!
If you're new to Joomla, Please read Anna's Joomla! Tips: http://forum.joomla.org/viewtopic.php?t=5503

http://nathandiehl.com | Find out what makes me tick

HPRS Brian
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Wed Dec 20, 2006 8:51 am

Re: IIS Double Login - (WORKAROUND/SOLVED)

Post by HPRS Brian » Tue Jan 09, 2007 12:45 pm

No problem... I only hope this helps some other poor soul with the same problem.  And I hope, through the process of elimination, this helps the dev team figure out why IIS doesn't like Joomla and can make a fix for it in future versions.

I think my "solution" is kinda cheating, though...LOL  Ah, it works, who cares.  Never liked IIS anyway.

blackste
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Mon Jan 16, 2006 6:42 am

Re: IIS Double Login - (WORKAROUND/SOLVED)

Post by blackste » Mon Feb 19, 2007 12:57 am

I tried a different approach. I noticed that once you have called a second page from the front page the login script works just fine. I have added a static content page with some login instructions and attached the login form to this page. A menu item called Login links to it. I needed some extra help for those creating new accounts so this work around suits my situation. See http://web.pembrokesc.vic.edu.au/blackwell

IdeasUnknown
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Tue Sep 12, 2006 11:05 am

Re: IIS Double Login - (WORKAROUND/SOLVED)

Post by IdeasUnknown » Mon Feb 26, 2007 10:34 am

blackste you hit the nail right on the head.  We know two things that actually work for all of us IIS users:

1. Enabling "Login Message" allows for first attempt logins from any page.
2. The first page displayed from your site will not allow you to login on the first attempt.

If you open a new browser and type in http://yoursite.com and try and login directly to that page it will make you login again.
If you open a new browser and type in http://yoursite.com and then select a different page in your site and then login you will login successfully the first time.

THE WORKAROUND: Turn on the "Login Message" feature of the login module.  Annoying, but it works.

IdeasUnknown
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Tue Sep 12, 2006 11:05 am

Re: IIS Double Login - (WORKAROUND/SOLVED)

Post by IdeasUnknown » Mon Feb 26, 2007 12:23 pm

Since I posted the last message I decided it was too annoying to use the Login Message...so I changed the alert code to a redirect.

In \modules\mod_login.php
Around line 148, Original Code:

Code: Select all

	// JS Popup message
	if ( $message ) {
		?>
		<script language="javascript" type="text/javascript">
		<!--//
		alert( "<?php echo addslashes( _LOGIN_SUCCESS ); ?>" );
		//-->
		</script>
		<?php
	}
Replace entire section, New Code:

Code: Select all

	// JS Popup message
	if ( $message ) {
		?>
		<script language="javascript" type="text/javascript">
		<!--//
		window.location="<?php echo $return; ?>";
		//-->
		</script>
		<?php
	}
I believe that this could be added to the mod_login.php configuration panel to add a radio button to enable this instead of having to change your login message code, so as to leave that feature functional.  Well I felt a little ambitious so I decided to just see if you could add the feature, and well you can.  Imagine that  ;) (The Joomla developers really did a good job at making this software adaptable).  Please ignore the above workaround if you are going to follow the directions below.

This has been tested only for Joomla 1.0.12.  Please make backups before attempting this.

List of files changed (with location):
  • index.php
  • modules\mod_login.php
  • modules\mod_login.xml
Step 1.  Open index.php.

On or around line 142, Original Code:

Code: Select all

// frontend login & logout controls
$return = strval( mosGetParam( $_REQUEST, 'return', NULL ) );
$message = intval( mosGetParam( $_POST, 'message', 0 ) );
if ($option == 'login') {
	$mainframe->login();

	// JS Popup message
	if ( $message ) {
		?>
		<script language="javascript" type="text/javascript">
		<!--//
		alert( "<?php echo addslashes( _LOGIN_SUCCESS ); ?>" );
		//-->
		</script>
		<?php
	}
Replace entire section, New Code:

Code: Select all

// frontend login & logout controls
$return = strval( mosGetParam( $_REQUEST, 'return', NULL ) );
$message = intval( mosGetParam( $_POST, 'message', 0 ) );
//START ADDED FOR REDIRECT
$iis		= intval( mosGetParam( $_POST, 'iis', 0 ) );
//END ADDED FOR REDIRECT
if ($option == 'login') {
	$mainframe->login();

//START ADDED FOR REDIRECT
	if ( $iis ) {
		?>
		<script language="javascript" type="text/javascript">
		<!--//
		window.location="<?php echo $return; ?>";
		//-->
		</script>
		<?php
	}
//END ADDED FOR REDIRECT

	// JS Popup message
	if ( $message ) {
		?>
		<script language="javascript" type="text/javascript">
		<!--//
		alert( "<?php echo addslashes( _LOGIN_SUCCESS ); ?>" );
		//-->
		</script>
		<?php
	}
Step 2. Open modules\mod_login.php

On or around line 129, Original Code:

Code: Select all

	<input type="hidden" name="option" value="login" />
	<input type="hidden" name="op2" value="login" />
	<input type="hidden" name="lang" value="<?php echo $mosConfig_lang; ?>" />
	<input type="hidden" name="return" value="<?php echo sefRelToAbs( $login ); ?>" />
	<input type="hidden" name="message" value="<?php echo $message_login; ?>" />
	<input type="hidden" name="force_session" value="1" />
	<input type="hidden" name="<?php echo $validate; ?>" value="1" />
	</form>
Replace entire section, New Code:

Code: Select all

	<input type="hidden" name="option" value="login" />
	<input type="hidden" name="op2" value="login" />
	<input type="hidden" name="lang" value="<?php echo $mosConfig_lang; ?>" />
	<input type="hidden" name="return" value="<?php echo sefRelToAbs( $login ); ?>" />
	<input type="hidden" name="message" value="<?php echo $message_login; ?>" />
<!-- START ADDED FOR REDIRECT -->
	<input type="hidden" name="iis" value="<?php echo $iis_redirect; ?>" />
<!-- END ADDED FOR REDIRECT -->
	<input type="hidden" name="force_session" value="1" />
	<input type="hidden" name="<?php echo $validate; ?>" value="1" />
	</form>
On or around line 32, Original Code:

Code: Select all

$registration_enabled 	= $mainframe->getCfg( 'allowUserRegistration' );
$message_login 			= $params->def( 'login_message', 	0 );
$message_logout 		= $params->def( 'logout_message', 	0 );
$login 					= $params->def( 'login', 			$return );
$logout 				= $params->def( 'logout', 			$return );
$name 					= $params->def( 'name', 			1 );
$greeting 				= $params->def( 'greeting', 		1 );
$pretext 				= $params->get( 'pretext' );
$posttext 				= $params->get( 'posttext' );
Replace entire section, New Code:

Code: Select all

$registration_enabled 	= $mainframe->getCfg( 'allowUserRegistration' );
$message_login 			= $params->def( 'login_message', 	0 );
$message_logout 		= $params->def( 'logout_message', 	0 );
//START ADDED FOR REDIRECT
$iis_redirect = $params->def( 'login_redirect',	0 );
//END ADDED FOR REDIRECT
$login 					= $params->def( 'login', 			$return );
$logout 				= $params->def( 'logout', 			$return );
$name 					= $params->def( 'name', 			1 );
$greeting 				= $params->def( 'greeting', 		1 );
$pretext 				= $params->get( 'pretext' );
$posttext 				= $params->get( 'posttext' );
Step 3. Open modules\mod_login.xml

On or around line 25, Original Code:

Code: Select all

		<param name="logout_message" type="radio" default="0" label="Logout Message" description="Show/Hide the javascript Pop-up indicating Logout Success">
			<option value="0">Hide</option>
			<option value="1">Show</option>
		</param>
		<param name="greeting" type="radio" default="1" label="Greeting" description="Show/Hide the simple greeting text">
			<option value="0">No</option>
			<option value="1">Yes</option>
		</param>
Replace entire section, New code:

Code: Select all

		<param name="login_redirect" type="radio" default="0" label="IIS Redirect" description="Enables first attempt login for IIS hosted Joomla installations">
			<option value="0">Disable</option>
			<option value="1">Enable</option>
		</param>
		<param name="greeting" type="radio" default="1" label="Greeting" description="Show/Hide the simple greeting text">
			<option value="0">No</option>
			<option value="1">Yes</option>
		</param>
Test it and let me know what you think.  I changed the com_login files as well, I am not sure if it matters at all really since the mod_login files are the ones that my site calls for and uses.  I guess I wanted to be safer than sorry.  Below are those changes just in case you wanted those too.

List of files changed (with location):
  • components\com_login\login.php
  • components\com_login\login.html.php
Step 1. Open components\com_login\login.php

On or around line 33, Original Code:

Code: Select all

$params->def( 'page_title', 1 );
$params->def( 'header_login', $menu->name );
$params->def( 'header_logout', $menu->name );
$params->def( 'pageclass_sfx', '' );
$params->def( 'back_button', $mainframe->getCfg( 'back_button' ) );
$params->def( 'login', $mosConfig_live_site );
$params->def( 'logout', $mosConfig_live_site );
$params->def( 'login_message', 0 );
$params->def( 'logout_message', 0 );
$params->def( 'description_login', 1 );
$params->def( 'description_logout', 1 );
$params->def( 'description_login_text', _LOGIN_DESCRIPTION );
$params->def( 'description_logout_text', _LOGOUT_DESCRIPTION );
$params->def( 'image_login', 'key.jpg' );
$params->def( 'image_logout', 'key.jpg' );
$params->def( 'image_login_align', 'right' );
$params->def( 'image_logout_align', 'right' );
$params->def( 'registration', $mainframe->getCfg( 'allowUserRegistration' ) );
Replace entire section, New Code:

Code: Select all

$params->def( 'page_title', 1 );
$params->def( 'header_login', $menu->name );
$params->def( 'header_logout', $menu->name );
$params->def( 'pageclass_sfx', '' );
$params->def( 'back_button', $mainframe->getCfg( 'back_button' ) );
$params->def( 'login', $mosConfig_live_site );
$params->def( 'logout', $mosConfig_live_site );
$params->def( 'login_message', 0 );
$params->def( 'logout_message', 0 );
//START ADDED FOR REDIRECT
$params->def( 'login_redirect',	0 );
//END ADDED FOR REDIRECT
$params->def( 'description_login', 1 );
$params->def( 'description_logout', 1 );
$params->def( 'description_login_text', _LOGIN_DESCRIPTION );
$params->def( 'description_logout_text', _LOGOUT_DESCRIPTION );
$params->def( 'image_login', 'key.jpg' );
$params->def( 'image_logout', 'key.jpg' );
$params->def( 'image_login_align', 'right' );
$params->def( 'image_logout_align', 'right' );
$params->def( 'registration', $mainframe->getCfg( 'allowUserRegistration' ) );
Step 2. Open components\com_login\login.html.php

On or around line 125, Original Code:

Code: Select all

		<input type="hidden" name="op2" value="login" />
		<input type="hidden" name="return" value="<?php echo sefRelToAbs( $return ); ?>" />
		<input type="hidden" name="lang" value="<?php echo $mosConfig_lang; ?>" />
		<input type="hidden" name="message" value="<?php echo $params->get( 'login_message' ); ?>" />
		<input type="hidden" name="<?php echo $validate; ?>" value="1" />
		</form>
Replace entire section, New Code:

Code: Select all

		<input type="hidden" name="op2" value="login" />
		<input type="hidden" name="return" value="<?php echo sefRelToAbs( $return ); ?>" />
		<input type="hidden" name="lang" value="<?php echo $mosConfig_lang; ?>" />
		<input type="hidden" name="message" value="<?php echo $params->get( 'login_message' ); ?>" />
<!-- START ADDED FOR REDIRECT -->
		<input type="hidden" name="iis" value="<?php echo $params->get( 'login_redirect' ); ?>" />
<!-- END ADDED FOR REDIRECT -->
		<input type="hidden" name="<?php echo $validate; ?>" value="1" />
		</form>
GOOD LUCK!  :)
Last edited by IdeasUnknown on Tue Feb 27, 2007 5:17 am, edited 1 time in total.


Locked

Return to “General Questions - 1.0.x”