|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-06-27 06:15 UTC] hjcarlo at yahoo dot de
Hello,
i have some problem with the "printer" function.
I have installed an WAMP system with, PHP 4.2.1
i have added the "php_printer.dll".
when i want to connect to a printer i receive the message,
Warning: couldn't connect to the printer [h#?/htm] in c:\apache\htdocs\printer_1.php on line 4
-------
if ($submit) {
$handle = printer_open();
printer_write($handle, $text);
printer_close($handle);
}
------------------
When i try to list the attached printers with
----------------------
if ($auflisten) {
PRINTER_ENUM_SHARED);
$var_dump = printer_list(PRINTER_ENUM_LOCAL);
while(list($key, $value) = each($var_dump))
{
echo "$key, $value";
}
}
-----------------
i only receive
0, Array1, Array2, Array3, Array4, Array5, Array6, Array
what is the problem ?
Is it a bug with PHP 4.2.1
In a older version of PHP i had no problems
thanks a lot
Jack
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 19:00:01 2025 UTC |
array(7) { [0]=> array(3) { ["NAME"]=> string(16) "HP Mopier 320 PS" ["DESCRIPTION"]=> string(34) "HP Mopier 320 PS,HP Mopier 320 PS," ["COMMENT"]=> string(109) "Diesen Kommentar hat Kurt remote von einem Linux-Rechner aus auf dem win2K eingetragen. Methode: rpcclient..." } [1]=> array(3) { ["NAME"]=> string(17) "HP Mopier 320 PCL" ["DESCRIPTION"]=> string(36) "HP Mopier 320 PCL,HP Mopier 320 PCL," ["COMMENT"]=> string(0) "" } [2]=> array(3) { ["NAME"]=> string(16) "FRITZfax Drucker" ["DESCRIPTION"]=> string(27) "FRITZfax Drucker,FRITZ!fax," ["COMMENT"]=> string(0) "" } [3]=> array(3) { ["NAME"]=> string(22) "FRITZfax Color Drucker" ["DESCRIPTION"]=> string(39) "FRITZfax Color Drucker,FRITZ!Fax Color," ["COMMENT"]=> string(0) "" } [4]=> array(3) { ["NAME"]=> string The output of ----------- var_dump(printer_list(PRINTER_ENUM_LOCAL)); ------------- is, (16) "DANKA InfoStream" ["DESCRIPTION"]=> string(34) "DANKA InfoStream,DANKA InfoStream," ["COMMENT"]=> string(0) "" } [5]=> array(3) { ["NAME"]=> string(17) "Acrobat PDFWriter" ["DESCRIPTION"]=> string(36) "Acrobat PDFWriter,Acrobat PDFWriter," ["COMMENT"]=> string(0) "" } [6]=> array(3) { ["NAME"]=> string(17) "Acrobat Distiller" ["DESCRIPTION"]=> string(44) "Acrobat Distiller,AdobePS Acrobat Distiller," ["COMMENT"]=> string(0) "" } } -------------------------------- the problem is, that PHP 4.2.1 does not find the default printer in the system. I tried this ------------- $handle = printer_open(); printer_write($handle, $text); printer_close($handle); ------------------- with php 4.0.6 and it works well, also in PHP Info in section "printers" there is my default printer listet, with PHP 4.2.1 not