Reputation: 462
I am having one problem with this site http://onlinecasinosouthafrica.co.za/ in joomla. I just change the site global configuration from admin beside that working to submit a form to send mail. I don,t know the reason behind now my site is showing restricted access. May be due to change of global configuration as I have changed the Use Apache mod_rewrite option from no to yes, though after that I have worked and refresh the page it was showing clearly now it is showing restricted access only. unable to understand what is going on.Please help me in this.
thanks in advance.
Upvotes: 1
Views: 11546
Reputation: 400
At the top of every .php file in a Joomla site you will see something similar to this:
defined('_JEXEC') or die('Restricted Access');
This is here to prevent anyone accessing the file directly via the browser. It basically says: If the _JEXEC constant is not defined, kill the process, _JEXEC is set when the application is run, it happens in the sites main index.php file near the top:
// Set flag that this is a parent file.
define('_JEXEC', 1);
If this is removed, it will definetely cause those issues, but most likely the error is resulting from a component or plugin that is published in the CMS.
If you have installed a plugin that was meant for Joomla 1.0, you will see an error like this, this happens because rather that looking for _JEXEC being set, it looks for something like _VALID_MOS, in this case, try switching legacy mode plugin on.
If Legacy mode does not fix your issue, check the website template to ensure the defined('_JEXEC') or die('Restricted Access'); line is not causing issues, comment it out with a # or // and test that.
You could try switching the Joomla debug on, but there is no guarantee that will help.
If you are really stuck, you can try one of the following:
1) Backup database, then disable all of the plugins one by one (I noticed you still have access to the administrator area), then either re-enable the plugins or restore the database.
2) I once had to do a find and replace of every plugin in a CMS, I replaced the string:
'Restricted Access'
with
'Restricted Access' . __FILE__
I done this using PHP and it allowed me to pinpoint exactly which file was throwing the error. I obviously backed up the site file structure first, so I simply unzipped the backup and deleted the modified files later.
Upvotes: 2