The Joomla! Forum ™



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.



Post new topic Reply to topic  [ 12 posts ] 
Author Message
PostPosted: Thu Feb 11, 2010 4:40 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Feb 19, 2008 7:25 pm
Posts: 29
We have some interesting 404 problems that we are stumped on. We currently are moving all of our sites from various hosters into our own Linux box. We have moved 6 sites. Every single site has been moved over and is working just fine once we move it over. We are having problems with 1 site though.

we have a perfect file transition and we move the database over successfully. We get a 404 error on every page (including the landing) We have tried a few things to resolve this.

Disable SEF URL's (Does nothing)
Change templates (Does nothing)

The only difference this site has from all the others is that it is the main site on our servers that uses named based virtual hosting. So it is the primary VHost.

Does anyone have any suggestions?


Last edited by Gatsu000 on Sun Feb 14, 2010 10:33 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Thu Feb 11, 2010 7:16 pm 
User avatar
Joomla! Virtuoso
Joomla! Virtuoso

Joined: Thu Feb 15, 2007 5:48 am
Posts: 4410
Location: Nottingham, UK
Have you set the $live_site variable in configuration.php to the full URL of the Joomla site? It helps getting the default virtual host site to present the correct URL if domains that do not have a corresponding virtual host point to the site.

_________________
toivo
my first programs were assembled and run in 16KB :)
http://archive.computerhistory.org/resources/text/GE/GE.GE-115SystemSoftware.1967.102646096.pdf#zoom=100


Top
 Profile  
 
PostPosted: Fri Feb 12, 2010 5:56 pm 
User avatar
Joomla! Guru
Joomla! Guru

Joined: Sat Aug 22, 2009 7:35 am
Posts: 641
Location: India
@Gatsu000: Yes, entering your site address (e.g. http://domain.com) in $live_site variable solves such problems but my question here is to toivo...
@toivo: You seem to know about this concept. What does this variable do and how come changing its value makes the site work? (Its worked for everyone of my sites)

_________________
Raghav Tomar
Head To Joomla Section At - http://meetraghav.co.in
All Users are requested to mark solved problems as RESOLVED! Its really helpful for others!


Top
 Profile  
 
PostPosted: Fri Feb 12, 2010 8:19 pm 
User avatar
Joomla! Virtuoso
Joomla! Virtuoso

Joined: Thu Feb 15, 2007 5:48 am
Posts: 4410
Location: Nottingham, UK
Quote:
You seem to know about this concept. What does this variable do and how come changing its value makes the site work?
It is a long story. I had a problem in a setup where several domains are pointing to the IP address of the server but only one domain is installed as a virtual host and therefore the other domains are assigned to the default virtual host.

A couple of times I noticed a different domain in the status bar while the home page was loading and managed to pinpoint the problem to a particular extension that had been installed recently. The code in that extension prompted me to look at the standard function JURI::base() (http://docs.joomla.org/JURI/base) in libraries/joomla/environment/uri.php. It sets a static variable to store the domain which it subsequently dishes out.

If the server has received an HTTP request for a domain different from the virtual host, my guess was that the domain from the static variable is presented in a subsequent request instead of the real domain. However, if $live_site is set in configuration.php, its value overrides the domain stored in the static variable in JURI::base().

It is an unlikely explanation but it fixed my problem. The reason for your problem may be different but using $live_site fixed it as well.

_________________
toivo
my first programs were assembled and run in 16KB :)
http://archive.computerhistory.org/resources/text/GE/GE.GE-115SystemSoftware.1967.102646096.pdf#zoom=100


Top
 Profile  
 
PostPosted: Sat Feb 13, 2010 1:09 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Feb 19, 2008 7:25 pm
Posts: 29
Well it did and didn't fix our problem. We added the live site variable to our website and at that point instead of 404 errors we got just blank white pages on every other page.

We figured what the hell maybe we screwed up. We killed the installation and database to see if fresh would work. We installed a fresh copy and it is working just fine without the live site variable.

To recap:
So joomla can run perfectly without that live site variable
Fresh installations work perfectly
Migrated site shows 404 errors
adding the live site variable only produces blank pages instead


Anyone have some solutions?


Top
 Profile  
 
PostPosted: Sat Feb 13, 2010 3:09 am 
User avatar
Joomla! Virtuoso
Joomla! Virtuoso

Joined: Thu Feb 15, 2007 5:48 am
Posts: 4410
Location: Nottingham, UK
The error causing the blank page is recorded in the PHP error log, the location of which is in the php.ini file.

_________________
toivo
my first programs were assembled and run in 16KB :)
http://archive.computerhistory.org/resources/text/GE/GE.GE-115SystemSoftware.1967.102646096.pdf#zoom=100


Top
 Profile  
 
PostPosted: Sat Feb 13, 2010 5:12 am 
User avatar
Joomla! Guru
Joomla! Guru

Joined: Sat Aug 22, 2009 7:35 am
Posts: 641
Location: India
@Gatsu000: Well...in that case, I think it is some sort of extension giving the problem. Try disabling all third party extensions on the migrated site. See if that cures the trouble. If it does, start enabling those extensions one by one. You will have the troublemaker in a net!

_________________
Raghav Tomar
Head To Joomla Section At - http://meetraghav.co.in
All Users are requested to mark solved problems as RESOLVED! Its really helpful for others!


Top
 Profile  
 
PostPosted: Sat Feb 13, 2010 5:14 am 
User avatar
Joomla! Guru
Joomla! Guru

Joined: Sat Aug 22, 2009 7:35 am
Posts: 641
Location: India
@Toivo: Thanks a lot!

_________________
Raghav Tomar
Head To Joomla Section At - http://meetraghav.co.in
All Users are requested to mark solved problems as RESOLVED! Its really helpful for others!


Top
 Profile  
 
PostPosted: Sat Feb 13, 2010 3:06 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Feb 19, 2008 7:25 pm
Posts: 29
What does this mean?

[Sat Feb 13 08:03:49 2010] [error] [client (blanked)] PHP Fatal error: Cannot redeclare JConfig::$live_site in /path/to/site/public_html/configuration.php on line 21


Top
 Profile  
 
PostPosted: Sat Feb 13, 2010 7:58 pm 
User avatar
Joomla! Virtuoso
Joomla! Virtuoso

Joined: Thu Feb 15, 2007 5:48 am
Posts: 4410
Location: Nottingham, UK
You may have two lines starting with $live_site in the file configuration.php.

_________________
toivo
my first programs were assembled and run in 16KB :)
http://archive.computerhistory.org/resources/text/GE/GE.GE-115SystemSoftware.1967.102646096.pdf#zoom=100


Top
 Profile  
 
PostPosted: Sat Feb 13, 2010 9:25 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Feb 19, 2008 7:25 pm
Posts: 29
I see that got rid of the blank pages. Every time we load a page and get those mysterious 404 errors we get this log

[Sat Feb 13 14:09:49 2010] [error] [client 65.36.241.76] PHP Notice: Trying to get property of non-object in /pathtofiles/public_html/includes/router.php on line 179
[Sat Feb 13 14:09:49 2010] [error] [client 65.36.241.76] PHP Notice: Trying to get property of non-object in /pathtofiles/public_html/includes/router.php on line 182

What is this router thing? Someone might be able to let me know what that is (the live site is properly in place now btw)


Top
 Profile  
 
PostPosted: Sun Feb 14, 2010 10:32 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Feb 19, 2008 7:25 pm
Posts: 29
Ok, we found our problem. While doing some digging we looked at the lines of code in our routing table
Code:
         //Set the information in the request
         $vars = $item->query;

         //Get the itemid
         $vars['Itemid'] = $item->id;


SO we read the pages http://docs.joomla.org/Routing

After thinking for awhile. What would try to read the incorrect file hierarchy? We had changed everything in all the correct places. Well we realized we had caching set. We simply cleared the entire cache and it worked just fine. We were even able to remove the live site variable and it still worked.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 



Who is online

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