#26346 [NEW]: Cannot output to a shared printer

From: Date: Fri, 21 Nov 2003 10:30:21 +0000
Subject: #26346 [NEW]: Cannot output to a shared printer
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-50796@lists.php.net to get a copy of this message
From: rich at dwell dot co dot uk Operating system: Windows 2003 PHP version: 4.3.4 PHP Bug Type: Network related Bug description: Cannot output to a shared printer Description: ------------ There is a problem with the php_printer.dll. Printing to a local printer is fine although I find that some of the options in printer_set_option do not seem to work. On any share network printer, however, PHP gives warning about not being able to allocate the print job and then terminates. I can in some cases work around this by outputing to a file and then calling the external program print.exe to print the file, but this is only useful for printers with there own proprietory language like label printers. Obviously this is not a rights issue as I am printing to the printer using print.exe which runs under IUSR privileges. Reproduce code: --------------- <?php $handle = printer_open("\\\\Warehouse\\whlaser"); printer_start_doc($handle, ""); printer_start_page($handle); $font = printer_create_font("Arial", 100, 50, PRINTER_FW_MEDIUM, false, false, false, 0); printer_select_font($handle, $font); printer_draw_text($handle, "PHP is simply cool", 400, 400); printer_delete_font($font); printer_end_page($handle); printer_end_doc($handle); printer_close($handle); ?> Expected result: ---------------- The network printer should output "PHP is simply cool" as it does on a locally connected printer. Actual result: -------------- Warning: couldn't allocate new print job in c:\inetpub\wwwroot\test\unused routines\print.php on line 4 Warning: couldn't start a new page in c:\inetpub\wwwroot\test\unused routines\print.php on line 5 Warning: couldn't end the page in c:\inetpub\wwwroot\test\unused routines\print.php on line 15 Fatal error: couldn't terminate print job in c:\inetpub\wwwroot\test\unused routines\print.php on line 17 -- Edit bug report at http://bugs.php.net/?id=26346&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26346&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26346&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=26346&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=26346&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=26346&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=26346&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=26346&r=support Expected behavior: http://bugs.php.net/fix.php?id=26346&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=26346&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=26346&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=26346&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26346&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=26346&r=dst IIS Stability: http://bugs.php.net/fix.php?id=26346&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=26346&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=26346&r=float

« previous php.bugs (#50796) next »