Nov 23, 2011
Learn How to Install Joomla on Your Website in Less Than 5 Minutes
You can learn how to install Joomla on your website in a number of ways. However, the simplest and by far, the quickest is through Fantastico. This usually takes about 1-2 minutes once you know how. In this article, we are going to cover just that.
So, here is the step by step process for installing Joomla on your own website.
1. Log in to your hosting account's Control Panel. This should usually be http://www.mydomainname.com/controlpanel, where 'mydomainnane' is replaced your own website that is hosted on that hosting account.
2. Look for the smiley icon that says "Fantastico" and click on it. This is where you will be installing the Joomla package from. Note that Sometimes, it may say "Fantastico De Luxe." Don't worry it is the same thing. Much like saying "my room" and "my bedroom" ;)
3. Look for "Joomla" under the "Content Management" category of scripts in Fantastico and click on it. Also, note that the title 'Joomla' may sometimes have some numerical suffixes showing which version it is. For example, the title may read "Joomla 1.5" for version 1.5 of the CMS. Just click on the most recent version and go to the next step.
4. Look for the hyperlinked blue "New Installation" link and make sure you have at least as much as the minimum disk space required for you to install Joomla on your website. This is usually about 25 MB of disk space.
This is not usually
a problem, with most people's disk space running into the tens of gigabytes. But it is still good to make sure you have enough to hold a new Joomla installation.
5. Choose where on your website you want to install Joomla. Will it be on your main domain, an existing sub-domain or a new not-yet-existing sub-domain or directory? Indicate it in this part of the installation process.
6. Fill out other required fields that are required to smoothly install Joomla on the site. This includes creating an Admin username and password. Don't choose 'Admin' and 'password' as your username and password. Many people do this and have been hacked. Also, fill out the site name or main keyword, email address and other details here.
Then click the "Install Joomla" button.
7. On the next page, make sure that all the needed information is correct. Also, note down your Admin username, password and backend page (the one that ends with /administrator).
Finally, hit that "Finish Installation" of a button.
Voila! You have just learned how to install Joomla on your website. This should usually take only 1 or 2 minutes at most. After all, all you are doing is just hitting buttons, except for when choosing a username, etc.
If it still sounds a little like "nerd talk" (with all due respect to all the nerds out there ;) ), you can watch the video version of this article where you see the Joomla installation done live on the screen and see if you can learn how to install Joomla after that.
Oct 12, 2011
PHP & FTP
You can put files on the server through ftp.
Before we begin with the tutorial, you may want to download my PHP FTP class. This class is a simple wrapper around the native PHP FTP functions.
Most of the PHP applications store and read their settings from a configuration file. Normally an installer script is used to write the settings to the config file and then an admin section is provided through which the administrator can manage these settings. Normal PHP file functions like fopen and fputs can be used to create and write to the configuration file.
But there is a major drawback with this approach. If you want to create a file/directory through a PHP script in another directory, say, includes, then the directory includes need to be writable by the PHP script. Most of the times this means that you will need to chmod the directory to 777. This is a big security hole.
Another problem is that, more often than not, the owner/group of the newly created file is set to that of the PHP process. PHP process normally run as “nobody” or “www”. This means that the newly created file will be owned by “nobody” or “www” and you might not be able to delete the file through FTP. You will have to delete the file through a PHP script.
A simple workaround to the above problems would be to use the chmod and chown functions. Unfortunately both these functions don’t work on most shared hosting plans.
//Make the file writable by all
chmod('somefile',0777);
//Open the file and write to it
$fp = fopen('somefile', 'w');
fputs($fp,$data); fclose($fp);
//Make the file writable only by the owner
chmod('somefile',0644);
Therefore we will use PHP’s FTP functions to create files, directories and to change the mode of files. The functions that are of importance to use here are: ftp_mkdir, ftp_put and ftp_site.
Connecting to FTP server
Use ftp_connect function to connect to FTP server and use ftp_login function to login to FTP server.
//Connect to the FTP server
$ftpstream = @ftp_connect('localhost');
//Login to the FTP server
$login = @ftp_login($ftpstream, 'user', 'secret');
if($login) {
//We are now connected to FTP server.
}
//Close FTP connection
ftp_close($ftpstream);
You can read whole tutorial here.
Jun 17, 2011
CSS vs. tables in HTML
An Interesting article about css with css vs. table:
http://esitesecrets.com/articles/1667/1/CSS-Layouts-Vs-Table-Layouts-Which-One-is-Better/Page1.html
In last 2 years I have used HTML with css table-less because more people which asking me for HTML slicing to NOT use tables. And I do that....
http://esitesecrets.com/articles/1667/1/CSS-Layouts-Vs-Table-Layouts-Which-One-is-Better/Page1.html
In last 2 years I have used HTML with css table-less because more people which asking me for HTML slicing to NOT use tables. And I do that....
Jun 7, 2011
Mysql - Modify an existing MySQL column
The best laid plans of mice and DBAs oft go awry, so it is sometimes necessary to change the characteristics of a column after it exists and contains data. Beware whenever you make changes to your database — always make a backup first.
After a week of using the contacts table created inCreate a basic MySQL table, we may find that 40 characters for the column name doesn’t cut it. To increase the size of the name column to 80 characters:
ALTER TABLE contacts CHANGE name name VARCHAR(80);The first part of this statement (ALTER TABLE contacts CHANGE name) identifies that we want to change the column name in the table contacts. The second part of this statement (name VARCHAR(80)) redefines the column name. We could further define this column as NOT NULL, for example, with
ALTER TABLE contacts CHANGE name name VARCHAR(80) NOT NULL;Jun 2, 2011
PHP - IF statement
Introduction
Over the past two parts I have shown you the basics of text in PHP and how to store it as variables. In this part of the tutorial I will show you how to use IF statements to make decisions in your scripts.
The Basics Of IF
If statements are used to compare two values and carry out different actions based on the results of the test. If statements take the form IF, THEN, ELSE. Basically the IF part checks for a condition. If it is true, the then statement is executed. If not, the else statement is executed.
IF Strucure
The structure of an IF statement is as follows:
IF (something == something else)
{
THEN Statement
} else {
ELSE Statement
}
Variables
The most common use of an IF statement is to compare a variable to another piece of text, a number, or another variable. For example:
if ($username == "webmaster")
which would compare the contents of the variable to the text string. The THEN section of code will only be executed if the variable is exactly the same as the contents of the quotation marks so if the variable contained 'Webmaster' or 'WEBMASTER' it will be false.
Constructing The THEN Statment
To add to your script, you can now add a THEN statement:
if ($username == "webmaster") {
echo "Please enter your password below";
}
This will only display this text if the username is webmaster. If not, nothing will be displayed. You can actually leave an IF statement like this, as there is no actual requirement to have an ELSE part. This is especially useful if you are using multiple IF statements.
Constructing The ELSE Statement
Adding The ELSE statement is as easy as the THEN statement. Just add some extra code:
if ($username == "webmaster") {
echo "Please enter your password below";
} else {
echo "We are sorry but you are not a recognised user";
}
Of course, you are not limited to just one line of code. You can add any PHP commands in between the curly brackets. You can even include other IF statments (nested statements).
Other Comparisons
There are other ways you can use your IF statement to compare values. Firstly, you can compare two different variables to see if their values match e.g.
if ($enteredpass == $password)
You can also use the standard comparision symbols to check to see if one variable is greater than or less than another:
if ($age < "13")
Or :
if ($date > $finished)
You can also check for multiple tests in one IF statement. For instance, if you have a form and you want to check if any of the fields were left blank you could use:
if ($name == "" || $email == "" || $password == "") {
echo "Please fill in all the fields";
}
Part 4
In part four I will show you some other ways of using your PHP script to do other types of checks and loops.
Over the past two parts I have shown you the basics of text in PHP and how to store it as variables. In this part of the tutorial I will show you how to use IF statements to make decisions in your scripts.
The Basics Of IF
If statements are used to compare two values and carry out different actions based on the results of the test. If statements take the form IF, THEN, ELSE. Basically the IF part checks for a condition. If it is true, the then statement is executed. If not, the else statement is executed.
IF Strucure
The structure of an IF statement is as follows:
IF (something == something else)
{
THEN Statement
} else {
ELSE Statement
}
Variables
The most common use of an IF statement is to compare a variable to another piece of text, a number, or another variable. For example:
if ($username == "webmaster")
which would compare the contents of the variable to the text string. The THEN section of code will only be executed if the variable is exactly the same as the contents of the quotation marks so if the variable contained 'Webmaster' or 'WEBMASTER' it will be false.
Constructing The THEN Statment
To add to your script, you can now add a THEN statement:
if ($username == "webmaster") {
echo "Please enter your password below";
}
This will only display this text if the username is webmaster. If not, nothing will be displayed. You can actually leave an IF statement like this, as there is no actual requirement to have an ELSE part. This is especially useful if you are using multiple IF statements.
Constructing The ELSE Statement
Adding The ELSE statement is as easy as the THEN statement. Just add some extra code:
if ($username == "webmaster") {
echo "Please enter your password below";
} else {
echo "We are sorry but you are not a recognised user";
}
Of course, you are not limited to just one line of code. You can add any PHP commands in between the curly brackets. You can even include other IF statments (nested statements).
Other Comparisons
There are other ways you can use your IF statement to compare values. Firstly, you can compare two different variables to see if their values match e.g.
if ($enteredpass == $password)
You can also use the standard comparision symbols to check to see if one variable is greater than or less than another:
if ($age < "13")
Or :
if ($date > $finished)
You can also check for multiple tests in one IF statement. For instance, if you have a form and you want to check if any of the fields were left blank you could use:
if ($name == "" || $email == "" || $password == "") {
echo "Please fill in all the fields";
}
Part 4
In part four I will show you some other ways of using your PHP script to do other types of checks and loops.
Subscribe to:
Posts (Atom)