What Is PHP?

What Is PHP?

What Is PHP?

What is PHP? PHP or Hypertext Preprocessor is a popular and widely used server-side scripting language. It was originally made to create dynamic webpages, but because of its capabilities, it has found its way to be one of the best server-side scripting on the internet.

php-script2This language is capable of running scripts for a server, and it can carry out specific server tasks. Few of the common tasks it can perform are database manipulation and content management. The scripts will be saved on the server just like the web pages, and they will only be triggered when users request it to be executed.

In contrast to JavaScript, which is a client side scripting language, PHP codes are usually saved separately from a webpage, and its saved code will have an extension of ‘.php’. If the developer wants to integrate the code inside an HTML file or web page, he must make sure that he enclosed the code in PHP’s special start and end processing instructions, which are “<?php>” and “?>”. In addition, between the difference of PHP and JavaScript, PHP can generate contents of its own, and because of that, a single PHP file can produce thousands of pages, and the developer would not need to create files for those pages.

On the other hand, new users can instantly appreciate PHP because of its simplicity. However, they must familiarize themselves first on basic programming and JavaScript for them not to have difficulties on learning the language. Alternatively, experienced developers enjoy the numerous possibilities that can be achieved with PHP.

Many people are using this software because it is free. Moreover, this scripting can run on every virtually known operating system and platform, and it is compatible to many relational database management systems like MySQL.

In addition, its major competitors are Microsoft’s Active Server Pages (ASP), mod_perl, and Sun Microsystem’s JavaServer Pages. As of now, it is being used by numerous websites on the internet. A few renowned websites that use PHP are Facebook, Digg, and Wikipedia. On the other hand, many popular content management systems (CMS) today are written using PHP. A few of those CMS are WordPress, Joomla, MediaWiki and Drupal.

Alongside with PHP’s usefulness as a great server-side scripting language are its vulnerabilities. It has been reported that almost 30% of vulnerabilities recorded on the National Vulnerability Database are related to PHP. However, most of the vulnerabilities can be eliminated if developers follow best practice programming rules of PHP. In addition to that, programmers can apply advanced protection patches to enhance PHP’s security. On another note, a few of the vulnerabilities of PHP are denial-of-service (DoS), remote file inclusion, remote file execution, directory traversal, header injection, SQL injection, and cross-site scripting (XSS).

If you want to add more dynamics, interactivity, and functionality to your website, it is best for you to learn and implement PHP. It is easy to learn, as long that you already mastered the basics of web development and program writing. In addition, before you implement PHP, it is best for you to research on how to overcome PHP’s vulnerabilities.

{ 0 comments }

Steps to Transfer Website to New Web Host with No Downtime

Steps to Transfer Website to New Web Host with No Downtime

Steps to Transfer Website to New Web Host with No Downtime

You can follow these easy-to-follow steps to transfer website to new web host with no downtime. Below is the actual process moving one of your client accounts:

1.Plan your move by doing some research when choosing a new hosting service that will meet your requirements for your website. If you have a site coded in ASP, PHP or another programming language, you need to opt for a host, plan and configuration that support the language. You also have to give special attention to the available language version and software to avoid any adverse consequences. You would also have to create back up of all your files from your existing hosting server to your external / hard drive or DVD.

transfer website2.Create a hosting account at your chosen hosting service. For you to be able to minimize any downtime, you would have to use a temporary internet protocol (IP) address to view your website that functions before moving your domain name. If your hosting plan provides you with a unique IP address, then you can also view your site by simply inputting the uniform resource locator (URL) in your browser. Additionally, use temporary file transfer protocol (FTP) address to upload files in preparation for the transfer. Then, access the client’s control panel (cPanel) when you accessed a domain.

Ensure that you always have another or alternate URL by which to access your control panel. Preview also your temporary URL to verify that all your files were uploaded and your site is functioning properly. This is one of the most important steps to transfer website to new web host with no downtime.

3.Transfer all your website’s files to your chosen webhosting server. If you have any databases, you have to export all your data to it. To restore you web files and databases, you also need to create a database in your new service hosting account and import all data. By this time, you can also set up email accounts, save the emails currently in your database and forward the emails, including yours, to yourself.

4.Delete all of your files to cancel your old account from the former hosting provider. Or, you can opt to go directly to the hosting service provider you registered your domain name with and direct the previous hosting service to your new server. It may take anywhere from 24 to 48 hours, or at best 72 hours, for domain propagation to occur so that all requests will point to your updated domain location. Return to your domain registrar and read the documentation for instructions on how you can do this. There are many registrars from which you can choose such as GoDaddy, Network Solutions, etc.

5.You have to test-run your site in its brand-new home. You would need to setup all the additional features and let it run for a few days.

If you can do these things in this order, you will not experience any downtimes. The domain name server (DNS) will point to the old server and then directly to the new one. These steps to transfer website to new web host with no downtime is really not daunting as it initially seems.

{ 0 comments }

Introduction to PHP MySQL Tutorial

Introduction to PHP MySQL Tutorial

Introduction to PHP MySQL Tutorial

 

For this PhP MySQL Tutorial, you should always have at least a basic knowledge on how to use these particular server-side scripting language (SSSL), which is actually one of the easiest to learn yet is also the most powerful. The primary reason people would like to learn scripting languages is for displaying simple lists (such as updating forums, banner rotation, feedback forms, etc. by changing one script only) to running a whole website (for example, updating website design) from a database. You need only three (3) things to run PHP scripts, which access MySQL databases, as follows:

php scriptsFirst, you would need a computer server, which is either your own computer or one from a webhost provider. Any web server program should work with this general-purpose scripting language; however, one of the best free software to use nowadays is Apache.

All administrative database options can be done through means of “personal home page” scripts but it is strongly suggested that you install a copy of PHPMyAdmin on your hosting server. You would have excellent, free scripts through the use of an administrative interface for your relational database management system (RDBMS) or simply referred to as MySQL databases. You can then add, edit, backup, view, remove and troubleshoot your databases.
Second, PHP also needs to be installed on the host server. If it is not yet installed, you can install it yourself or ask your webhost to do it for you. Nonetheless, it can simply be downloaded for free from PHP.net. If you cannot install or if your web host does not allow for this particular type of SSSL/RDBMS, you may opt to use another webhost. There are also many free web hosts with this preinstalled scripting language that support banners and with extra features.

There is a simple test for both PHP/MySQL. You can open a text editor, type in “<? phpinfo(); ?>” and save it as phpinfo.php. Upload it to your own server space and then go to your browser. If it is installed, you would be able to see a detailed page containing its installation and then, scroll down until you find a section of MySQL.
Third, you should have MySQL, which is the actual database program. Still, you can opt to use other types of database such as Oracle, SQL, etc.  However, the focus on this brief introduction to PhP MySQL tutorial is, as explicitly stated, MySQL where commands work also with SQL databases. Using specific SSSL/RDBMS together, you can create a web-based contact management program. This will allow you to store names with their e-mails, phone numbers, etc.

You can even search the database and update records.  There will also be an option for you to send an email out to all of your contact lists in the database. As a reminder, please do not use this system for spamming or send unsolicited an email.

You can also access or download a free PhP builder with the tutorial of your choice and then learn further about database setup, information insertion, record singling and error trapping, updating and deleting, finishing scripts, displaying info and variables, if statements, loops and arrays, emails and forms and view full script codes.
If you become more familiar with this scripting language, you can open up new possibilities and many benefits for your website. Although you would be able to download premade scripts at various Internet sites, they will often include advertising from the creator, which will not perform according to your preferences. With proper PhP self-training, you can easily create or edit scripts to suit your needs. Other interactive features using these particular scripts include advanced features such as content management, advertising managers, portal system and a lot more. So, start your actual PhP MySQL tutorial now!

{ 0 comments }

Free Hosting Vs Paid Hosting

Free Hosting Vs Paid Hosting

Free Hosting Vs Paid Hosting

It’s a matter of common sense that paid services have no comparison with free services. Web hosting is no exception, but we will elaborate the difference between two in a more logical manner. Free hosting is not a total rejection. It is good for immature, non-professional and websites with less bandwidth requirements. When it comes to business or high profile hosting, free hosting losses its scope. Such entities require a truly top quality, reliable and supportive system of hosting without any pitfalls. There are certain technical aspects which segregates these both categories of hosting in much more finer way. We are going those aspects in detail to give good account of the two practices.

Space Makes Pacefree hosting vs paid hosting

The first component of any hosting arrangement is the allocation of space. It largely depends on the nature of business and turnover of visitors. No compromise on basic space requirement is recommended for bringing value and stimulating sales. Most precise evaluation and generous allocation of space is the only way-out to add real race to your website. This is only possible with paid hosting. You cannot have many choices with free hosting. Those follow already formulated packages which cannot be optimized and customized. Paid hosting gives freedom and fosters the pace of business. Space is a vital difference between free web site hosting and paid hosting.

Data Transfer

Data transfer speed is the second most critical and challenging part in web hosting. It’s a matter of serious consideration for the people who seek paid web site hoisting. No one likes to visit the site that gives slow response and consumes a lot of time in processing requests. Instant connectivity is the need of hour. It’s the bandwidth offered by web host that defines the speed of data transmission. Free hosting companies do not offer much freedom in assigning bandwidth; they try to keep it to minimum level for a site to be operative. A good quality website requires, minimum of 5 to 10 GB bandwidth which is only possible in the case of paid web hosting.

Technical Support

Like all other forms of support, technical support plays critical role in making any web site hosting company successful. Web hosting companies hire dedicated and dynamic support team to handle the challenging and round the clock needs of their customers. It is a matter of high-cost and it can only be expected from paid web hosting. Free web site hosting seldom offer any support and they likewise those who avail such hosting have minimal need of back up support as well.

Email Services

Web hosting is a very long-term venture and visionary people foresee their future needs at the time of choosing any web host. Paid hosting companies allow maximum e mail accounts to their customers for the smooth operations of affair. Free web hosting has to follow the set patterns and they offer few e mail accounts by keeping in view the package offered.

Credibility Counts

Free web hosting companies have no concern for their credibility as they are offering complimentary services to anyone. Free web hosting is not bound to obey any moral or social ethics as they are not earning any revenue from their customers directly. On the other hand, Paid web hosting is very much concerned about their reputation and they try their level best to offer unforgettable experience to their clients and visitors.

{ 0 comments }

Bash: Create Simple Server System Information

Bash: Create Simple Server System Information

A few days ago, at the time when i’m free and i have completed all of my jobs, i was walking around a few of web hosting provider’s websites to get reading. I found that most of them have the uptime statuses of their servers, and it is kind of exclaimed if we have something like that too, we can display our box status and we will always know our box system information without typing command one by one in ssh. So the idea is creating a simple bash script that will show some information like uptime, memory usage, disk usage, port status, etc., and export the statuses to txt or html file so we can we can see our box statuses with browser. It is good when we are not in home so we can check the statuses from phone, laptop, or computer somewhere. Okay, let’s get it on!

First we will check the box uptime status by using uptime command, and you will get the following result:

05:35:16 up 21:40,  1 user,  load average: 0.00, 0.00, 0.00

The informations shown above are server time, uptime, current user, and load average, but we only need uptime to be displayed right? So we’re going cut off another statuses and grab uptime only.

uptime | awk {'print $3'}

and we got:

21:40,

You can use that for displaying uptime status which means 21 hours and 40 minutes, but it’s not so good because there’s a comma character in the end of status right? If you wanna throw that comma character then we should display 5 characters before comma. (more…)

{ 0 comments }