Installing and Configuring Apache, PHP and MySQL
Now that everything was installed, it was time to see if PHP actually worked. For that I created the following simple page:
<HTML><\n> <HEAD><TITLE>PHP Test</TITLE></HEAD> <BODY> <?phpinfo() ?> </BODY> </HTML>
Notice that PHP commands are contained by <? and ?> tags. I saved the file as test.php in Apache's htdocs directory and aimed my browser at http://localhost/test.php A page appeared with the PHP logo and quite a bit of information about my PHP configuration, so I knew that PHP was working. If you see <?phpinfo() ?> and nothing else, make sure that the line in httpd.conf that adds the PHP type to Apache is uncommented and that Apache has been restarted. If your problems persist, both the Apache and PHP web sites contain information on using PHP and Apache together.
Once I knew that Apache and PHP were working, I installed the PHP calendar program that I had chosen by simply copying its PHP files into a directory under Apache's htdocs directory. I now had a web server, a very powerful HTML embedded scripting language and a calendar system. In addition to costing nothing, I also have the source code for all the software so I can see how they work.
- Practical Tiny Core in the Fire Service
- Encrypt Your Dog (Mutt and GPG)
- New Products
- New Products
- DevOps for Dummies
- Open Axiom
- Tech Tip: Really Simple HTTP Server with Python
- Cooking with Linux - Serious Cool, Sysadmin Style!
- Give new life to old phones and tablets with these tips!
- Is the Private Cloud a Real Cloud?
Free DevOps eBooks, Videos, and more!
Regardless of where you are in your DevOps process, Linux Journal can help!
We offer here the DEFINITIVE DevOps for Dummies, a mobile Application Development Primer, and advice & help from the expert sources like:
- Linux Journal