Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Joomla administrator redirects to installation

I have a Joomla 2.5 site were I can no longer access the administrator panel. That only redirects me to /installation/index.php which (as it should) gives a 404. I think this happened after an upgrade.

I tried to clear browser cache as suggested here: Joomla 1.0, administrator link redirect to "installation/index.php", how to prevent this redirection?

But that didn't work.

A long time ago, back in the 1.x days, there were some security advices on the Joomla site which among other things suggested to move configuration.php outside the public_html directory which I followed. I can't find them now, but I tried to copy the configuration.php file to Joomla root directory as well as keeping it at the directory which is defined in defines.php (define('JPATH_CONFIGURATION').

Any ideas?

My extensions

bash-3.2$ find plugins/ -type d
plugins/
plugins/authentication
plugins/authentication/gmail
plugins/authentication/joomla
plugins/authentication/ldap
plugins/captcha
plugins/captcha/recaptcha
plugins/content
plugins/content/emailcloak
plugins/content/finder
plugins/content/geshi
plugins/content/geshi/geshi
plugins/content/geshi/geshi/geshi
plugins/content/joomla
plugins/content/loadmodule
plugins/content/pagebreak
plugins/content/pagenavigation
plugins/content/vote
plugins/editors-xtd
plugins/editors-xtd/article
plugins/editors-xtd/image
plugins/editors-xtd/pagebreak
plugins/editors-xtd/readmore
plugins/editors
plugins/editors/codemirror
plugins/editors/none
plugins/editors/tinymce
plugins/extension
plugins/extension/joomla
plugins/finder
plugins/finder/categories
plugins/finder/contacts
plugins/finder/content
plugins/finder/newsfeeds
plugins/finder/weblinks
plugins/quickicon
plugins/quickicon/extensionupdate
plugins/quickicon/joomlaupdate
plugins/search
plugins/search/categories
plugins/search/contacts
plugins/search/content
plugins/search/newsfeeds
plugins/search/weblinks
plugins/system
plugins/system/cache
plugins/system/debug
plugins/system/highlight
plugins/system/languagecode
plugins/system/languagecode/language
plugins/system/languagecode/language/en-GB
plugins/system/languagefilter
plugins/system/log
plugins/system/logout
plugins/system/p3p
plugins/system/redirect
plugins/system/remember
plugins/system/sef
plugins/user
plugins/user/contactcreator
plugins/user/joomla
plugins/user/profile
plugins/user/profile/fields
plugins/user/profile/profiles
like image 261
Niclas Nilsson Avatar asked Aug 23 '13 08:08

Niclas Nilsson


1 Answers

Try this, if wont work move to another point.

1. Change this

if (file_exists(JPATH_INSTALLATION.'/index.php')) {
   header('Location: '.substr($_SERVER['REQUEST_URI'], 0, strpos($_SERVER['REQUEST_URI'], 'index.php')).'installation/index.php');

To this:

if (file_exists(JPATH_INSTALLATION.'/index.php')) {
header('Location: '.substr($_SERVER['REQUEST_URI'], 0, strpos($_SERVER['REQUEST_URI'],   'index.php')).JPATH_INSTALLATION.'/index.php');

Its line 25-26 in administrator/includes/framework.php

2. Remove line 23-32 in this file - it checks for installation folder and size of configuration file, if you dont have installation folder and configuration file is ok, you can remove this

3. set variables $sef and $sef_rewrite to zero in configuration.php

like image 62
JTC Avatar answered Sep 19 '22 19:09

JTC