What is Live Site for
Moderator: General Support Moderators
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.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
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.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
- ceford
- Joomla! Hero
- Posts: 2300
- Joined: Mon Feb 24, 2014 10:38 pm
- Location: Edinburgh, Scotland
- Contact:
What is Live Site for
The FPA sometimes reports Live Site is not empty and experts here say it should be and to edit configuration.php to make it empty. I have looked through the core Joomla code and can see that Live Site is reported in the System Information / Configuration tab. And it is used to prefix all urls so 'garbage' makes the site unusable. But there is no place where it is set within Joomla.
I guess this is for some special purpose known only to a few. Can anyone explain the intended use of this parameter? How is it set other than by editing configuration.php?
I guess this is for some special purpose known only to a few. Can anyone explain the intended use of this parameter? How is it set other than by editing configuration.php?
- Webdongle
- Joomla! Master
- Posts: 43233
- Joined: Sat Apr 05, 2008 9:58 pm
Re: What is Live Site for
Always thought it depended on the server configuration. Thinking there were, at one time, servers that didn't map the site root to the htdocs (www) folder.
but found
https://docs.joomla.org/Security_Checkl ... nvironment
https://docs.joomla.org/J1.5:IIS7_and_SEF_URLs
but found
https://docs.joomla.org/Security_Checkl ... nvironment
andRunning on a non-vhost environment
When you are running Joomla on a non-vhost environment please make sure that you set the live_site setting within the configruation.php to your domain in order to protect you against potential Host Header Injection. All sites that are running within an vhost setup are not affected by this issue.
https://docs.joomla.org/J1.5:IIS7_and_SEF_URLs
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
- Per Yngve Berg
- Joomla! Master
- Posts: 30482
- Joined: Mon Oct 27, 2008 9:27 pm
- Location: Romerike, Norway
Re: What is Live Site for
In Joomla 1.0 it was needed to be set for the site to work. In later versions Joomla reads it from the server.
-
- Joomla! Hero
- Posts: 2774
- Joined: Fri Jul 05, 2013 10:35 am
- Location: Parts Unknown
Re: What is Live Site for
It's required for URLs to work correctly when running from CLI. It can also be used to define a canonical base URL.
- ceford
- Joomla! Hero
- Posts: 2300
- Joined: Mon Feb 24, 2014 10:38 pm
- Location: Edinburgh, Scotland
- Contact:
Re: What is Live Site for
I can see one use: if I have a development site on localhost on my laptop I could use the url of the Live Site to fetch scripts, style sheets and images from the live server. That could be handy for testing.
Anyway, thank you all for the clarification.
I am unclear on these suggestions. I use crons, formerly calling urls and latterly using the new cli interface. Is there an example CLI usage where setting Live Site would be needed? I guess the canonical base thing would fix a situation where I am sharing a hosting service between two domains. For example domain.org and domain.com could both point to the same code with the same base - thanks for making me think about that,
There are holes in my education - I don't know what a non-vhost environment is. I guess that is because I have only ever used vhost environments (this century).Webdongle wrote: ↑Fri Apr 15, 2022 10:19 amAlways thought it depended on the server configuration. Thinking there were, at one time, servers that didn't map the site root to the htdocs (www) folder.
but found
https://docs.joomla.org/Security_Checkl ... nvironment
andRunning on a non-vhost environment
When you are running Joomla on a non-vhost environment please make sure that you set the live_site setting within the configruation.php to your domain in order to protect you against potential Host Header Injection. All sites that are running within an vhost setup are not affected by this issue.
https://docs.joomla.org/J1.5:IIS7_and_SEF_URLs
Anyway, thank you all for the clarification.
- brian
- Joomla! Master
- Posts: 12728
- Joined: Fri Aug 12, 2005 7:19 am
- Location: Leeds, UK
- Contact:
Re: What is Live Site for
It has no current use in core. Any comment saying anything else is plain wrong.
"Exploited yesterday... Hacked tomorrow"
Blog http://brian.teeman.net/
Joomla Hidden Secrets http://hiddenjoomlasecrets.com/
Blog http://brian.teeman.net/
Joomla Hidden Secrets http://hiddenjoomlasecrets.com/
- Webdongle
- Joomla! Master
- Posts: 43233
- Joined: Sat Apr 05, 2008 9:58 pm
Re: What is Live Site for
So why has it not been removed?
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
-
- I've been banned!
- Posts: 13639
- Joined: Sun Jul 05, 2009 3:30 am
- Location: Canberra, Australia
Re: What is Live Site for
+1 @Webdongle
- brian
- Joomla! Master
- Posts: 12728
- Joined: Fri Aug 12, 2005 7:19 am
- Location: Leeds, UK
- Contact:
Re: What is Live Site for
It has no current use in core
"Exploited yesterday... Hacked tomorrow"
Blog http://brian.teeman.net/
Joomla Hidden Secrets http://hiddenjoomlasecrets.com/
Blog http://brian.teeman.net/
Joomla Hidden Secrets http://hiddenjoomlasecrets.com/
-
- I've been banned!
- Posts: 13639
- Joined: Sun Jul 05, 2009 3:30 am
- Location: Canberra, Australia
Re: What is Live Site for
Because (as many people have observed and pointed out that I know nothing) I have never properly understood the purpose of $live_site in J! but, for some reason, a non-null value seems to have strange side-effects and because I could not possibly guess how all of the millions of lines of code in the core CMS may interoperate with one another, I should probably not write anything in this discussion.
There are a couple of references to this configuration setting in the J! CMS core but there's probably only one condition that is actually tested for anything and that is in ../libraries/src/Uri/Uri.php (in J! 4.x and J! 3.x).
There are a couple of references to this configuration setting in the J! CMS core but there's probably only one condition that is actually tested for anything and that is in ../libraries/src/Uri/Uri.php (in J! 4.x and J! 3.x).