SYMPTOMS
Apache can be started, but I see the warnings in the error_log, for example:
"PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/pgsql.so' - /usr/lib/php/modules/pgsql.so: cannot open shared object file: No such file or directory in Unknown on line 0"
Module name can differ from the one listed in this error (pgsql.so).
CAUSE
This error means that PHP cannot open some module which is listed in it's configuration files with 'extension' directive. The error can be related to any PHP module, such as:dom.so, gd.so, imap.so, ldap.so, mbstring.so, mysql.so, mysql.so, odbc.so, pgsql.so, sitebuilder.so, xsl.so, zip.so, etc...
RESOLUTION
If you deleted the problem module or do not need it to be loaded, you can avoid this message by commenting this module loading string ( in this example it is "extension=pgsql.so" ) in /etc/php.ini and /etc/php.d/* files.
If you wish to use this module, it should be placed into PHP extension directory that is configured with extension_dir directive in /etc/php.ini and listed in the error you get. Usually it is done automatically when you install the appropriate module package into the system, in our example pgsql.so module corresponds to php-pgsql package (for imap.so, it will be php-imap, for mysql.so - php-mysql, etc...). So, if the package that provides this module is not installed in the system, you should install it using the OS package manager, for example for RPM:
# rpm -Uvh php-pgsql-x.x.x-xx.x.rpm