Only required lines in above snippet are --with-apxs2 and prefix lines.
--with-mysql is needed to add MySQL (which is the default choice for DBMS in almost all applications).
Note : You need to specify the directory if it's in a unusual location (e.g., --with-mysql=/usr/local)
--with-config-file moves the php.ini file location
--disable-cgi disables the CGI version (Since it is not necessary while using Apache modules).
--with-zlib allows use of gzip-type compression,
--with-gettext is for internationalization
For more information about configure, visit PHP website.
4. Use the created Makefile to make PHP
5. Once make executed successfully, install PHP using
If it fails, try again as root.
6. Check whether libphp5 exists and is updated. If not, copy it from libs to apache module directory. Type