Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.9.4

Bug #6811 invalid bitmap
Submitted: 2006-02-17 14:23 UTC
From: bvdzwaag at eircom dot net Assigned:
Status: Bogus Package: Spreadsheet_Excel_Writer (version 0.9.0)
PHP Version: 4.3.11 OS: Linux
Roadmaps: (Not assigned)    
Subscription  


 [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.

Comments

 [2006-07-03 09:19 UTC] mike dot jupp at bexley dot gov dot uk (Mike Jupp)
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!
 [2007-03-11 09:21 UTC] mj (Martin Jansen)
I'm marking this bug as bogus because, as indicated by Mike Jupp, there seems to be a problem in the reproducing script. Original reporter: If you can provide a working example that still fails, please feel free to re-open this bug. Thank you! - Martin
 [2007-08-19 09:26 UTC] poroto (Johnny Barrios.)
el problema esta en la clase Worksheet.php method _process_bitmap($bitmap) vea el method _process_bitmap de la siguiente clase (url) y remplaselo. http://www.bettina-attack.de/jonny/demos/php_writeexcel/class.writeexcel_worksheet.inc.phps saludos!.