Fatal error Declaration of Zend Pdf FileParserDataSource File __construct

Wednesday, 3. April 2013

Had this issue printing Magento invoices on Windows server which was a bit odd.

On Linux development Machine everything thing appears to be working absolutely fine. Moving to live server which is a Windows Server machine, I kept getting this error

Fatal error: Declaration of Zend_Pdf_FileParserDataSource_File::__construct() must be compatible with Zend_Pdf_FileParserDataSource::__construct() in …\lib\Zend\Pdf\FileParserDataSource\File.php on line 41

A bit of browsing on the internet suggests re-installing the OS which was not an option for me! So to work around the issue, I simply accessed this file and function


And commented out the construct function. Not very efficient but solved the issue (atleast for now). If you have a better idea or a moment of Eureka, please drop a line!

# abstract public function __construct();

Leave a Reply

You must be logged in to post a comment.