Building for XAMPP Linux 1.7.3a

Problems with the Linux version of XAMPP, questions, comments, and anything related.

Building for XAMPP Linux 1.7.3a

Postby superpoke » 13. January 2010 20:49

I didn't find the driver in the XAMPP Linux 1.7.3a distribution which I needed for a project. Here are the steps I took to compile it -- hopefully this will help someone else.

* Download the complete source code for PHP 5.3.1 from and place it in /tmp

* Download the following Oracle Instant Client packages from ... xsoft.html and place them in /tmp:

You will need to register for an Oracle OTN account (free) to access the url and download the libraries.

* Unpack the downloaded files
cd /tmp
tar -zxvf php-5.3.1.tar.gz

* Move the Oracle library files to the right place
mv instantclient_10_2 /opt/lampp/lib

* Create necessary symlinks
cd /opt/lampp/lib
ln -s /opt/lampp/lib/instantclient_10_2 instantclient
ln -s /opt/lampp/lib/instantclient_10_2 lib
ln -s /opt/lampp/lib/instantclient_10_2/
ln -s /opt/lampp/lib/instantclient_10_2/

* Set your ORACLE_HOME
export ORACLE_HOME=/opt/lampp/lib/instantclient

* Prepare to compile in the PHP tree
cd /tmp/php-5.3.1

* Configure PHP 5.3.2 You need to configure PHP with the switches to inform the builder of the location of LAMPP and the Oracle Instantclient that you just installed. To do this, I copied the configure command that is returned by phpinfo() and added the pdo-oci switches. The command is as follows

'./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-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-iconv' '--enable-dio' '--with-pdo-mysql=mysqlnd' '--with-pdo-sqlite' '--with-pdo-oci=shared,instantclient,/opt/lampp/lib/instantclient,' '--enable-intl' '--with-icu-dir=/opt/lampp' '--enable-fileinfo' '--enable-phar'

* Build PHP

* Copy the file to the right place. DO NOT RUN make install.
sudo cp modules/ /opt/lampp/lib/php/extensions/no-debug-non-zts-20090626

* Enable the extension
Add the line '' to /opt/lampp/etc/php.ini

* Restart Apache
/opt/lampp/lampp restartapache

Keywords: pdo_oci, xampp, oracle, linux, pdo, oci, lampp, symfony 1.4.0, doctrine, php 5.3.1
Posts: 1
Joined: 13. January 2010 20:37

Re: Building for XAMPP Linux 1.7.3a

Postby EFil » 31. January 2011 18:18


You tutorial seems very detailed, still, a little dificult for non linux experts.
Is there any way to do this withou (at least) having to recompile stuff?

I just want to access an oracle database using pdo (required for prado framework)

Posts: 1
Joined: 31. January 2011 18:15

Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 5 guests