I've got a standard Magento installation on Windows 7 using the BitNami Magento installation for XAMPP.

When I open the Sales -> Invoices screen and click on an invoice and then click on the orange Print button in the upper right hand corner of the screen I get the following error message inside the web browser:

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

Anyone know why I am getting this and how to fix this?

2 Answers 2


Magento in versions before CE 1.9 / EE 1.14 is not compatible with PHP 5.4 out of the box, which causes this error.

Anyways, there is an official patch for this.


This an incompatibility issue between PHP Version 5.4.4 and zend Framwork .

Fixed it by change in this function lib/Zend/Pdf/FileParserDataSource.php.


abstract public function __construct();


abstract public function __construct($filePath);

Not the answer you're looking for? Browse other questions tagged or ask your own question.