From: dave at mail dot slh dot wisc dot edu
Operating system: windows 2000
PHP version: 4.3.3RC3
PHP Bug Type: Unknown/Other Function
Bug description: printer_get_option() followed by print can change PRINTER_MODE
Description:
------------
Using printer_get_option() to view printer mode setting can cause the
value of PRINTER_MODE to be altered.
Reproduce code:
---------------
<?php
$handle=printer_open('myprinter');
printer_set_option ($handle,PRINTER_MODE,"RAW");
print "<br>PRINTER_MODE " . printer_get_option($handle, PRINTER_MODE) .
"<br>";
print "handle=$handle";
print "<br>PRINTER_MODE " . printer_get_option($handle, PRINTER_MODE) .
"<br>";
printer_write($handle,"this is a test");
printer_close($handle);
?>
Expected result:
----------------
PRINTER_MODE RAW
handle=Resource id #2
PRINTER_MODE RAW
Actual result:
--------------
PRINTER_MODE RAW
handle=Resource id #2
PRINTER_MODE handle=
Warning: couldn't allocate the printerjob [1804] in d:\foo\printest2.php
on line 7
--
Edit bug report at http://bugs.php.net/?id=25052&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25052&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25052&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=25052&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=25052&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=25052&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=25052&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=25052&r=support
Expected behavior: http://bugs.php.net/fix.php?id=25052&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=25052&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=25052&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=25052&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25052&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=25052&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=25052&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=25052&r=gnused