Infinite loop detected in JError

General questions relating to Joomla! 2.5. Note: All 1.6 and 1.7 releases have reached end of life and should be updated to 2.5. 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.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
jbrunton
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Thu Mar 10, 2011 9:02 pm

Infinite loop detected in JError

Post by jbrunton » Fri Mar 11, 2011 7:34 pm

I have a module included in my Joomla 1.6 site that I am trying to access the session data to retrieve what menu option was selected so that the module can perform specific functionality based on the selection. I found different methods to access the session data and I believe I'm following the instructions correctly but I'm getting an error: Infinite loop detected in JError

My site is hosted on GoDaddy.

I have the called (wrapper) module located in an application folder in the joomla directory.

I find this code interesting:

Code: Select all

dirname('/home/content/XX/XXXXXXX/html/joomla/joomla/')
where the joomla folder must be specified twice otherwise it isn't included when I echo the JPATH_BASE. Quirky! The examples I've view online didn't seem to indicate this.

Below is the code that I include in my module at the beginning:

Code: Select all

<?php

define( '_JEXEC', 1 );
define( 'DS', DIRECTORY_SEPARATOR );
define('JPATH_BASE', dirname('/home/content/XX/XXXXXXX/html/joomla/joomla/'));

echo  JPATH_BASE .DS.'includes'.DS . '<br />';

require_once ( JPATH_BASE .DS . 'includes'.DS.'defines.php' );
require_once ( JPATH_BASE .DS . 'includes'.DS.'framework.php' );

$mainframe = JFactory::getApplication('sitename.com/joomla');
$mainframe->initialise();

$session =& JFactory::getSession();
echo('page_id is:' . $session->get('page_id') . '<br />');

?>

shadowstep0705
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 197
Joined: Sat Dec 11, 2010 6:57 pm

Re: Infinite loop detected in JError

Post by shadowstep0705 » Sat Mar 12, 2011 9:28 pm

Welcome to Joomla!
Have you set the right temp and logs folder in the global configuration?

jbrunton
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Thu Mar 10, 2011 9:02 pm

Re: Infinite loop detected in JError

Post by jbrunton » Mon Mar 21, 2011 2:40 pm

Sorry for the delay - been on vacation.

I had not specified targets for temp and logs.

Here is what the configuration.php contains:

public $tmp_path = '/tmp';
public $log_path = '/var/logs';

The configuration.php is located in the joomla folder.
The tmp folder is also located in the joomla folder.
There is a logs folder but not a var folder.

The application that I'm trying to access the session data from is at the same level as the joomla folder.

shadowstep0705
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 197
Joined: Sat Dec 11, 2010 6:57 pm

Re: Infinite loop detected in JError

Post by shadowstep0705 » Mon Mar 21, 2011 4:29 pm

jbrunton wrote:Sorry for the delay - been on vacation.

I had not specified targets for temp and logs.

Here is what the configuration.php contains:

public $tmp_path = '/tmp';
public $log_path = '/var/logs';

The configuration.php is located in the joomla folder.
The tmp folder is also located in the joomla folder.
There is a logs folder but not a var folder.

The application that I'm trying to access the session data from is at the same level as the joomla folder.
Try changing

Code: Select all

public $log_path = '/var/logs';
to

Code: Select all

public $log_path = '/logs';

jbrunton
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Thu Mar 10, 2011 9:02 pm

Re: Infinite loop detected in JError

Post by jbrunton » Mon Mar 28, 2011 4:15 pm

Not any luck changing the path name. I have moved the code to a local Ubuntu Linux machine that has Joomla 1.6 installed and I'm in the process of setting it up to test locally. Unfortunately I'm getting an error in the discovery process:

Failed loading XML file
/var/www/joomla/templates/my_template/templateDetails.xml
XML: failed to load external entity "/var/www/joomla/templates/my_template/templateDetails.xml"

Its very strange - I never got an error on the hosted site. This template is not packaged as a zip file.

jbrunton
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Thu Mar 10, 2011 9:02 pm

Re: Infinite loop detected in JError

Post by jbrunton » Tue Mar 29, 2011 6:24 pm

It took some trial and error but now I have all the components moved from the hosted site to a local machine. The problem I had (Failed loading XML file) with the discovery of the template:

Failed loading XML file
/var/www/joomla/templates/my_template/templateDetails.xml
XML: failed to load external entity "/var/www/joomla/templates/my_template/templateDetails.xml"

had to do with permissions. I don't know if this was a folder or file permission problem - I opened everything up just to see if I could get it to work.

Now I can successfully obtain the Joomla menu selection in the module contained in a wrapper (but existing outside the Joomla directory structure) by accessing the session data. It works as described.

Code: Select all


// This is the AttachJoomla.php file

<?php

define( '_JEXEC', 1 );
define( 'DS', DIRECTORY_SEPARATOR );
define('JPATH_BASE', dirname('/var/www/joomla/joomla/'));

echo  JPATH_BASE .DS.'includes'.DS . '<br />';

require_once ( JPATH_BASE .DS . 'includes'.DS.'defines.php' );
require_once ( JPATH_BASE .DS . 'includes'.DS.'framework.php' );

$mainframe =& JFactory::getApplication('site');
$mainframe->initialise();

$session =& JFactory::getSession();
echo('AttachJoomla' . $session->get('page_id') . '<br />');
?>  


// This is the index.php file

<?php

            include('AttachJoomla.php');

            $selected_page = $session->get('page_id');
            echo "session value: >" . $selected_page . "<";
  ?>


Now I must determine what is preventing me from accessing the session data (infinite loop in JError) on the GoDaddy hosted site.

Stay tuned...

rburket
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Tue Aug 09, 2011 10:26 am

Re: Infinite loop detected in JError

Post by rburket » Tue Aug 09, 2011 10:34 am

I ran into this same issue with 1.7.0. It turns out my PHP installation did not support mysqli. Try changing:

Code: Select all

public $dbtype = 'mysqli';
to:

Code: Select all

public $dbtype = 'mysql';
in configuration.php and see if that helps. If that fixes it you then GoDaddy must not have mysqli support built and you'll have to fallback to the older mysql driver.

jbrunton
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Thu Mar 10, 2011 9:02 pm

Re: Infinite loop detected in JError

Post by jbrunton » Tue Aug 09, 2011 2:50 pm

Unfortunately my configuration file has:

Code: Select all

public $dbtype = 'mysql';
Where you able to get past your problem just by changing this? Also, are you using Linux hosting?

rburket
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Tue Aug 09, 2011 10:26 am

Re: Infinite loop detected in JError

Post by rburket » Thu Aug 11, 2011 7:15 pm

Sorry that didn't work for you. Changing that value fixed my problem on my local Linux install (my host provider already supported mysqli). Here's what I did that allowed me to find the cause. YMMV since you're using a different version of J!. I edited libraries/joomla/error/error.php and uncommented the backtrace line (line 169 in v1.7.0) in the throwError() method:

Code: Select all

	public static function throwError(&$exception)
	{
		static $thrown = false;

		// If thrown is hit again, we've come back to JError in the middle of throwing another JError, so die!
		if ($thrown) {
			echo debug_print_backtrace(); // *** uncomment or add this line ***
			jexit(JText::_('JLIB_ERROR_INFINITE_LOOP'));
		}
That will cause J! to print out the stacktrace which should give you some more details about the cause of your issues.

HTH

PS - the stacktrace looks quite hideous if your browser displays it as HTML. Try viewing the source or saving locally to view and it's much more readable.

shahzadrose
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Sat Aug 13, 2011 11:55 pm

Re: Infinite loop detected in JError

Post by shahzadrose » Mon Aug 15, 2011 8:39 pm

hi all
i was transferring my website to remote server. when i uploaded it i got this Jerror. when i tried to view my website "Infinite loop detected in JError". if ur getting this error then i assure u that its due to mistake in ur configuration.php file. I have been working on it for days to get rid of it ...here is how i corrected the mistakes...

Solution:

open ur configuration.php file and get to these lines first.

public $host = 'mysql6.[url banned].com'; (most or u can say alot people make the mistake of not changing it from local host you have to change it to the hosting name of ur live server u can find it by going to ur mysql in ur control pannel)

public $user = 'abc'; ( user name of ur mysql database of ur live server)
public $password = '1234abc'; ( user password of ur mysql database of ur live server)
public $db = 'abc'; ( ur data base name of ur live server)

now u have to change two more things....

public $log_path = '/home/a9258371/public_html/logs'; remember by default its located to ur "C" windows drive and in ur live server/public_html/logs "/home/and some address see in ur file manager" folderso change according to it..

public $tmp_path = '/home/a9258371/public_html/tmp'; remember by default its located to ur "C" windows drive and in ur live server "/home/and some address see in ur file manager/public_html/tmp" folder so change according to it..

well if u do these settings correctly u shouldnt get this error . THe error "Infinite loop detected in JError" is mainly due to mistake in these settings. hope this was helpful .
GoodLuck.

cwinders
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Tue Mar 01, 2011 2:40 am

Re: Infinite loop detected in JError

Post by cwinders » Sat Aug 27, 2011 1:19 am

Moving from dev area to a production area in IIS 6 on WIN Server 03.

I was using XAMPP moved to actually installing MySQL and PHP into IIS6
caused this same error for me. Thanks to shahzadrose I got it back up and running.

It was the path of the log and tmp folders in my case.

Thanks!

mhenzie
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Sun Aug 07, 2011 10:59 pm

Re: Infinite loop detected in JError

Post by mhenzie » Mon Aug 29, 2011 1:31 pm

I fo
shahzadrose wrote:hi all
i was transferring my website to remote server. when i uploaded it i got this Jerror. when i tried to view my website "Infinite loop detected in JError". if ur getting this error then i assure u that its due to mistake in ur configuration.php file. I have been working on it for days to get rid of it ...here is how i corrected the mistakes...

Solution:

open ur configuration.php file and get to these lines first.

public $host = 'mysql6.[url banned].com'; (most or u can say alot people make the mistake of not changing it from local host you have to change it to the hosting name of ur live server u can find it by going to ur mysql in ur control pannel)

public $user = 'abc'; ( user name of ur mysql database of ur live server)
public $password = '1234abc'; ( user password of ur mysql database of ur live server)
public $db = 'abc'; ( ur data base name of ur live server)

now u have to change two more things....

public $log_path = '/home/a9258371/public_html/logs'; remember by default its located to ur "C" windows drive and in ur live server/public_html/logs "/home/and some address see in ur file manager" folderso change according to it..

public $tmp_path = '/home/a9258371/public_html/tmp'; remember by default its located to ur "C" windows drive and in ur live server "/home/and some address see in ur file manager/public_html/tmp" folder so change according to it..

well if u do these settings correctly u shouldnt get this error . THe error "Infinite loop detected in JError" is mainly due to mistake in these settings. hope this was helpful .
GoodLuck.
I tried doing this, but each time I tried to save, it told me "Error. Cannot save configuration php". Why won't it allow me to change the file?

shahzadrose
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Sat Aug 13, 2011 11:55 pm

Re: Infinite loop detected in JError

Post by shahzadrose » Wed Aug 31, 2011 7:47 pm

I tried doing this, but each time I tried to save, it told me "Error. Cannot save configuration php". Why won't it allow me to change the file?
not sure y it wont let u save it .. check if by mistake u removed some , or semi cloumns ; etc

Richard_Ramsden
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Wed Mar 23, 2011 10:13 am

Re: Infinite loop detected in JError

Post by Richard_Ramsden » Thu Sep 01, 2011 9:08 pm

Cheers mate, I have spent hours trying to sort this out today. The tech support from my host couldn't sort this one out even though they are supposed to be able to deal with things like this. :-\ Wish I had read this post hours ago.
Thanks

User avatar
pe7er
Joomla! Master
Joomla! Master
Posts: 24926
Joined: Thu Aug 18, 2005 8:55 pm
Location: Nijmegen, Netherlands
Contact:

Re: Infinite loop detected in JError

Post by pe7er » Fri Sep 02, 2011 2:23 am

If you use Joomla 1.7 and run into the error Infinite loop detected in JError in Joomla 1.7,
there's probably some setting wrong in the configuration.php.

To get some more detailed information about the error,
edit on the server /libraries/joomla/error/error.php like described here:
http://docs.joomla.org/Infinite_loop_de ... Joomla_1.7
Kind Regards,
Peter Martin, Global Moderator
Company website: https://db8.nl/en/ - Joomla specialist, Nijmegen, Netherlands
The best website: https://the-best-website.com

shahzadrose
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Sat Aug 13, 2011 11:55 pm

Re: Infinite loop detected in JError

Post by shahzadrose » Fri Sep 02, 2011 4:52 am

pe7er wrote:If you use Joomla 1.7 and run into the error Infinite loop detected in JError in Joomla 1.7,
there's probably some setting wrong in the configuration.php.

To get some more detailed information about the error,
edit on the server /libraries/joomla/error/error.php like described here:
http://docs.joomla.org/Infinite_loop_de ... Joomla_1.7

hmm i tired viewing the error code when i had this prob, but if u change any thing here it may cause u some further problems later on ... so those who dont know much about php shouldn't any thing in "error.php". that's my opinion though.

bgsmthopr
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sat Sep 03, 2011 7:24 pm

Re: Infinite loop detected in JError

Post by bgsmthopr » Tue Sep 06, 2011 9:19 am

Just wanted to chime in and say my shared hosting Joomla installation is with Go Daddy too, and I found the "var/logs" discrepancy in configuration.php as well. Successfully edited, seems solved for now but still threading my way through the mine field...Generally speaking, when you're paying for something and a service is offered, IMO, you shouldn't be responsible for debugging it (and more than 1 hosting company's support has refused).

Lack of support for CMS by hosting companies that tout them as part of their competitive edge,
is not a business strategy I would emulate.

User avatar
johans
I've been banned!
Posts: 1293
Joined: Tue Oct 26, 2010 3:54 am
Contact:

Re: Infinite loop detected in JError

Post by johans » Tue Sep 06, 2011 9:59 am

check your factory.php if it is available.

zimbie_z
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Sat Sep 13, 2008 7:35 pm

Re: Infinite loop detected in JError

Post by zimbie_z » Tue Sep 13, 2011 6:01 am

Please help unless its too late.
I installed Joomla 1.7 on localhost, designed my entire site.
Then exported my database in PHPMyAdmin.

I deleted the entire database and then created a new one with a slightly different name. I then imported the database. I changed the configuration.php to the new database name and it throws the Infinite loop detected in JError.

So I recreated the old database name and restored using the exported data. Changed the configuration.php and now I'm getting the Infinite loop detected in JError even using the old db name and the original configuration.php file.
Any help would be greatly appreciated.
Thanks
Warren


***** Manual signatures are NOT allowed ********** Manual signatures are NOT allowed ********** Manual signatures are NOT allowed ********** Manual signatures are NOT allowed ********** Manual signatures are NOT allowed ********** Manual signatures are NOT allowed *****_______
I have tested the following also and you can too. I created a second database using a working site and db and then copied the db to a different name. Then made the change in configuration.php file to the new db name and it throws the Infinite loop detected in JError. If I then change the configuration.php back to the old db name it works.

All that to say I currently have a non-working site with a db export that I cannot make work with my site. Please help.

Boxx
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Tue Feb 10, 2009 10:48 am

Re: Infinite loop detected in JError

Post by Boxx » Wed Sep 14, 2011 6:25 pm

Well, I got that error message because I forgot to start mysql :-[

Regards

shahzadrose
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Sat Aug 13, 2011 11:55 pm

Re: Infinite loop detected in JError

Post by shahzadrose » Wed Sep 14, 2011 7:04 pm

zimbie_z wrote:Please help unless its too late.
I installed Joomla 1.7 on localhost, designed my entire site.
Then exported my database in PHPMyAdmin.

I deleted the entire database and then created a new one with a slightly different name. I then imported the database. I changed the configuration.php to the new database name and it throws the Infinite loop detected in JError.

So I recreated the old database name and restored using the exported data. Changed the configuration.php and now I'm getting the Infinite loop detected in JError even using the old db name and the original configuration.php file.
Any help would be greatly appreciated.
Thanks
Warren


***** Manual signatures are NOT allowed ********** Manual signatures are NOT allowed ********** Manual signatures are NOT allowed ********** Manual signatures are NOT allowed ********** Manual signatures are NOT allowed ********** Manual signatures are NOT allowed *****_______
I have tested the following also and you can too. I created a second database using a working site and db and then copied the db to a different name. Then made the change in configuration.php file to the new db name and it throws the Infinite loop detected in JError. If I then change the configuration.php back to the old db name it works.

All that to say I currently have a non-working site with a db export that I cannot make work with my site. Please help.
well for sure ur making some mistake in ur config .php file ... Read my old post it has solution follow them step by step ... dont for get to open ur control panel of the website and and get the required info from there where needed ... hoping it will solve ur problem

zimbie_z
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Sat Sep 13, 2008 7:35 pm

Re: Infinite loop detected in JError

Post by zimbie_z » Thu Sep 15, 2011 5:05 am

Well I still do not know exactly what happened but this is how I fixed the problem.
I uninstalled XAMPP and Apache deleting out all files.
I downloaded and installed a fresh Joomla 1.7 setup creating a whole new website.

Then I created a new mysql database and took the .sql backup that I created from my original site before the problem started and imported it into my new database.
Then I took all my original Joomla files and copied them over the top of the new Joomla install folder.(I was meticulous in setting up the same usernames etc)

This fixed the problem. The best I can come up with is that something got corrupted in my XAMPP or Apache installation between the time I exported my database and tried importing it again.

Having it all working on localhost I uploaded the new files to the host server. Created a new mysql backup of the database.
I know you kept telling me it was a problem with my config file but that just straight up didn't make sense to me because all I did was export and import mysql database in the beginning.
With the fresh XAMPP, Apache install I can point my config.php to any database name I like and it works.

The only thing that led me back to a XAMPP, Apache problem was this fact. I triple, double and quadrupled checked my Config.php settings combing through them over and over. I checked them against other websites that I have and couldn't find anything wrong.

Thanks for the feedback.
Warren

Manna
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Fri Sep 23, 2011 9:29 pm
Contact:

Re: Infinite loop detected in JError

Post by Manna » Fri Sep 23, 2011 9:59 pm

Hello,

I am having the same problem. I am building website by Joomla 1.7, it s not in local.

The website was working perfectly till 2 days ago, suddenly website page and my joomla administrator show up "Infinite loop detected in JError". As i read in many topics the error should be found in the file configuration.php, maybe there is something set up wrongly. I ve checked up, and everything seems correct ( Database user, database Name, User Psw, Tmp and log path, etc ).

My questions are

1) How is this possible? My website was already working without any problem from a couple of months. Nothing can be changed in my congiguration.php

2)There is maybe something related with the folder permissions?

3)Which action i can take now to get my website back up?

I have contacted my Hosting provider and this is what they said.

"The error message coming up in the site is: "Infinite loop detected in JError"

This is definitely something broken in the code. JError must be a routing
within Joomla! itself.

You should google the error above along with the name Joomla! and see what
comes up.

You should also make sure that error logging it configured for the interview
tutor site, so you can check the error logs for more details."

Pls help me!

Many thanks!

User avatar
johans
I've been banned!
Posts: 1293
Joined: Tue Oct 26, 2010 3:54 am
Contact:

Re: Infinite loop detected in JError

Post by johans » Fri Sep 23, 2011 10:24 pm

Try to login in your db if you can log-in other cause of jerror is the connection between your db and joomla file. second, check your apache if it was up.

Manna
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Fri Sep 23, 2011 9:29 pm
Contact:

Re: Infinite loop detected in JError

Post by Manna » Fri Sep 23, 2011 10:39 pm

Hi Johans,

I can log in my db.

Maybe there is not connection with my Joomla File?

User avatar
johans
I've been banned!
Posts: 1293
Joined: Tue Oct 26, 2010 3:54 am
Contact:

Re: Infinite loop detected in JError

Post by johans » Fri Sep 23, 2011 10:45 pm

try to repair your db or check your tables if there is error.

Manna
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Fri Sep 23, 2011 9:29 pm
Contact:

Re: Infinite loop detected in JError

Post by Manna » Fri Sep 23, 2011 11:10 pm

Ok I will have a check or ask to my Hosting Provider to control it and i will let you know.

uqueia
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Wed Sep 21, 2011 12:43 am

Re: Infinite loop detected in JError

Post by uqueia » Sun Sep 25, 2011 11:27 am

I had a situation were I got the error "Infinite loop detected in JError" after messing around with the database in my web host's mySQL databases.

I deleted the Joomla folder from my root directory, public_html.

Re-installed the 1 click Joomla 1.7 installation.

Good to go.

Aj_
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Thu Oct 06, 2011 7:24 pm

Re: Infinite loop detected in JError

Post by Aj_ » Thu Oct 06, 2011 7:31 pm

I am also having this problem.First i tried deleting the related database and database user through MySQL.Still i was getiing this message.Then i deleted all the code lines in 'class JConfig{}' configuration.php.The message is still there.So shouldn't this mean that the problem isn't related to configuration.php?


EDIT:Okay figured out a way to solve it.Install Joomla 1.7 from your cpanel(Softaculous->CMS->Joomla 1.7)

By default joomla will be installed in joomla16 folder in public_html.
Rename the 'configuration.php' file in the uploaded joomla directory to something else
Open the folder through file manager and copy the 'configuration.php' file to the joomla directory that you uploaded.
Open this configuration.php file with the editor.Replace the fields 'public $user','public $password','public $db','public $dbprefix' with the actual values.
Done!!

jennied53
Joomla! Intern
Joomla! Intern
Posts: 85
Joined: Sat Aug 21, 2010 1:45 pm

Re: Infinite loop detected in JError

Post by jennied53 » Tue Oct 25, 2011 12:28 pm

I just had this error, the site was a new install 1.7 and seemed to be running a bit slow since I set it up. Then all of a sudden, it threw up this error and stopped working altogether.

The thing that fixed it for me was changing this setting in configuration.php

public $dbtype = 'mysql';

Mine was set to mysqli, I think it's the default when installing. The site is now up to speed as well and working fine.

Also the problem saving configuration file mentioned by shahzadrose above, was probably due to the permissions set on this file. For security the permissions on configuration.php are set to read only or 444, but if you want to replace the file on the server you have to change the permissions first or it won't let you overwrite it, and then change them back again afterwards.

Hope this helps someone


Locked

Return to “General Questions/New to Joomla! 2.5”