Source Compile PHP 5.2.4 for Plesk 8
by
on 11-13-2007 at 10:15 AM (4607 Views)
Proceed at yourn risk, if you brake your server this won't be my problem.
I hate await when a new version of php is released that a packager built it. I prefer has the liberty of compile at any moment.
This procedure is tested in a Plesk 8.1 and in Plesk 8.2
Review the rpms installed:
Delete all php extension packages except the main packages, because the panel use it for allow give php support when new domain is configured.Code:[daniel@srv01 ~]$ rpm -qa | grep php php-5.2.3-1.el4.art php-common-5.2.3-1.el4.art php-mysql-5.2.3-1.el4.art php-gd-5.2.3-1.el4.art php-xml-5.2.3-1.el4.art
Code:rpm -e --nodeps php-mysql-5.2.3-1.el4.art php-gd-5.2.3-1.el4.art php-xml-5.2.3-1.el4.art
Download php
Code:[daniel@srv01 ~]$ tar xzf php-5.2.4.tar.bz2 [daniel@srv01 ~]$ cd php-5.2.4Note: I use the new mysqli extension instead of old mysql extension, if you use mysqli need change in vBulletin config file:Code:./configure --host=i686-redhat-linux-gnu --build=i686-redhat-linux-gnu --target=i386-redhat-linux-gnu \ --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc \ --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var \ --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --cache-file=../config.cache \ --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --enable-force-cgi-redirect --disable-debug \ --disable-rpath --enable-inline-optimization --with-bz2 --with-db4=/usr --with-curl \ --with-exec-dir=/usr/bin --with-freetype-dir=/usr --with-png-dir=/usr --with-gd --enable-gd-native-ttf \ --without-gdbm --with-gettext --with-ncurses --with-gmp --with-iconv --with-jpeg-dir=/usr --with-openssl \ --with-pspell --with-regex=system \ --with-xmlrpc=shared --with-zlib --with-layout=GNU \ --enable-bcmath --enable-exif --enable-ftp --enable-magic-quotes --enable-sockets --enable-sysvsem \ --enable-sysvshm --enable-wddx --with-pear=/usr/share/pear \ --with-ldap=shared --with-mhash=shared --with-mcrypt=shared \ --enable-bcmath --enable-shmop --enable-calendar \ --enable-mbstring=shared --enable-mbregex \ --with-apxs2=/usr/sbin/apxs --without-sqlite --without-pgsql \ --with-mysqli=/usr/bin/mysql_config \ --with-kerberos --with-imap --with-imap-ssl=/usr/include/openssl \ --enable-inline-optimization --disable-debug --disable-ipv6
If the configure show a error read the error and install the related devel package.Code:// ****** DATABASE TYPE ****** // This is the type of the database server on which your vBulletin database will be located. // Valid options are mysql and mysqli. Try to use mysqli if you are using PHP 5 and MySQL 4.1+ $config['Database']['dbtype'] = 'mysqli';
Make install add to the end of httpd.conf the following line "LoadModule php5_module modules/libphp5.so" delete itCode:make && make install
Update the following files as follows
/etc/httpd/conf.d/php.conf
Plesk panel, Horde, Watchdog and domains are working right.Code:LoadModule php5_module modules/libphp5.so AddHandler php5-script .php AddType text/html .php DirectoryIndex index.php #AddType application/x-httpd-php-source .phps



.
