Tuesday, March 30, 2010

Joomla Administrator force SSL login loop FIX

It took me A LONG time to find a solution on how to fix this problem. All credit for this fix goes to member:jptkts from http://forum.joomla.org.

This fixes the login loop issue when trying to login to the admin after making the Force_SSL to 1 or Administrator.

His original forum post is
http://forum.joomla.org/viewtopic.php?p=1619969#p1619969

I just wanted to re-post it in an easy to find place!

In the file: Joomlaroot/libraries/joomla/environment/uri.php
starting on line 214 replace this if statement:
Code:
if(JPATH_BASE == JPATH_ADMINISTRATOR) {
   $base['path'] .= '/administrator';
}

with the following:
Code:
if(JPATH_BASE == JPATH_ADMINISTRATOR) {
   $force_ssl = $config->getValue('config.force_ssl');
   if($force_ssl > 0){
      $base['prefix'] = ereg_replace("http://","https://",$base['prefix']);
   }
   $base['path'] .= '/administrator';
}


Stumble Upon CodePyro

6 comments:

Anonymous said...

THANK YOU! I WAS RIPPING OUT MY HAIR!

To clarify this issue for anyone who may need clarification - this issue arises when force ssl is set for admin only and $live_site (in configuration.php) is a non-https url. Note, if you don't have extensions installed which are making inappropriate use the $live_site variable, a better fix is to just set $live_site as an empty string and avoid making the core hack required. Unfortunately, several extension developers (some SEF components, for example) make liberal inappropriate use of the variable.

Ps. Its slightly more efficient and accomplishes the same thing to use str_replace rather than ereg_replace. Also, if you needed the regex functionality, you should use preg_replace as ereg_replace is deprecated.

THANK YOUR FOR POSTING THIS!!!

Anonymous said...

THANK YOU FOR POSTING! Finally a solution that works! Great job! Thanks again:-)

Anonymous said...

Thanks for posting that! Solved my problem neatly.

Jim

Sinelogix said...

Hello, Your Blog is so impressive and very informative. Thanks for sharing great Information.

Joomla Website Developer Bangalore | Joomla Web Development Bangalore | Internet Marketing Company in Bangalore | Joomla Web Design Company Bangalore

for. said...

The development of artificial intelligence (AI) has propelled more programming architects, information scientists, and different experts to investigate the plausibility of a vocation in machine learning. Notwithstanding, a few newcomers will in general spotlight a lot on hypothesis and insufficient on commonsense application. machine learning projects for final year In case you will succeed, you have to begin building machine learning projects in the near future.

Projects assist you with improving your applied ML skills rapidly while allowing you to investigate an intriguing point. Furthermore, you can include projects into your portfolio, making it simpler to get a vocation, discover cool profession openings, and Final Year Project Centers in Chennai even arrange a more significant compensation.

Data analytics is the study of dissecting crude data so as to make decisions about that data. Data analytics advances and procedures are generally utilized in business ventures to empower associations to settle on progressively Python Training in Chennai educated business choices. In the present worldwide commercial center, it isn't sufficient to assemble data and do the math; you should realize how to apply that data to genuine situations such that will affect conduct. In the program you will initially gain proficiency with the specialized skills, including R and Python dialects most usually utilized in data analytics programming and usage; Python Training in Chennai at that point center around the commonsense application, in view of genuine business issues in a scope of industry segments, for example, wellbeing, promoting and account.

The Nodejs Projects Angular Training covers a wide range of topics including Components, Angular Directives, Angular Services, Pipes, security fundamentals, Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer. Angular Training

vé máy bay từ canada về việt nam said...

Mua vé tại đại lý vé máy bay Aivivu, tham khảo

vé máy bay đi Mỹ giá rẻ

ve may bay eva tu my ve vn

khi nào có chuyến bay từ canada về việt nam

đăng ký vé máy bay từ nhật về việt nam

Chuyến bay từ Hàn Quốc về Việt Nam

Vé máy bay từ Đài Loan về Việt Nam

ve may bay cho chuyen gia nuoc ngoai

Post a Comment