Setup LibXL in PHP (Linux)

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 php7
2. Install files to develop PHP modules:

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

tar xvfz libxl-lin-latest.tar.gz
4. Get php_excel module source code:

git clone -b php7
5. Prepare the build environment for the PHP extension and configure it:

cd php_excel_master
./configure --with-libxl-incdir=../libxl- --with-libxl-libdir=../libxl-
./configure --with-libxl-incdir=../libxl- --with-libxl-libdir=../libxl- for a 32-bit operating system
6. Make and install php_excel extension:

sudo make install

If you get the following error:
/usr/include/php5/ext/xml/expat_compat.h:36:27: fatal error: libxml/parser.h: No such file or directory
then try to add "-with-libxml-dir=/usr/include/libxml2" parameter to "configure" script.
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:
8. Restart Apache web server:

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