Setup LibXL in PHP

Thanks to Ilia Alshanetsky for this extension for PHP. Please follow the instructions below:


1. Install Apache and PHP if they don't exist:

sudo apt-get update
sudo apt-get install apache2
sudo apt-get install php5
2. Install files to develop PHP modules:

sudo apt-get install php5-dev
3. Download and unpack the latest LibXL package:

wget http://libxl.com/download/libxl-lin-3.6.4.tar.gz
tar xvfz libxl-lin-3.6.4.tar.gz
4. Download and unpack php_excel module source code:

wget https://github.com/iliaal/php_excel/archive/master.zip
unzip master.zip
5. Prepare the build environment for the PHP extension and configure it:

cd php_excel_master
phpize
./configure --with-libxl-incdir=../libxl-3.6.4.0/include_c --with-libxl-libdir=../libxl-3.6.4.0/lib
6. Make and install php_excel extension:

make
sudo make install
7. Add the extension to PHP configuration file:

sudo vi /etc/php5/apache2/conf.d/excel.ini

Add the following line to excel.ini and save it:
extension=excel.so
8. Restart Apache web server:

sudo service apache2 restart
9. Web server is ready for using LibXL functions.