The revisions let you track differences between multiple versions of a post.

Revision of Update/Upgrade/Install XAMPP (LAMPP) modules by Compiling from Fri, 2010-02-19 12:00

Linux
PHP
Sys Administration

This article is not finished yet and it might not work for you at all, if you're still interested you can subscribe to its rss so you will be noticed whenever i update it.

XAMPP source code http://www.nat32.com/xampp/index.htm

http://www.apachefriends.org/f/viewtopic.php?f=16&t=34411

In Linux preparing a complete webserver is aqually quite easy and it does not require much time. But sometimes dependency issues and different versions may cause some trouble, this is where xampp comes in, XAMPP is a very useful piece of software for developers and regular users which allows installing a complete standalone Web Server in few minutes. But the Linux version of this software does not support addons , so upgrading its modules or installing new ones is not possible without compiling,unfortunately XAMPP developers don't like to share the source code of XAMPP it self so you cannot build our own customized version , so i'm going to describe how to overcome this problem.

Xampp 1.7.2 comes with PHP 5.3.0 which is stil buggy so i'm going to install PHP 5.2.11 under XAMPP (I could recompile 5.3 RC2 but i don't want to recompile for every issue i find!)

This toturial is written under Kubuntu(Debian based) and i will assume that lampp is installed in /opt/lampp which is the folder for manually installed softwares

PHP depends on Apache , so i'm going to install the latest version of Apache as well

Requirements

sudo apt-get install make
sudo apt-get install libcurl4-openssl-dev

Step 1 / Compiling apache

wget http://datadispensary.com/apache/httpd/httpd-2.2.14.tar.gz
tar -xzf httpd-2.2.14.tar.gz
sudo mv httpd-2.2.14 /usr/share/httpd-2.2
cd /usr/share/httpd-2.2
./configure --enable-so --prefix=/opt/lampp
make
make install

Step 2 / Downloding source code

Download PHP's source code from here and extract it in /usr/share
wget http://us2.php.net/distributions/php-5.2.11.tar.gz
tar -xzf php-5.2.11.tar.gz
sudo mv php-5.2.11 /usr/share/php-5.2

Step 2 / Finding configuration

We need to find the configuratoin of already installed version , so we can use it install the new version with the exact same configuration

/opt/lampp/bin/php --info | grep "Configure Command"

You should see something like this as result :

'./configure'  '--prefix=/opt/lampp' '--with-apxs2=/opt/lampp/bin/apxs' '--with-config-file-path=/opt/lampp/etc' '--with-mysql=mysqlnd' '--enable-inline-optimization' '--disable-debug' '--enable-bcmath' '--enable-calendar' '--enable-ctype' '--enable-dbase' '--enable-discard-path' '--enable-exif' '--enable-filepro' '--enable-force-cgi-redirect' '--enable-ftp' '--enable-gd-imgstrttf' '--enable-gd-native-ttf' '--with-ttf' '--enable-magic-quotes' '--enable-memory-limit' '--enable-shmop' '--disable-sigchild' '--enable-sysvsem' '--enable-sysvshm' '--enable-track-vars' '--enable-trans-sid' '--enable-wddx' '--enable-yp' '--with-ftp' '--with-gdbm=/opt/lampp' '--with-jpeg-dir=/opt/lampp' '--with-png-dir=/opt/lampp' '--with-freetype-dir=/opt/lampp' '--without-xpm' '--with-zlib=yes' '--with-zlib-dir=/opt/lampp' '--with-openssl=/opt/lampp' '--with-expat-dir=/opt/lampp' '--enable-xslt=/opt/lampp' '--with-xsl=/opt/lampp' '--with-dom=/opt/lampp' '--with-ldap=/opt/lampp' '--with-ncurses=/opt/lampp' '--with-gd' '--with-imap-dir=/opt/lampp' '--with-imap-ssl' '--with-imap=/opt/lampp' '--with-gettext=/opt/lampp' '--with-mssql=/opt/lampp' '--with-sybase-ct=/opt/lampp' '--with-interbase=shared,/opt/interbase' '--with-mysql-sock=/opt/lampp/var/mysql/mysql.sock' '--with-oci8=shared,instantclient,/opt/lampp/lib/instantclient' '--with-mcrypt=/opt/lampp' '--with-mhash=/opt/lampp' '--enable-sockets' '--enable-mbstring=all' '--with-curl=/opt/lampp' '--enable-mbregex' '--enable-zend-multibyte' '--enable-exif' '--with-bz2=/opt/lampp' '--with-sqlite=shared,/opt/lampp' '--with-sqlite3=/opt/lampp' '--with-libxml-dir=/opt/lampp' '--enable-soap' '--enable-pcntl' '--with-mysqli=mysqlnd' '--with-mime-magic' '--with-pgsql=shared,/opt/lampp/postgresql' '--with-iconv' '--enable-dio' '--with-pdo-mysql=mysqlnd' '--with-pdo-pgsql=/opt/lampp/postgresql' '--with-pdo-sqlite' '--enable-intl' '--with-icu-dir=/opt/lampp' '--enable-fileinfo' '--enable-phar'

Step 3 / Backup

Time to make a backup of the current installation, in case that anything went wrong

sudo cp -r /opt/lampp /opt/lampp.bak

Step 4 / Configuration

Now that we have configuration options , we're going to review it and then use it to compile the new version.
path to with-openssl=/usr or --with-bz2

cd /usr/src/php-5.2/
'./configure'  '--prefix=/opt/lampp' '--with-apxs2=/opt/lampp/bin/apxs' '--with-config-file-path=/opt/lampp/etc' '--with-mysql=mysqlnd' '--enable-inline-optimization' '--disable-debug' '--enable-bcmath' '--enable-calendar' '--enable-ctype' '--enable-dbase' '--enable-discard-path' '--enable-exif' '--enable-filepro' '--enable-force-cgi-redirect' '--enable-ftp' '--enable-gd-imgstrttf' '--enable-gd-native-ttf' '--with-ttf' '--enable-magic-quotes' '--enable-memory-limit' '--enable-shmop' '--disable-sigchild' '--enable-sysvsem' '--enable-sysvshm' '--enable-track-vars' '--enable-trans-sid' '--enable-wddx' '--enable-yp' '--with-ftp' '--with-gdbm=/opt/lampp' '--with-jpeg-dir=/opt/lampp' '--with-png-dir=/opt/lampp' '--with-freetype-dir=/opt/lampp' '--without-xpm' '--with-zlib=yes' '--with-zlib-dir=/opt/lampp' '--with-openssl=/opt/lampp' '--with-expat-dir=/opt/lampp' '--enable-xslt=/opt/lampp' '--with-xsl=/opt/lampp' '--with-dom=/opt/lampp' '--with-ldap=/opt/lampp' '--with-ncurses=/opt/lampp' '--with-gd' '--with-imap-dir=/opt/lampp' '--with-imap-ssl' '--with-imap=/opt/lampp' '--with-gettext=/opt/lampp' '--with-mssql=/opt/lampp' '--with-sybase-ct=/opt/lampp' '--with-interbase=shared,/opt/interbase' '--with-mysql-sock=/opt/lampp/var/mysql/mysql.sock' '--with-oci8=shared,instantclient,/opt/lampp/lib/instantclient' '--with-mcrypt=/opt/lampp' '--with-mhash=/opt/lampp' '--enable-sockets' '--enable-mbstring=all' '--with-curl=/opt/lampp' '--enable-mbregex' '--enable-zend-multibyte' '--enable-exif' '--with-bz2=/opt/lampp' '--with-sqlite=shared,/opt/lampp' '--with-sqlite3=/opt/lampp' '--with-libxml-dir=/opt/lampp' '--enable-soap' '--enable-pcntl' '--with-mysqli=mysqlnd' '--with-mime-magic' '--with-pgsql=shared,/opt/lampp/postgresql' '--with-iconv' '--enable-dio' '--with-pdo-mysql=mysqlnd' '--with-pdo-pgsql=/opt/lampp/postgresql' '--with-pdo-sqlite' '--enable-intl' '--with-icu-dir=/opt/lampp' '--enable-fileinfo' '--enable-phar' 

Feel free to leave comments if you had any problem

Your rating: None Average: 3.2 (11 votes)

Comments

Mauro Chojrin's picture

Hi: Thanks for this tuto,

2

Hi:

Thanks for this tuto, I'm trying to accomplish exactly this.

I noticed a small typo on your post:

The directory where the untared files are is /usr/share/php-5.2, not /usr/src/php-5.2

Besides that, I run the ./configure with my own configuration (the one I got from the previous step) and it didn't work. Here's the message I got:

configure: error: libgds, libib_util or libfbclient not found! Check config.log for more information.

admin's picture

Hi, You're welcome. i fixed

Hi,
You're welcome. i fixed the typo you mentioned thanks.
Before i answer you question, i must tell you that compiling XAMPP is quite a challenge mostly because Apache Friends (XAMPP developers) do not like to share the build scripts!. :)
I did not continue this article since it required much more time than i expected. However as you can see i at least figured out how to start and decided to share it to make a bit easier for others to continue. So if you managed to get it done i'll more than happy to try your approach.

About your question. I need to have a look at your log file for accurate answer however just to let you know (libgds, libib_util or libfbclient) are for interbase database, you can skip it if you don't need it. just remove --with-interbase=shared,/opt/interbase and try again.

Sometimes the problem is with the path, you can locate interbase and replace the path with the correct path on your system (Same applies to other configurations)