Using PHP - cPanel Tutorial Ch.6
What exactly is PHP? It just happens to be the oldest and perhaps the most frequently used language on the web. Many of the sites you view online are composed of PHP scripts. PHP works with your cPanel to enhance the visual effects of your site among other things.
One common function of PHP in regard to the cPanel is to create a CRON JOB. Cron jobs are simply automated tasks that are executed over a Linux server, very much like SCHEDULED TASKS on a Windows server. The purpose is to allow users to execute an important process without manually starting it every day. Below is a perfect example:
Let’s just say that your website is hosting an auction. It must operate on fixed period; something similar to what you find on Ebay. We will use an example of five days here before the bidding ends. So what happens when the bidding period has come to a close? Your database will display a message letting visitors know that the auction has ended. PHP cron jobs allow you to automatically restart the process in the event that no bids were made.
PHP scripts handle the maintenance of these functions. They also allow you to execute cron jobs that run on preferred intervals. The user looking to operate several tasks on different schedules has the luxury of creating multiple cron jobs to manage them.
SETTING UP A CRON JOB
- First login into your cPanel
- click the cron jobs icon located towards the bottom of the main page
- Choose the time you want the PHP script to run. For instance, selecting 30 means that your script will run for thirty minutes on whatever day and time you choose.
- Type in the command to run on the cPanel to load your scripts. The command should resemble something like this: /usr/local/bin/php -f /home/myusername/scripts/ascript.php.
Take note that the first part of the command is your path to PHP. The next part is the actual path to your file. If this command does not work you should certainly inquire with your web hosting server to find what does.
PHP has many more functions as it relates to your cPanel. Here is list of programs that are written in PHP scripts to liven your website.
- Create Custom Mailboxes Using cPanel - This multi named software was designed for email utilities. It helps the user create dazzling automated email forms and creates eye catching mailboxes.
- Cpanelmail - PHP brings out the best in this reliable tool. It allows the user to create an email account with ease.
- Super Web-Mail - This script allows you to implement your domain into an email account. It also permits others to have their own accounts. The password protected area allows you to maintain control while setting up contact info for the staff.
We previously learned that one of the many benefits of cPanel was its email features. We now know that PHP scripts are a large part behind what makes the magic happen.
Related tutorials and articles
Eco-Friendly Web Hosting - Save the Earth!
Powered by 100% Green Energy Web Hosting from HostPapa.com
Good Avocado - Professional Multiple Domain and Reseller Hosting
Leave a Reply















