Chapter 2: What Is PHP? |
|
The dirty little secret about PHP | |
PHP scripts can be much faster than Perl/CGI scripts. And they can be much slower, too! Here's the short answer to why: There's a "module" called mod_php that gives PHP a big speed boost. (There's a similar one for Perl.) You need this module! Check to be sure the host you plan to use has installed it. If not, your scripts won't run as fast as they could. If the sales page for the host doesn't mention it, you'll need to contact Technical Support at the host and find out whether they installed mod_php. Another way to find out is to run the little script mentioned in this book that just calls the phpinfo() function. It will give you a display of all the information about that host's installation of PHP. Look in the "apache" section (about 1/4 of the way down the page). At the end of this section, look in the "Loaded Modules" item and see if mod_php is on the list. There's a lot of other useful stuff listed there as well. Certain things in the configuration may or may not cause problems with certain scripts. If you run into problems that you can't resolve, it may be a server issue. Before you bug the techies at the host, make sure that you've done everything you can to resolve the problem. |
|
You can get answers to a lot of weird problems on the PHP forums. Be prepared to provide these nice people with as much information as possible. Also, if you're a "newbie" at programming or debugging, make sure you emphasize that fact in your post. Otherwise, they may assume you know a lot more than you really do - and their answers might not make sense to you. |
What version(s) do I need? |
|
For best results in all situations, I suggest using the most recent version you can get. Currently, version 4.3 or higher is available on most systems. This version will support practically anything you can ask a PHP script to do. PHP 5.0 is already available for beta testing. The most recent version can always be found at the PHP home page: www.php.net
While it's possible to run PHP scripts on some - not all - Windows NT hosts,
I don't recommend it. You really should be on a host using Linux or at least some version of
Unix. Also, you want the host to be using the Apache web server software - preferably version
1.3 or higher. |
|
|
A few tips about hosting |
|
Please, please, please - don't just go with the cheapest host you can find!
It can end up costing you time, money and success in the long run. You need to know certain things
about a host before you put your site there. Here's a checklist:
Here's a virtual host with everything you need => http://9181401630.thirdsphereplus.com/ |
| Previous Page Table of Contents Next Page |
Copyright © 2004 Steve Humphrey |