The Joomla! Forum ™



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.



Post new topic Reply to topic  [ 36 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Fri Mar 11, 2011 7:34 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Mar 10, 2011 9:02 pm
Posts: 6
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:
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:
<?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 />');

?>


Top
 Profile  
 
PostPosted: Sat Mar 12, 2011 9:28 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Sat Dec 11, 2010 6:57 pm
Posts: 197
Location: Brussels, Belgium
Welcome to Joomla!
Have you set the right temp and logs folder in the global configuration?


Top
 Profile  
 
PostPosted: Mon Mar 21, 2011 2:40 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Mar 10, 2011 9:02 pm
Posts: 6
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.


Top
 Profile  
 
PostPosted: Mon Mar 21, 2011 4:29 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Sat Dec 11, 2010 6:57 pm
Posts: 197
Location: Brussels, Belgium
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:
public $log_path = '/var/logs';

to
Code:
public $log_path = '/logs';


Top
 Profile  
 
PostPosted: Mon Mar 28, 2011 4:15 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Mar 10, 2011 9:02 pm
Posts: 6
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.


Top
 Profile  
 
PostPosted: Tue Mar 29, 2011 6:24 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Mar 10, 2011 9:02 pm
Posts: 6
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:

// 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...


Top
 Profile  
 
PostPosted: Tue Aug 09, 2011 10:34 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Tue Aug 09, 2011 10:26 am
Posts: 2
I ran into this same issue with 1.7.0. It turns out my PHP installation did not support mysqli. Try changing:
Code:
public $dbtype = 'mysqli';
to:
Code:
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 [drive].


Top
 Profile  
 
PostPosted: Tue Aug 09, 2011 2:50 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Mar 10, 2011 9:02 pm
Posts: 6
Unfortunately my configuration file has:

Code:
public $dbtype = 'mysql';


Where you able to get past your problem just by changing this? Also, are you using Linux hosting?


Top
 Profile  
 
PostPosted: Thu Aug 11, 2011 7:15 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Tue Aug 09, 2011 10:26 am
Posts: 2
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:
   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.


Top
 Profile  
 
PostPosted: Mon Aug 15, 2011 8:39 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Aug 13, 2011 11:55 pm
Posts: 5
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.


Top
 Profile  
 
PostPosted: Sat Aug 27, 2011 1:19 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Tue Mar 01, 2011 2:40 am
Posts: 3
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!


Top
 Profile  
 
PostPosted: Mon Aug 29, 2011 1:31 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Sun Aug 07, 2011 10:59 pm
Posts: 2
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?


Top
 Profile  
 
PostPosted: Wed Aug 31, 2011 7:47 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Aug 13, 2011 11:55 pm
Posts: 5
Quote:
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


Top
 Profile  
 
PostPosted: Thu Sep 01, 2011 9:08 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Wed Mar 23, 2011 10:13 am
Posts: 4
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


Top
 Profile  
 
PostPosted: Fri Sep 02, 2011 2:23 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Thu Aug 18, 2005 8:55 pm
Posts: 19263
Location: Nijmegen, The Netherlands
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 - Community Leadership Team
http://www.db8.nl - Joomla specialist, Nijmegen, Nederland
Joomla 2.5 multilanguage in 10 steps: http://www.db8.nl/en/joomla-presentatio ... ge-website


Top
 Profile  
 
PostPosted: Fri Sep 02, 2011 4:52 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Aug 13, 2011 11:55 pm
Posts: 5
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.


Top
 Profile  
 
PostPosted: Tue Sep 06, 2011 9:19 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Sat Sep 03, 2011 7:24 pm
Posts: 1
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.


Top
 Profile  
 
PostPosted: Tue Sep 06, 2011 9:59 am 
User avatar
I've been banned!

Joined: Tue Oct 26, 2010 3:54 am
Posts: 1296
check your factory.php if it is available.


Top
 Profile  
 
PostPosted: Tue Sep 13, 2011 6:01 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Sat Sep 13, 2008 7:35 pm
Posts: 2
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 *****
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.


Top
 Profile  
 
PostPosted: Wed Sep 14, 2011 6:25 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Tue Feb 10, 2009 10:48 am
Posts: 3
Well, I got that error message because I forgot to start mysql :-[

Regards


Top
 Profile  
 
PostPosted: Wed Sep 14, 2011 7:04 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Aug 13, 2011 11:55 pm
Posts: 5
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 *****
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


Top
 Profile  
 
PostPosted: Thu Sep 15, 2011 5:05 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Sat Sep 13, 2008 7:35 pm
Posts: 2
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


Top
 Profile  
 
PostPosted: Fri Sep 23, 2011 9:59 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Sep 23, 2011 9:29 pm
Posts: 9
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!


Top
 Profile  
 
PostPosted: Fri Sep 23, 2011 10:24 pm 
User avatar
I've been banned!

Joined: Tue Oct 26, 2010 3:54 am
Posts: 1296
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.


Top
 Profile  
 
PostPosted: Fri Sep 23, 2011 10:39 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Sep 23, 2011 9:29 pm
Posts: 9
Hi Johans,

I can log in my db.

Maybe there is not connection with my Joomla File?


Top
 Profile  
 
PostPosted: Fri Sep 23, 2011 10:45 pm 
User avatar
I've been banned!

Joined: Tue Oct 26, 2010 3:54 am
Posts: 1296
try to repair your db or check your tables if there is error.


Top
 Profile  
 
PostPosted: Fri Sep 23, 2011 11:10 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Sep 23, 2011 9:29 pm
Posts: 9
Ok I will have a check or ask to my Hosting Provider to control it and i will let you know.


Top
 Profile  
 
PostPosted: Sun Sep 25, 2011 11:27 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Sep 21, 2011 12:43 am
Posts: 5
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.


Top
 Profile  
 
PostPosted: Thu Oct 06, 2011 7:31 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Thu Oct 06, 2011 7:24 pm
Posts: 1
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!!


Top
 Profile  
 
PostPosted: Tue Oct 25, 2011 12:28 pm 
Joomla! Intern
Joomla! Intern

Joined: Sat Aug 21, 2010 1:45 pm
Posts: 57
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


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



Who is online

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