How to fix $live_site missing error in sh404SEF

If you're using sh404SEF, you have probably seen the alert which says:

WARNING: $live_site missing from Joomla configuration.php file!

It stands out in bold, red letters - but what does it really mean? And how do you fix it? Read on for enlightenment.
sh404sef Joomla configuration - live site URL missing

Introduced in Joomla 1.5.1

Since version 1.5.1 (8-February-2008), Joomla has tried to detect your web site root url (ie: automatically. This information is needed in many functions found in Joomla. Particularly in those dealing with creating links and URLs.

05-Feb-2008 Anthony Ferrara
# Added live_site parameter to config, and JURI::base override (fixes SEF and proxy issues)

The guys behind sh404SEF (Anything Digital) writes he following on their site:

Unfortunately, the automatic detection process sometimes fails, usually because of a faulty web server setup. In such cases, various errors will appear, and sh404sef, as it deals a lot with URLs and links will be one of the most affected extensions. Symptoms can be bad home page links, 404 pages creeping out, and more

To allow fixing of this problem, Joomla introduced in an early version of the 1.5.x series a configuration variable, called $live_site. However, because they think auto-detection will succeed most of the time, they do not provide a way to easily set this variable. We advise that every joomla site should have a variable in the configuration.php file that defines the base url of your site. e.g. var $live_site = ''

In some circumstances joomla does not create this variable during the installation process so you will need to manually edit your configuration.php file to ensure that sh404sef will work correctly.

How to fix the $live_site error

In the file configuration.php located in the directory where you have installed Joomla, look to see whether the following variable is present.

var $live_site = '';

If it's empty, fill in your domain name between the quotes:

var $live_site = '';

That's it.

Now go to the sh404SEF basic configuration and see that the Joomla live_site parameter is now showing the correct URL.

Read 14773 times Originally published on Wednesday, 21 April 2010 14:00
Last modified on Sunday, 25 April 2010 22:55
comments powered by Disqus