cpanel phpMyAdmin - Failed to initialize storage module: sqlite



Error:

When try to access phpMyAdmin from cPanel it is showing the following error.

Fatal error: session_start() [<a href='function.session-start'>function.session-start</a>]: Failed to initialize storage module: sqlite (path: /var/cpanel/userhomes/cpanelphpmyadmin/sessions/phpsess.sdb) in /usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries/session.inc.php on line 92


Fix:

Login as root user via ssh,

open the file, /usr/local/cpanel/3rdparty/etc/phpmyadmin/php.ini in your favourate editor and search for the following entries in it.

session.save_handler = sqlite
session.save_path =/var/cpanel/userhomes/cpanelphpmyadmin/sessions/phpsess.sdb

Change the above two lines to as follows.

session.save_handler = files
session.save_path = /var/cpanel/userhomes/cpanelphpmyadmin/sessions

If the direcroty exists, remove all session files from there.

# rm -f /var/cpanel/userhomes/cpanelphpmyadmin/sessions/sess*


If the directory, /var/cpanel/userhomes/cpanelphpmyadmin/sessions does not exist, create it.

# mkdir -p /var/cpanel/userhomes/cpanelphpmyadmin/sessions

change the permission of /var/cpanel/userhomes/cpanelphpmyadmin/sessions as follows.

# chmod 1777 /var/cpanel/userhomes/cpanelphpmyadmin/sessions

Once you have done the above changes, restart apache.

# /etc/init.d/httpd restart


Try loading phpMyAdmin again...

Disable SSL redirect in Cpanel/Webmail Logins




Disable SSL redirect in Cpanel/Webmail Logins



You can disable the SSL redirection in cpanel logins by changing the folllowing configurations in /var/cpanel/cpanel.config.

requiressl=1
alwaysredirecttossl=1

Change the "1" to a "0" for the above two settings, and save the changes.


To make the above changes in effect, using the following command.

# /usr/local/cpanel/whostmgr/bin/whostmgr2 --updatetweaksettings


The above settings in /var/cpanel/cpanel.config correspond to the following settings in the WebHost Manager in Main >> Server Configuration >> Tweak Settings:

Always redirect to SSL off
Require SSL off

Change Mail sending IP - Postfix


Change Mail sending IP



Open the postfix configuration file, /etc/postfix/main.cf

Find if there is an entry as follows, in the postfix configuration file.

smtp_bind_address = xxx.xxx.xxx.xxx

If there isn't any entry of smtp_bind_address, you have to create it.

Change the value of smtp_bind_address = xxx.xxx.xxx.xxx to the desired IP.

Once you have made changes in the configuration file, you have to restart the postfix service.

[root@server ~]# /etc/init.d/postfix restart

You can check whether the new IP is loaded using the following command.

[root@server ~]# postconf smtp_bind_address
smtp_bind_address = yyy.yyy.yyy.yyy

Plesk (Windows) - Change Auto-reply Limit of a Mail Account





Change Auto-reply Limit of a Mail Account - Plesk (Windows)



Issue:

If I enable auto-reply in my Parallels Plesk Panel (PP) email settings and send a test email to that account, I get an auto-response. But, if send another test email, I do not get any autoresponse, i.e., it works only once.

There is a parameter in the "psa" database -- mail_resp.ans_freq -- that defines the daily auto-reply limit for each mailbox, and it is set to "1" by default.


Solution:


C:\>cd %plesk_bin%

To check the autoreply limit of all mail accounts in the server.

C:\Program Files (x86)\Parallels\Plesk\admin\bin>dbclient --direct-sql --sql="select concat(m.mail_name , '@' , d.name) as mailname, mn_id, r.ans_freq from mail m, domains d , mail_resp r where m.dom_id = d.id and r.mn_id = m.id;"


To set the auto reply value=10 for mail account, where mn_id=xx.

C:\Program Files (x86)\Parallels\Plesk\admin\bin>dbclient --direct-sql --sql="update mail_resp set ans_freq=10 where mn_id=xx;"

To set the auroreply value=10 for all mail accounts in the server.

C:\Program Files (x86)\Parallels\Plesk\admin\bin>dbclient --direct-sql --sql="update mail_resp set ans_freq=10;"


Note:

If you want to set the limit to zero, give ans_freq=0
If you want to set the limit to unlimited, give ans_freq=NULL


Compile and Install SuPHP + Apache2.2.x + PHP-5.2.x or PHP-5.3.x


Compile and Install SuPHP + Apache2.2.x + PHP-5.2.x or PHP-5.3.x



***It is needed php-cgi binary file to compile SuPHP. In the default source compilation, php-cgi binary file will not be generated in PHP-5.2.x and PHP-5.3.x. So first you have to compile PHP for php-cgi. You need to compile twice in this case.

***If you are compiling Apache2.2.x with PHP-5.4.x, there is no need to compile twice. You can remove the first compilation in the script given below.

***If you have any problem with the PHP installation, please refer the following url.
http://linuxadmintips4u.blogspot.in/2013/05/complile-and-install-php-from-source.html
---------------------------------------------------------------------------------------------------------------------------------
***If you have already compiled PHP + Apache, just do only configure part and make of First compilation. Do not enter make install. Then you can manually copy 'php-cgi' from 'sapi/cgi/' to bin directory of php's installation directory. Here in my case it is /usr/local/php/bin
You can find 'sapi/cgi/' directory in the extracted tar package. php-cgi binary will generate there once you have done configure and make.

[root@vps php-5.3.24]# cp sapi/cgi/php-cgi /usr/local/php/bin/
----------------------------------------------------------------------------------------------------------------------------------


Create a script, configure.sh in the extracted source directory of php, with the following contents in it.

[root@vps php-5.3.24]# cat configure.sh
#=================================================================


#!/bin/bash
#First compilation for 'php-cgi' binary.
#Please note, --with-apxs2=/usr/local/apache/bin/apxs is excluded in the first compilation.
#Please note, --disable-cli and --enable-cgi are only in the first compilation. It is excluded in the second compilation.

"./configure" \
"--prefix=/usr/local/php" \
"--with-config-file-path=/usr/local/apache/conf" \
"--disable-debug" \
"--disable-rpath" \
"--enable-inline-optimization" \
"--enable-sockets" \
"--enable-wddx" \
"--enable-calendar" \
"--enable-ftp" \
"--enable-mbstring=all" \
"--enable-dom" \
"--enable-mbregex" \
"--enable-bcmath" \
"--with-openssl" \
"--with-kerberos" \
"--with-mcrypt" \
"--with-curl" \
"--with-gd" \
"--with-zlib-dir=/usr/lib" \
"--with-jpeg-dir=/usr/lib" \
"--with-png-dir=/usr/lib" \
"--with-freetype-dir=/usr/lib" \
"--with-regex=system" \
"--with-gettext" \
"--with-bz2" \
"--with-iconv" \
"--with-layout=GNU" \
"--with-imap=/usr/local/src/imap-2007f" \
"--with-imap-ssl" \
"--enable-ftp" \
"--enable-calendar" \
"--with-curl" \
"--enable-soap" \
"--with-snmp" \
"--with-libdir=lib64" \
"--with-mysql=/usr/local/mysql" \
"--with-pdo-mysql" \
"--disable-cli" \
"--enable-cgi"

make && make install
#Firtst compilation ends here.

make clean

#Second compilation for 'php' cli binary.

"./configure" \
"--prefix=/usr/local/php" \
"--with-apxs2=/usr/local/apache/bin/apxs" \
"--with-config-file-path=/usr/local/apache/conf" \
"--disable-debug" \
"--disable-rpath" \
"--enable-inline-optimization" \
"--enable-sockets" \
"--enable-wddx" \
"--enable-calendar" \
"--enable-ftp" \
"--enable-mbstring=all" \
"--enable-dom" \
"--enable-mbregex" \
"--enable-bcmath" \
"--with-openssl" \
"--with-kerberos" \
"--with-mcrypt" \
"--with-curl" \
"--with-gd" \
"--with-zlib-dir=/usr/lib" \
"--with-jpeg-dir=/usr/lib" \
"--with-png-dir=/usr/lib" \
"--with-freetype-dir=/usr/lib" \
"--with-regex=system" \
"--with-gettext" \
"--with-bz2" \
"--with-iconv" \
"--with-layout=GNU" \
"--with-imap=/usr/local/src/imap-2007f" \
"--with-imap-ssl" \
"--enable-ftp" \
"--enable-calendar" \
"--with-curl" \
"--enable-soap" \
"--with-snmp" \
"--with-libdir=lib64" \
"--with-mysql=/usr/local/mysql" \
"--with-pdo-mysql"

make && make install
#Second compilation ends here.

#=================================================================



[root@vps php-5.3.24]# chmod +x configure.sh

[root@vps php-5.3.24]# sh configure.sh


Complile SuPHP


[root@vps ~]# cd /usr/local/src/
[root@vps src]# wget http://www.suphp.org/download/suphp-0.7.1.tar.gz
[root@vps src]# tar -xzf suphp-0.7.1.tar.gz

***The package, suphp-0.7.1.tar.gz cannot install with Apache2.4.x. You will get errors while using 'make'. You need to patch it before using it.
***There is no need to patch suphp-0.7.1 if you are compiling with Apache-2.2.x and Apache-2.0.x


[root@vps src]# wget -O fix1.diff https://sites.google.com/site/sudosuin/fix.diff
[root@vps src]# patch -Np1 -d suphp-0.7.1 < fix.diff
patching file configure.ac
patching file src/Makefile.am
patching file src/Makefile.in


[root@vps src]# cd suphp-0.7.1

-------------------------------------------------------------------------------------------------------------------------------------
Locate the location of 'php-cgi' binary file and the binary file location must be specifiled as --with-php=<php-cgi path>
[root@vps ~]# locate php-cgi
/usr/local/php/bin/php-cgi

Locate the location of 'apxs' binary file and the binary file location must be specifiled as --with-apxs=<apxs path>
[root@vps ~]# locate apxs
/usr/local/apache/bin/apxs

Locate the location of 'apr-1-config' binary file and the binary file location must be specifiled as --with-apr=<apr-1-config path>
[root@vps ~]# locate apr-1-config
/usr/local/apr/bin/apr-1-config

---------------------------------------------------------------------------------------------------------------------------------------


[root@vps suphp-0.7.1]# ./configure \
--with-logfile=/var/log/suphp.log \
--with-apxs=/usr/local/apache/bin/apxs \
--with-php=/usr/local/php/bin/php-cgi \
--with-apr=/usr/local/apr/bin/apr-1-config \
--with-setid-mode=paranoid \
--with-gnu-ld \
--disable-checkpath \
--with-apache-user=apache


[root@vps suphp-0.7.1]# make

If there is any error in 'make' try the following two steps also. You can find header files missing error in 'make'. In that case you have to do the header files copy steps as shown below.

Here i have installed apr in /usr/local/apr , apr-uil in /usr/local/apr-util and apache in /usr/local/apache. If you have installed these in any other locations, you have to modify the document root of apr, apr-util and apache in the following two copy commands.

[root@vps ~]# cp /usr/local/apr/include/apr-1/*.h /usr/local/apache/include/
[root@vps ~]# cp /usr/local/apr-util/include/apr-1/*.h /usr/local/apache/include/


[root@vps suphp-0.7.1]# make install

Once you have successfully compiled suphp, you have to do the following configurations.

----------------------------------------------------------------------------------------------
Create a file named /usr/local/apache/conf/suphp.conf with the following contents.

[root@vps ~]# cat /usr/local/apache/conf/suphp.conf
LoadModule suphp_module modules/mod_suphp.so
suPHP_Engine on
AddType application/x-httpd-php .php
suPHP_AddHandler application/x-httpd-php
suPHP_UserGroup apache apache

----------------------------------------------------------------------------------------------


Create a file named /etc/suphp.conf with the following contents.

[root@vps ~]# cat /etc/suphp.conf
[global]
;Path to logfile
logfile=/var/log/suphp.log

;Loglevel
loglevel=info

;User Apache is running as
webserver_user=apache

;Path all scripts have to be in
;docroot=/var/www:${HOME}/public_html:/home/httpd/html/

;Path to chroot() to before executing script
;chroot=/mychroot

; Security options
allow_file_group_writeable=false
allow_file_others_writeable=false
allow_directory_group_writeable=false
allow_directory_others_writeable=false

;Check wheter script is within DOCUMENT_ROOT
check_vhost_docroot=true

;Send minor error messages to browser
errors_to_browser=false

;PATH environment variable
env_path=/bin:/usr/bin:/usr/local/php/bin

;Umask to set, specify in octal notation
umask=0022

; Minimum UID
min_uid=0

; Minimum GID
min_gid=0

[handlers]
application/x-httpd-php="php:/usr/local/php/bin/php-cgi"
x-suphp-cgi="execute:!self"

---------------------------------------------------------------------------------------------------

Open Apache configuration file (httpd.conf) and remove the following entry

LoadModule php5_module        modules/libphp5.so

----------------------------------------------------------------------------------------------------
Add the following entry in httpd.conf

Include conf/suphp.conf

----------------------------------------------------------------------------------------------------

Change the following entriens as follows in httpd.conf

User apache
Group apache

------------------------------------------------------------------------------------------------------

Once you have done the following settings, restart apache service and check suphp module is loaded or not.

[root@vps ~]# httpd -M | grep suphp
 suphp_module (shared)

Create a phpinfo page in /usr/local/apache/htdocs and given permission 644 and owner, group as apache and apache. Check if the php page is loading or not. If it is not loading, check the error in /usr/local/apache/logs/error_log.





Notes:-

Here i have used following url to install PHP-5.2.x and PHP-5.3.x
http://linuxadmintips4u.blogspot.in/2013/05/complile-and-install-php-from-source.html

Here i have used the following url to install Apache-2.2.x
http://www.sudosu.in/2012/07/configure-apache.html


Compile and Install Apache-2.4.x + PHP-5.4.x + Suphp-0.7.1


Compile Apache-2.4.x + PHP-5.4.x + Suphp-0.7.1


Download and compile Apache-2.4.x as described in
http://linuxadmintips4u.blogspot.in/2012/07/configure-apache.html

Download and compile PHP-5.4.x as described in
http://linuxadmintips4u.blogspot.in/2013/05/complile-and-install-php-from-source.html

Once you compiled Apache-2.4.x with PHP-5.4.x, you can follow the steps shown below to compile suphp-0.7.1

Complile SuPHP



[root@vps ~]# cd /usr/local/src/
[root@vps src]# wget http://www.suphp.org/download/suphp-0.7.1.tar.gz
[root@vps src]# tar -xzf suphp-0.7.1.tar.gz

***The package, suphp-0.7.1.tar.gz cannot install with Apache2.4.x. You will get errors while using 'make'. You need to patch it before using it.
***There is no need to patch suphp-0.7.1 if you are compiling with Apache-2.2.x and Apache-2.0.x


[root@vps src]# wget -O fix1.diff https://sites.google.com/site/sudosuin/fix.diff
[root@vps src]# patch -Np1 -d suphp-0.7.1 < fix.diff
patching file configure.ac
patching file src/Makefile.am
patching file src/Makefile.in


[root@vps src]# cd suphp-0.7.1

-------------------------------------------------------------------------------------------------------------------------------------
Locate the location of 'php-cgi' binary file and the binary file location must be specifiled as --with-php=<php-cgi path>
[root@vps ~]# locate php-cgi
/usr/local/php/bin/php-cgi

Locate the location of 'apxs' binary file and the binary file location must be specifiled as --with-apxs=<apxs path>
[root@vps ~]# locate apxs
/usr/local/apache/bin/apxs

Locate the location of 'apr-1-config' binary file and the binary file location must be specifiled as --with-apr=<apr-1-config path>
[root@vps ~]# locate apr-1-config
/usr/local/apr/bin/apr-1-config

---------------------------------------------------------------------------------------------------------------------------------------


[root@vps suphp-0.7.1]# ./configure \
--with-logfile=/var/log/suphp.log \
--with-apxs=/usr/local/apache/bin/apxs \
--with-php=/usr/local/php/bin/php-cgi \
--with-apr=/usr/local/apr/bin/apr-1-config \
--with-setid-mode=paranoid \
--with-gnu-ld \
--disable-checkpath \
--with-apache-user=apache


[root@vps suphp-0.7.1]# make

If there is any error in 'make' try the following two steps also. You can find header files missing error in 'make'. In that case you have to do the header files copy steps as shown below.

Here i have installed apr in /usr/local/apr , apr-uil in /usr/local/apr-util and apache in /usr/local/apache. If you have installed these in any other locations, you have to modify the document root of apr, apr-util and apache in the following two copy commands.

[root@vps ~]# cp /usr/local/apr/include/apr-1/*.h /usr/local/apache/include/
[root@vps ~]# cp /usr/local/apr-util/include/apr-1/*.h /usr/local/apache/include/


[root@vps suphp-0.7.1]# make install

Once you have successfully compiled suphp, you have to do the following configurations.

----------------------------------------------------------------------------------------------
Create a file named /usr/local/apache/conf/suphp.conf with the following contents.

[root@vps ~]# cat /usr/local/apache/conf/suphp.conf
LoadModule suphp_module modules/mod_suphp.so
suPHP_Engine on
AddType application/x-httpd-php .php
suPHP_AddHandler application/x-httpd-php
suPHP_UserGroup apache apache

----------------------------------------------------------------------------------------------


Create a file named /etc/suphp.conf with the following contents.

[root@vps ~]# cat /etc/suphp.conf



[global]
;Path to logfile
logfile=/var/log/suphp.log

;Loglevel
loglevel=info

;User Apache is running as
webserver_user=apache

;Path all scripts have to be in
;docroot=/var/www:${HOME}/public_html:/home/httpd/html/

;Path to chroot() to before executing script
;chroot=/mychroot

; Security options
allow_file_group_writeable=false
allow_file_others_writeable=false
allow_directory_group_writeable=false
allow_directory_others_writeable=false

;Check wheter script is within DOCUMENT_ROOT
check_vhost_docroot=true

;Send minor error messages to browser
errors_to_browser=false

;PATH environment variable
env_path=/bin:/usr/bin:/usr/local/php/bin

;Umask to set, specify in octal notation
umask=0022

; Minimum UID
min_uid=0

; Minimum GID
min_gid=0

[handlers]
application/x-httpd-php="php:/usr/local/php/bin/php-cgi"
x-suphp-cgi="execute:!self"
---------------------------------------------------------------------------------------------------

Open Apache configuration file (httpd.conf) and remove the following entry

LoadModule php5_module        modules/libphp5.so

----------------------------------------------------------------------------------------------------
Add the following entry in httpd.conf

Include conf/suphp.conf

----------------------------------------------------------------------------------------------------

Change the following entriens as follows in httpd.conf

User apache
Group apache

------------------------------------------------------------------------------------------------------

Once you have done the following settings, restart apache service and check suphp module is loaded or not.

[root@vps ~]# httpd -M | grep suphp
 suphp_module (shared)

Create a phpinfo page in /usr/local/apache/htdocs and given permission 644 and owner, group as apache and apache. Check if the php page is loading or not. If it is not loading, check the error in /usr/local/apache/logs/error_log.


Complile and install PHP from source


Complile and install PHP from source



You can follow the steps shown below to install PHP5.2.x , PHP5.3.x and PHP5.4.x . You can download and install the desired PHP version. Please reade the Important notes before starting the installation.

Here i am using Centos 5.8 64 bit to install PHP. It will work in all the other CentOS 64 bit versions. In the 32 bit OS, there will be corresponding changes in yum install packages. You have to make sure that the installing packages are for 32 bit or not.

I have followed the steps in the following urls to setup LAMP server, i have tested and verified installation by following the steps described in there.

http://linuxadmintips4u.blogspot.in/2012/07/configure-apache.html

http://linuxadmintips4u.blogspot.in/2012/07/configuration-of-mysql.html


PHP


Installation



[root@vps ~]# cd /usr/local/src/

Download one of the following PHP packages and extract the packges as per the selected packages.

[root@vps src]# wget http://in1.php.net/distributions/php-5.2.17.tar.gz
or
[root@vps src]# wget http://in1.php.net/distributions/php-5.3.24.tar.gz
or
[root@vps src]# wget http://in1.php.net/distributions/php-5.4.14.tar.gz


[root@vps src]# tar -xzf php-5.2.17.tar.gz
[root@vps src]# cd php-5.2.17

Create a script, configure.sh with the following contents. I have tested the following script with all the versions of PHP and it is working fine for me.

#================================================================


#!/bin/bash

"./configure" \
"--prefix=/usr/local/php" \
"--with-apxs2=/usr/local/apache/bin/apxs" \
"--with-config-file-path=/usr/local/apache/conf" \
"--disable-debug" \
"--disable-rpath" \
"--enable-inline-optimization" \
"--enable-sockets" \
"--enable-wddx" \
"--enable-calendar" \
"--enable-ftp" \
"--enable-mbstring=all" \
"--enable-dom" \
"--enable-mbregex" \
"--enable-bcmath" \
"--with-openssl" \
"--with-kerberos" \
"--with-mcrypt" \
"--with-curl" \
"--with-gd" \
"--with-zlib-dir=/usr/lib" \
"--with-jpeg-dir=/usr/lib" \
"--with-png-dir=/usr/lib" \
"--with-freetype-dir=/usr/lib" \
"--with-regex=system" \
"--with-gettext" \
"--with-bz2" \
"--with-iconv" \
"--with-layout=GNU" \
"--with-imap=/usr/local/src/imap-2007f" \
"--with-imap-ssl" \
"--enable-soap" \
"--with-snmp" \
"--with-libdir=lib64" \
"--with-mysql=/usr/local/mysql" \
"--with-pdo-mysql"
#================================================================

[root@vps php-5.2.17]# chmod +x configure.sh
[root@vps php-5.2.17]# sh configure.sh

[root@vps php-5.2.17]# make
[root@vps php-5.2.17]# make install

Once the installation completed, create the following link to use the php command directly in terminal.

[root@vps ~]# ln -s /usr/local/php/bin/php /usr/bin/php

Once you done the above steps, check the version of PHP using the following command

[root@vps ~]# php -v


The above compilation command will enable the following modules. You can remove unwanted php modules from the compilation step. You may encounter errors while the compilation. All the errors which i got is added in the 'Possible Error' section at the end of this article. Please check there if you encountered an error during complilation.

Modules Installed During Installation


bcmath bz2 calendar Core ctype curl date dom filter ftp gd gettext hash iconv imap json libxml mbstring mcrypt mime_magic mysql openssl pcre PDO pdo_mysql pdo_sqlite posix Reflection session SimpleXML snmp soap sockets SPL SQLite standard tokenizer wddx xml xmlreader xmlwriter zlib


Possible Errors


I got the following errors while installing php with above modules and the solution i have given fixed those errors.

Compile Time Errors:

Error:
checking libxml2 install dir... no
checking for xml2-config path...
configure: error: xml2-config not found. Please check your libxml2 installation.

Solution:
[root@vps php-5.2.17]# yum install libxml2-devel -y

-------------------------------------------------------------------------------------------------------------------------------------------------

Error:
configure: error: Cannot find OpenSSL's <evp.h>

Solution:
[root@vps php-5.2.17]# yum install openssl-devel -y

-------------------------------------------------------------------------------------------------------------------------------------------------

Error:
configure: error: Please reinstall the BZip2 distribution

Solution:
[root@vps php-5.2.17]# yum install bzip2-devel.x86_64 -y

--------------------------------------------------------------------------------------------------------------------------------------------------

Error:
checking for cURL in default path... not found
configure: error: Please reinstall the libcurl distribution

Solution:
[root@vps php-5.2.17]# yum install curl-devel.x86_64 -y

-----------------------------------------------------------------------------------------------------------------------------------------------

Error:
configure: error: libjpeg.(a|so) not found.

Solution:
[root@vps php-5.2.17]# yum install libjpeg-devel.x86_64 -y

------------------------------------------------------------------------------------------------------------------------------------------------

Error:
configure: error: libpng.(a|so) not found.

Solution:
[root@vps php-5.2.17]# yum install libpng-devel.x86_64 -y

----------------------------------------------------------------------------------------------------------------------------------------------

Error:
configure: error: freetype.h not found.

Solution:
[root@vps php-5.2.17]# yum install freetype-devel.x86_64 -y

-----------------------------------------------------------------------------------------------------------------------------------------------

Error:
checking OpenSSL dir for SNMP... no
checking whether to enable UCD SNMP hack... no
checking for net-snmp-config... no
configure: error: snmp.h not found. Check your SNMP installation

Solution:
[root@vps php-5.2.17]# yum install net-snmp-devel -y

-----------------------------------------------------------------------------------------------------------------------------------------------

Error:
configure: error: mcrypt.h not found. Please reinstall libmcrypt

Solution:
[root@vps php-5.2.17]# yum install libmcrypt.x86_64 libmcrypt-devel.x86_64 -y

------------------------------------------------------------------------------------------------------------------------------------------------

Error:
configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.

Solution:

Install imap using the script described in the following url.

http://linuxadmintips4u.blogspot.in/2013/04/error-utf8mime2text-has-new-signature.html

----------------------------------------------------------------------------------------------------------------------------------------

Error:
checking for specified location of the MySQL UNIX socket... no
checking for MySQL UNIX socket location... no
configure: error: Cannot find libmysqlclient_r under /usr/local/mysql.
Note that the MySQL client library is not bundled anymore!

Solution:

http://linuxadmintips4u.blogspot.in/2013/04/error-cannot-find-libmysqlclientr-under.html

--------------------------------------------------------------------------------------------------------------------------------------------

Errors in Make


Error:
/usr/bin/ld: cannot find -lltdl
collect2: ld returned 1 exit status
make: *** [libphp5.la] Error 1

Solution:

Here's what you need to do to fix this issue,
1.Verify that the libtool and libtool-ltdl packages are installed.
[root@vps php-5.2.17]# yum install libtool-ltdl.x86_64 libtool.x86_64 -y

2.Symlink libltdl.so to libltdl.so.x.x.x

PHP looks for the libltdl library only at (for x64 at least) /usr/lib64/libltdl.so. The symlink to this file is not included in the libtool packages,you'll have to make it yourself
[root@vps php-5.2.17]# cd /usr/lib64
[root@vps lib64]# ln -s libltdl.so.3.1.4 libltdl.so

Try once again...

------------------------------------------------------------------------------------------------------------------------------------------------

Error:
/usr/local/imap-2007f/lib/libc-client.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [libphp5.la] Error 1


Solution:

Install imap using the script described in the following url.

http://linuxadmintips4u.blogspot.in/2013/04/error-utf8mime2text-has-new-signature.html


----------------------------------------------------------------------------------------------------------------------------------------------------


Hope the above steps helped you to install PHP....