Installing and Configuring Apache, PHP and MySQL

Help on getting these three powerhouses playing well together.
Testing PHP

Now that everything was installed, it was time to see if PHP actually worked. For that I created the following simple page:

<?phpinfo() ?>

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.

Ralph Krause runs a one-man computer and web consulting service and lives in Michigan. He has been using Linux for a couple of years now and plans never to stop.



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Thanks for your help

Anonymous's picture


Actually your article doesnt help me out much am stuck with the configuration of my apache. I want to start it on port 2083 but by default its on port80 which is administrator port. YOu can help me to change the port for the same.

my php is unable to process the mysql

Anonymous's picture

I have configured my php, mysql and apache and it works fine for the php scripts ... But when i included scripts for mysql processing in it ... It dint work .... I checked for the phpinfo and it showed --with-mysql ... Can u please help me .... when ever i access codes with mysql in it ... The server does'nt process it . Is there any other configuration changes i need to make in any of them .. I am using the fedora core 2 system ...

The sample php code for the mysql that i have written is :
Name: ".result_row['name'] . " ";

For the database mydb and the UserSessions,which were created earlier

Apache, Php & Mysql

Webmonster's picture

I need help on how to configure apaches, Php and mysql on Win 98.

Your article does not help me onthat.

Pls do justice to this. Thanks


Hey, you need to search a goo

krienaz's picture

Hey, you need to search a google for easyphp software. It's everyting in one install as if it had been created for a blondie. :) Regards!