Friday, September 16, 2011

Excel Writer Pear and Centos

Dealing with 3rdparty modules can be difficult but at Blue Box we know how to fix them.

Recently I moved from an Ubuntu Server to Centos 5.6 server. Everything worked well except for one really annoying 3rdparty application that led us down a really black hole.


History
Spreadsheet_Excel_Writer
Spreadsheet_Excel_Writer was born as a porting of the Spreadsheet::WriteExcel Perl module to PHP.
It allows writing of Excel spreadsheets without the need for COM objects.

After 2 days of looking we found that when you install pear (yum install php-pear) it created File.php which was been loaded dynamically into php and ignoring the correct File.php in the bluebox 3rdparty engine directory. This meant when calling the Excel function it did not load all its required modules.

The fix. #rm /usr/share/php/File.php

Now we able to build excel spreadsheets again.