From: andy at advancethermal dot com Operating system: Windows XP Professional PHP version: 4.3.1 PHP Bug Type: COM related Bug description: Crystal Reports 9 (RDC) and SelectPrinter error
Specifying a printer from the SelectPrinter method causes PHP to crash. The following code: ----- $crapp = new COM("CrystalDesignRunTime.Application"); $creport = $crapp->OpenReport("d:\\athermal\\reports\\backlog.rpt", 1); $creport->SelectPrinter("winspool", "HP LaserJet 1200 Series PCL", "Ne01:"); print "DEBUG|".$creport->DriverName."|".$creport->PrinterName."|".$creport->PortName."|"; $creport->PrintOut(False); ----- Produces the following output: ----- Content-type: text/html X-Powered-By: PHP/4.3.1 winspool|HP LaserJet 1200 Series PCL|Ne01:|<br /> <b>Warning</b>: (null)(): Invoke() failed: Exception occurred. <b>Source</b>: Crystal Reports ActiveX Designer <b>Description</b>: Error start ing print job. Please check your printer or network connection. in <b>d:\atherma l\temp\test.php</b> on line <b>7</b><br /> ----- Other items to note: - When the SelectPrinter line is commented out, the report prints fine to the default printer and the DEBUG line prints "DEBUG|||". - If the PrintOut line is commented out, the DEBUG line prints "DEBUG|winspool|HP LaserJet 1200 Series PCL|Ne01:|" without any error. - If the PortName is not specified, or specified incorrectly on the SelectPrinter line, it is printed correctly on the DEBUG line. (i.e. if "Ne00:" is specified on the SelectPrinter line, "Ne01:" is reported on the DEBUG line.) aap -- Edit bug report at http://bugs.php.net/?id=22902&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=22902&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=22902&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=22902&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=22902&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=22902&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=22902&r=support Expected behavior: http://bugs.php.net/fix.php?id=22902&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=22902&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=22902&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=22902&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22902&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=22902&r=dst IIS Stability: http://bugs.php.net/fix.php?id=22902&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=22902&r=gnused