PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » File Formats » Spreadsheet_Excel_Writer » Bug #6811

invalid bitmap

Details

Submitted2006-02-17 14:23 UTC
Frombvdzwaag at eircom dot net
StatusBogus
PackageSpreadsheet_Excel_Writer
PHP Version4.3.11
OSLinux
Roadmaps(Not assigned)

Comments

[2006-02-17 14:23 UTC] bvdzwaag at eircom dot net

Description:
------------
I have created a PHP program that uses the PEAR package Excel writer. Its functionality is to write out some header titles, etc. then extract and write data from a MySQL database. In addition I insert a number of bitmap images (24bit). The program runs fine on my own server (Windows XP, Apache, PHP 4.2.2).

However, when I upload this to my host server (Linux, Apache, PHP 4.3.11) the spreadsheet is not generated, but the following error message is displayed in the spreadsheet that is generated:

drmg_header.bmp doesn't appear to be a valid bitmap image.

When removing all the insert_bitmap statements, the program runs fine on the host server. BTW, the images are 24bit bmp files, which display fine on a test HTML web page on this host server.

Excel version is Excel 2000 (9.0.2720)

Test script:
---------------
http://www.clients.finalbyte.com/php2excel/test_excel_writer.php to run it

Source code:

http://www.clients.finalbyte.com/php2excel/test_excel_writer_sc.html

Expected result:
----------------
I except to get an Excel spreadsheet with some data and 2 images.

Actual result:
--------------
The following error message is displayed in the Excel file that:

drmg_header.bmp doesn't appear to be a valid bitmap image.

This is the first bitmap image it is trying to insert.

[2006-07-03 09:19 UTC] mike dot jupp at bexley dot gov dot uk

Looking at the source code the first bitmap line is:
$worksheet2->insert_bitmap(1,1,"drmg_header.bmp",10,0,1,1);

Reference to the PEAR manual for this function, gives the syntax as:
insertBitmap (integer $row, integer $col, string $bitmap [, integer $x=0 [, integer $y=0 [, integer $scale_x=1 [, integer $scale_y=1]]]])

As you can see the function name is incorrect!