Impossible tri-bar

Digital Phenomena - Your first stop for internet consultancy 
PHP4 Installation Overview

Page 5 — Test Your Installation (Non-Windows)

Once you get through the build process, there's one good way to test your install (besides creating a boring little "Hello World" script): Use the phpinfo() function. Open a text editor and type this:

<? phpinfo() ?>

And that's it! Save this file as phpinfo.php, and put it in Apache's document root (htdocs), then fire up your Web browser and go to "http://localhost/phpinfo.php," where you should see a long page of variables and their values. The phpinfo() function automatically produces this page, which shows you what sorts of things are installed, your environment, your settings and so on.

A lot of configuration options can be controlled by modifying the php.ini file, usually located in /usr/local/lib (the phpinfo() results will tell you the path). Take a gander at it, and tweak anything you feel needs tweaking. You may not ever have to touch a thing in this file, but you should know where it is and what it does.

The whole process is pretty pain-free: I've never had any installation or configuration issues unless I was installing some exotic combination of things, and even then, the errors were always mine (bad typing, forgetting to run ldconfig, that sort of thing). Everybody's machine is different, however, especially in the Linux/Unix world, with slightly different flavors of operating systems and compilers. If your installation blows up in your face, check the PHP Manual or mailing list archives. Chances are, someone's been through the same problem and will be happy to help you out. If you do send a message to php-install, be sure to send as much information as you can; "It doesn't work" will not garner many responses, but something like "I'm attempting to install php-4.0.3 on SuSE 6.4 and it keeps complaining that can't be found" will fetch many.

The last section of this tutorial for non-Windows users will show you the wonderful world of DSOs, in action. You'll learn the easy way to modify your PHP installation, simply by building a new module.

next page»

|Home|About Us|Services|Search|
W3C validatedW3C validated CSSCompatible with all browsers