While installing Apache, first make sure that PHP gets the shared modules while it's compiling and installing. To compile and install PHP, we would follow nearly the same set of commands but a different configuration string, as follows:
While configuring PHP, we only pass the path for
the apxs build from Apache as '--with-apxs=/usrlsbin/ tar -jxf php-S.2.S.tar.bz2 cd php-S. 2. S I configure \ --with-apxs=/usr I sbinl apxs \ --wi th-config-file¬path=letc.

This software is subject to the PHP License, available in this distribution In the file LICENSE. By continuing this installation process, you are bound by the terms of this license agreement. apxs' and set the path for php. ini. Needless to say, on successful compilation, you should see a PHP banner thanking you for choosing PHP. To compile and install PHP, perform the make && make install. For PHP and Apache to talk to each other, we would edit the lete! httlpdJcm?j/httpd.conj"flle and append the following line at the end of the flle:

Name:  Installing PHP.jpg
Views: 38
Size:  15.8 KB

Most of the installation process is complete by now. To test the PHP and Apache installaLion, create and edit the file test.php to add the following:
... and place it in the IhttpdJhtdocs! directory. Now, fire up Apache with the following command:

Open your Web browser and navigate to http:// localhost/test.php. You should see the complete PHP information-that is, what modules are enabled, what path and environment variables it is using, etc. You do not need to compile and install SQLite. Simply unzip the package and execute it to create an example database named !Jy, as follows: