a Fix for a A Common Joomla error

Web hosting, SEO, etc... related
Post Reply
User avatar
Nipuna
Moderator
Moderator
Posts: 2729
Joined: Mon Jan 04, 2010 8:02 pm
Location: Deraniyagala,SRI LANKA

a Fix for a A Common Joomla error

Post by Nipuna » Thu Sep 29, 2011 9:16 am

Error

Code: Select all

Database Error: Unable to connect to the database:Could not connect to database
You should check the configuration.php file of your Joomla application and make sure the following lines are correct:

Code: Select all

var $dbtype = 'mysql';
var $host = 'localhost';
var $user = 'user_jo151';
var $password = 'YourPassword';
var $db = 'user_jo151';
var $dbprefix = 'jos_';
You should make sure you are using the correct MySQL username and database in your configuration.php file.

You can use the MySQL Databases tool in your cPanel in order to check the correct username and database for your Joomla.

In addition, make sure that your MySQL username is added to your database. More information on that matter can be found in our tutorial on How to create a MySQL database and user.

This issue can also be caused by errors within the database itself. In such cases you can try restoring your Joomla database.

Your main website looks fine but all of your links return a "404 Page Not Found" error.

Such issues are usually caused by the SEF functionality of Joomla. There are several things you should check in order to fix this:

Open your configuration.php file and edit the var $live_site = ' '; line to match the actual URL of your website. If your website is http://yourdomain.com for example, the line should look like this:

Code: Select all

var $live_site = 'http://yourdomain.com ';
Go to the administrative end of your Joomla website -> Global Configuration and make sure that both Search Engine Friendly URLs and Use Apache mod_rewrite are set to Yes.
Make sure you have renamed the htaccess.txt file in your Joomla folder to .htaccess.

If you follow all of the steps above you should have a fully operational Joomla website with the SEF functionality enabled. For testing purposes you can temporarily disable the Search Engine Friendly URLs in order to check whether they are the cause for your issues.

If you want to publish a module in a certain position but you can't find it in the "Position" drop-down menu, you can simply type it. For example, if you want to publish a menu in the "user3" position and it is not in the list, you can simply type user3 in the field. Joomla displays only the positions that have published modules in them. Therefore, if the position is defined in the template you are using you can safely type it even if it is not shown in the Position options.

If you receive an Error:"xml file is missing in package" when installing a new template, first check whether it is designed for Joomla 1.5. If it is created for Joomla 1.0 you can try enabling the Joomla Legacy plugin. Another reason for this issue could be that the archive you are trying to install contains the actual installation package; i.e. there is an archive within the archive. The solution is simple - you should extract the archive and install the actual installation package.

When installing a new extension you may receive a "MySQL Server has gone away" error. Usually this error occurs when you try to install a big extension and you have the FTP Layer of your Joomla application enabled. As a workaround you can disable the FTP Layer by logging to your Administrative area -> Global Configuration -> Server -> FTP Settings. There set the value of "Enable FTP" to "No". Then try installing your extension again.

If you receive a '404 - Component not found' error in Joomla 1.5 error when going to your main page you should check whether you have a default menu item published. Joomla needs a default item for the front page. In order to do this, go to your admin area -> Menus -> Your main menu. Then select the menu item that you want to be loaded when you visit your main page and click on the "Default" button at the top-right of the page.
j15default_menu[1].jpg
j15default_menu[1].jpg (89.87 KiB) Viewed 3582 times
User avatar
Neo
Site Admin
Site Admin
Posts: 2642
Joined: Wed Jul 15, 2009 2:07 am
Location: Colombo

Re: a Fix for a A Common Joomla error

Post by Neo » Thu Sep 29, 2011 9:26 am

Very nice Nipuna. Joomla is one of the most widely used CMSs in the world. Thanks for sharing your knowledge with all of us!
User avatar
Nipuna
Moderator
Moderator
Posts: 2729
Joined: Mon Jan 04, 2010 8:02 pm
Location: Deraniyagala,SRI LANKA

Re: a Fix for a A Common Joomla error

Post by Nipuna » Thu Sep 29, 2011 9:31 am

Thanks

But I am not using Joomla much. I use Magento a lot.

Not like before now I understand how to work with Joomla :)
Post Reply

Return to “Web Related”