Tag Archive 'php'

Linux Hosting: A Fine Point Overview

In your mission to find a website provider, you will notice that many companies offer what is know as Linux-based hosting. This article will detail the finer points of this option and how it can be used to create and maintain dynamic web sites. We will also shed a bit of light on the Linux operating system in general and why it is the preferred choice by many users.

History

Linux is essentially a variation of the Unix operating system. It was created in 1991 at Finland’s University of Helsinki by a student named Linus Torvalds. Torvalds came to develop Linux while working on a non-commercial replacement version for Minux, a smaller Unix-like system. Linux was originally intended for academic use but evolved into something much more useful.

Since it was developed under the GNU Project’s General Public License, the source code of Linux is freely available. While the goal of the GNU Project was to develop and distribute free Unix compatible software, the Linux operating system itself is not free, only the source code for the kernel and most of it’s software. Linux developers and third-party vendors can charge a fee for it as long as the source code is freely available.

Web Hosting

Just as with any provider, before choosing a Linux host, you should first determine the needs of your website. Many ISPs (Internet Service Providers) will offer a Linux-based hosting plan for a very reasonable price. This option presents you with a wide range of software applications that can be used to enhance the presentation and functionality of your site. The most common configuration of this type of hosting is known as a LAMP platform, consisting of a Linux operating system, an Apache web server, a MySQL database and PHP, Perl or Python scripts.

The LAMP configuration offers a number of components that can be used to support and run a website or a server. When put into action, it defines server infrastructures and a paradigm for developing software. LAMP is so widely used because the Linux system itself is so affordable.

The Apache server is what provides access to websites on the internet and is available for both Linux and Unix systems. It is currently the most widely used server today. MySQL is the database management system that adds ease to building a website. It actually functions as a server and is a multithreaded, multi-user system that grants users with access to their databases. MySQL is the most popular database management system and is said to have more than 10 million installations. The programming languages used in LAMP are typically either PHP, Perl or Python. These scripts are used to create object-orientated web pages and can also be used on Windows-based platforms as well.

The Linux system itself is capable of many things such as networking, software development and functioning as an end-user platform. It works with almost any kind of hardware from the basic AMD and Intel products to more obscure names such as Digital Alpha, PowerPC and Silicon Graphics. Due to its low cost and high-level of functionality, Linux has become one of the most popular operating systems and web hosting platforms outside of Windows.


PHP hosting

PHP is Personal Home Pages. Web pages are simple documents where one can do almost everything in HTML. The PHP hosting is basically a scripting language. It is used for creating web pages. The PHP syntax is similar to that of the Perl. This language is very simple to understand and apply. It supports the most common databases like Oracle, MySQL, and Sybase. Generally it is incorporated to external libraries in order to create PDF programs and support the large group of developers. There are some criteria’s that could help one to choose for the best PHP hosting. Mainly price, bandwidth, and size are the criteria that would be helpful. The PHP group has released the main implementation under the PHP license. It serves one to define a de facto standard for the PHP. No formal specification is availed. On November 9 2007, the latest version of PHP 5.2.5 was released.

PHP and necessary things

If you are looking forward to invest small amount, then probably PHP hosting is the right one for you. PHP hosting is inexpensive, yet a useful way of hosting. If one has to write a blog, then it requires lesser bandwidth. Thus, PHP hosting could be useful. It is not necessary for PHP to be present while installing PHP hosting. There are innumerable PHP hosting companies that offer PHP in a safer mode. In order to get the best of performance on apache and Linux servers, one needs to install it as GCI for better options. PHP is used widely for the web development. PHP generally runs on web server and various web pages could be created suing the PHP code. PHP hosting is widely used as it being cheap and easy to use.

Problems with PHP

There are very few things that one needs to explain when it comes to PHP hosting. However, there are some problems that one comes across while installing PHP software. One can use search engine optimization for rewriting the various URLs using the forc Type in htdocs.

Choose best PHP host

Choosing the best suitable PHP host is an important thing, whether it is for your company or it is for a blog. The downtime and lack of configuration damages the performance and becomes an obstacle in success. Various web hosting companies offer various services online, suitable for both websites as well as blogs. If you choose a wrong host, then maybe you would find yourself in trouble.


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.


phpMyAdmin - cPanel Tutorial Ch.7

cPanel comes readily available on most web hosting servers you will run across these days.  One of its many functions is allowing users to manage their databases; this includes creating, modifying and even deleting tables.  There are a few things you will not be able to do such as retrieving selective backups, having the ability to backup only certain tables in a database or execute queries.  

This is where PHPMyAdmin comes in.  This user friendly application was designed to make the management of your website easy, in this case your web hosting server that runs with a cPanel.  PHPMyAdmin simplifies the process of maintaining your databases, specifically those scripted on MySQL.  

The PHPMyAdmin application is essentially composed of PHP scripts, the language of the web. 
The control it gives you over a database is remarkable.  PHPMyAdmin currently allows you to:

- create and drop a database
- create, copy and alter tables 
- delete, modify and create fields
- execute any database statement with the inclusion of batch queries
- load text into your tables
- import and export data
- administrate a primary database

ACCESSING PHPMyAdmin IN CPANEL

PHPMyAdmin can be accessed through the “Databases” panel of your website.  This will typically be labeled “MySQL”.  You should notice a link for PHPMyAdmin near the bottom of the page.  After clicking this you will now be able to maintain your databases.  Let’s go further into the process and detail how PHPMyAdmin will manage a database you plan to create.

- Create a MySQL user ID and password for whom ever will access to the database
- Click “Add User”
- Assign privileges to the user; they can alter, create, create temporary tables, delete, drop, select, insert, update, reference, index or lock tables.  In this instance we will check the “all” box.  
- Click “Add User To DB”
- Download the zipped config.inc.php file and extract the main component
- Open this in your text editor screen and modify the lines with your, IP address or web host and the username you created above
- Save the file and close the screen
- Go back and login in your cPanel
- Create a directory such as “phpmyadminstaff_html”
- Upload all your content into the directory you created

From there installation is complete and PHPMyAdmin can be used to effectively manage your database.  Be sure to add password protection the directory for security measures.

MORE ON PHPMYADMIN

The PHPMyAdmin application is widely used because of its actual interaction with the database.  This program is currently available in over fifty languages.  Since PHPMyAdmin is mainly configured for MySQL there are other versions that rival its function with cPanel.  PHPPGAdmin works similar to maintain databases of PostgreSQL.  PHPMSAdmin is designed to manage Microsoft SQL Servers.  While it has many of the same capabilities it includes no actual codes from the PHPMyAdmin application.  The closest tool in resemblance would be PHPMinAdmin.  This includes all the most crucial features of PHPMyAdmin but is composed of only one PHP file.

PHPMyAdmin typically comes free with most web hosting servers.


Where PHP Security Issues Begin

The PHP scripting language can operate as a CGI application or a compatible server-side module. In both instances, PHP is very capable of accessing almost every area of the web hosting server; this includes system files, all interfaces of the network and much more. In order to halt the savage intent of an internet hacker, a web developer must stay aware of any and everything that could possibly go wrong during the program design. Though this is task not to be envied, it is one a quality web host needs to endure in order to offer a reliable service. 

Realizing the weakness of a server’s components goes a long way in providing solid security. This applies to every attractive feature a host offers such as domain names down to the web language.

Many security issues in PHP and many web applications stem from inaccurate input from users whether intentional or by accident. Scripts like PHP give commands to a web page in several ways. If this information is entered incorrectly or with deception in mind, there is a great chance that the script will behave in negative manner and cause damage to the server. 

The worst part about PHP is its open-source nature. This script is used globally, often modified by developers then passed along to another individual. With this many sources handling the script, there is no absolute way to ensure that the variable of PHP contain legitimate data that will not corrupt a system. A web host needs to accept the realization that many important variables cannot be trusted.

The PHP language has been known to carry a number of security deficiencies through many stages of its development. Versions of PHP3 and PHP4 were vulnerable because of frequent attacks in command strings. This typically occurred in a user’s login screen where their information was a prime target for hackers with remote control access to PHP servers running that particular code. 

Uploading your files can also pose a security threat when PHP is involved. This is because the language may have the same file name as the input tag submitted in a web-based form. In this instance, the PHP script creates the file in a temporary directory and then stores data from the upload there. A problem arises when the file is checked for validation. An experienced web hacker can create their own upload form by submitting a totally different file. They can then process the user’s file which on many occasions will contain sensitive data. Your PHP scripts should have the ability to decipher whether or not the file name for the upload checks out as a valid path to the temporary file. 

Early we mentioned that a quality web host should operate on servers with the most updated PHP scripts; this section explains why.


« Prev - Next »