Tutorial Blog – Online Free Tutorial Free online Tutorial blog

29Nov/090

Joomla Common Issues

If you encounter the following error when browsing your website:

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:

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.

For more information on how to do this you can refer to our tutorial on How to backup and restore a MySQL 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:

    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. For more information on how to do that you can check this article. 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.

You can submit new topics/issues/solutions using the "Feedback" button at the top of this page.

Source:  http://www.siteground.com/tutorials/joomla15/common_issues.htm

  • Share/Bookmark
Filed under: Joomla No Comments
29Nov/091

How to upgrade from Joomla 1.0.x to Joomla 1.5?

In this tutorial we will show you how to upgrade from Joomla 1.0.x to Joomla 1.5.x.

Note that it is highly recommended to backup your existing Joomla web site before you proceed with the migration process.

Note The Joomla upgrade to 1.5 will preserve ONLY the content of your Joomla 1.0.x. No components/modules/plugins/templates you have will be available in the upgraded Joomla 1.5.

Step 1: Install the Migrator component

The first step is to install the Migrator component to your existing Joomla 1.0.x web site. You can download the Migrator component here.

More information on how to install a component in Joomla 1.0.x can be found in our Joomla 1.0 tutorial.

Once you have installed the Migrator component, you will be able to access it from the Components menu > Migrator.

The migrator component allows you to migrate your current Joomla 1.0.x data to the Joomla 1.5 database format.

Step 2: Create Migration SQL File

To proceed with the database migration click the Create Migration SQL File button located at the bottom of the Migrator component page:

Joomla 1.5 upgrade - SQL Migration success

The next step is to download the extracted SQL from your 1.0.x Joomla:

Joomla 1.5 upgrade - download the extracted SQL

You can now download your SQL dump by clicking on the Download link available on the right section of the page and upload it into your Joomla! 1.5 installation. Later, when importing this SQL file into your 1.5 installation, make sure to select Load Migration Script and use the prefix '_jos' (by default).

Step 3: Make a clean Joomla 1.5 installation

Next you should perform a manual Joomla 1.5 installation. For the purpose of this tutorial let's install Joomla 1.5 in a folder called dev.

Download the latest Joomla 1.5 package from the official website and extract it in the dev folder.

Open the dev folder by going to http://www.your-website.com/dev. You will see the Joomla start installation screen. Select your language, you should already have a database and user to fill them in.

Step 4. Perform the migration

Proceed with the installation until you reach Step 6: Configuration:

Joomla 1.5 upgrade - Step 6: Configuration

Fill the name of your web site, your admin e-mail and password details.

Important The key part here is to choose the Load Migration Script option:

Joomla 1.5 upgrade - Load Migration Script

Fill the old table prefix _jos and leave the encoding unchanged unless needed and you are familiar with this option.

By clicking on the [Browse] button you should select the Joomla 1.0.x migration dump you downloaded earlier.

Important Make sure to check the This script is a Joomla! 1.0 migration script. check box as well.

Proceed by clicking on the [Upload and execute] button.

Once the data is imported you should see the following screen:

Joomla 1.5 upgrade - Upload and execute

Click on the [Next] button near to the upper right corner.

Important You need to completely remove the installation directory.

Joomla 1.5 upgrade - Remove the installation directory

Now when you open the front end of your newly installed Joomla 1.5 you will see all the articles from the previous Joomla.

  • Share/Bookmark
Filed under: Joomla 1 Comment
29Nov/090

How to optimize Joomla 1.5.x

There are several things that you can do in order to improve the performance of your Joomla 1.5 website:

  • Enable the Joomla caching system from the admin area > Global Configuration > System. For more information on how to do that you can check this tutorial. Enabling cache will signifficantly improve the performance of your website;
  • Keep the number of extensions as low as possible. Do not install components or plugins you do not actually need;
  • Remove/Unpublish the extensions you are not using;
  • Optimize your Joomla database by following the instructions in our article on How to optimize a MySQL database;
  • Use the phpMyAdmin tool to check for big tables in your Joomla database. You can then check which extension uses this table and remove it from your website.

    Usually issues with big tables are caused by old forum extensions that are attacked by spam bots. The tables that store the forum posts get filled with spam and become really big. This slows the performance of your entire website. Such tables should be deleted manually using the phpMyAdmin tool. To delete a table mark the check box left to it and click on the red cross icon. Confirm the changes to permanently erase the table.

    Important Make sure you are deleting tables created by extensions you have already uninstalled from the Joomla back end! If you delete any of the Joomla's core tables this will probably break your website.

  • Reduce the content on your front page. Organize your information into categories and sections. This will reduce the loading time of your website and help your visitors navigate better through your information.
  • Share/Bookmark
Filed under: Joomla No Comments
29Nov/092

Joomla Security

How to change the administrative username of your Joomla website

By default your administrative username is admin. The majority of the attackers would expect the username to be admin. Changing it will protect you against many attacks.

To do this, you should:

Step 1. Log in to the Joomla administrative area and click on the User Manager menu.

Step 2. Click on your administrative user in order to edit it. You can either check the box next to the user and click the "Edit" button or directly click on the user's full name.

Step 3. In the next page you should edit the Username field. Change it to something different than "admin" and click on the "Save" button.

Alternatively, you can do this by modifying the database of your Joomla website:

Step 1. Open the phpMyAdmin tool in your cPanel and load your Joomla database.

Step 2. Select the jos_users table from the left column and click on the Browse button to edit the rows in it.

Step 3. Locate the line for the "admin" username and click on the pen icon next to it to edit it.

Step 4. Change the value of the "username" field to something different than "admin". Using lower and upper case characters as well as numbers is highly recommended.

Step 5. Once you change your administrative username, press the Go button at the bottom right part of the page.

Now you can login to the administrative area of your Joomla application with the new username.

How to change the default table prefix of your Joomla database

Changing the default table prefix will stop the majority of attacks against your database. You can use the DB Admin component in order to do this. Although it is originally designed for Joomla 1.0.x, it works on Joomla 1.5 too.

Step 1. Install the component and go to Components > DB Admin.

Step 2. Using the intuitive interface, change the default "jos_" prefix of your Joomla 1.5 tables to a different value.

Step 3. Modify the configuration.php file in your main Joomla folder. In it locate the following line:

var $dbprefix = 'jos_';

You will have to edit it to correspond to the new table prefix you have set. For example, if you have changed the table prefix to "smth_" the line in the configuration.php file should look like this:

var $dbprefix = 'smth_';

The default table prefix of your Joomla database is now changed. This should block the majority of attacks against your database.

Password protect your administrative area

Password protecting the "administrator" folder will add an additional layer of protection to your Joomla website. For more information on how to do that you should refer to our tutorial on How to password protect directories. You should set username and password for your website different from the ones for your Joomla application.

Once you do this, you will have to login twice. First to access the login page of Joomla and then to login in the application itself.

That would make guessing your passwords a very difficult task for any attacker. In addition, even if there is a security breach within the Joomla script itself, a potential attacker won't be able to gain access to your administrative end even if s/he knows your login details.

Keep your website up-to-date

You should always keep your Joomla application up-to-date. We recommend you to subscribe to the Joomla newsletter in order to receive news about new versions. You can do this at Joomla's official download page.

Once you receive a notification that a new version of Joomla is released, you should upgrade your website immediately. For detailed information on how to upgrade your site, you can refer to our Joomla upgrade tutorials:

If your website is running Joomla 1.0.x it is recommended to migrate it to Joomla 1.5.x. In Joomla 1.5 there are many security improvements in the core elements of the application. The migration, however, should be performed with caution. You should always backup your Joomla before proceeding with the upgrade. For more information you can check our tutorial on How to upgrade from Joomla 1.0.x to Joomla 1.5.

Use the .htaccess file to additionally secure your Joomla

You should make the following changes to the .htaccess file in the Joomla directory:

  • First, If you don't have a .htaccess file in your Joomla folder, you should rename the htaccess.txt file that comes with your Joomla installation package to .htaccess. To do this, you can use the File Manager tool in your cPanel. In addition, doing this will allow you to enable the SEF functionality of your Joomla application. The rules in it will block the majority of well-known attacks against your website.
  • Make sure you are running your website on PHP 5.2 or newer. All SiteGround customers have their accounts running PHP 5.2 by default.
  • Block the access to all files except index.php and index2.php. Note, however, that you may have to allow the access to some additional files if your extensions require them. If certain parts of your website do not appear, you can check the files that they rely on. Then, you can add them to the access rules. Generally, if you add the following lines to your .htaccess file, everything should work just fine:
    deny from all
    <FilesMatch "index.php">
    allow from all
    </FilesMatch>
    <FilesMatch "index2.php">
    allow from all
    </FilesMatch>

The IT Crate Web Hosting servers are perfectly optimized and secured in order to provide you with the best environment for your Joomla website. Please do not hesitate to contact us if you have any questions regarding the security of your Joomla website.

Source: http://www.siteground.com/tutorials/joomla15/joomla_security.htm

  • Share/Bookmark
Filed under: Joomla 2 Comments
29Nov/090

How to create drop-down menus in Joomla 1.5

Step 1. You need to install the Extended Menu module in your Joomla application. For more information on how to install extensions to Joomla check our tutorial on How to install extensions to your Joomla website. The module can be downloaded from the Official website of its creators.

Step 2. Go to Extensions -> Module Manager and click on the newly installed Extended Menu module.

Step 3. Now you have to configure the Extended Menu module. It provides you with the ability to set many different variables that change the way your menus will work. You can, however, leave most of the settings in their default values. You can only change the Menu Style option to Tree List ,Active Menu Class to Both, Enable Menu Template to No and Element Id to Yes. In addition you have to select which menu should be loaded from the Menu Name drop-down box.

Step 4. Now you have to organize your menus properly in order to make them display as a drop-down menus. For the purpose of this tutorial we will create a sub-enu of the Features menu and display it as a drop-down. To do this go to the Menus -> Top Menu(or if you changed the name of this menu - the one you have set) page and click on the New button. Once you set your menu to display the desired content, make sure you set its "parent" menu. In our case that will be the Features menu.

For more information on how to create menus take a look on our tutorial on Creating articles in Joomla.

Step 5. Finally you should add to your CSS file some lines that specify the behavior of the drop-down menu. You can simply add those lines at the end of the stylesheet file of your template (usually template.css):

ul#menulist_root li ul {
display:none;
}
ul#menulist_root li:hover ul{
display:block;
background:none;
}
ul#menulist_root li ul li{
background:#000000;
opacity:.85;
filter: alpha(opacity=85);
-moz-opacity: 0.85;
clear:both;
}
ul#menulist_root li ul li a{
background:none;
width:66px;
}
ul#menulist_root li ul li a:hover{
color:#AA0000;
background:none;
}

This style sheet will display a stylish, transperant drop-down menu once you point your mouse to the Features menu (i.e. on hover). You can use different CSS to achieve the looks you want for your menus.

Well done! you have successfully added a stylish horizontal drop-down menu to your Joomla website! At this point your page should look like this:

  • Share/Bookmark
Filed under: Joomla No Comments