php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18015 Printer Function printer_open, no default printer found
Submitted: 2002-06-27 06:15 UTC Modified: 2018-08-11 04:51 UTC
Votes:6
Avg. Score:3.2 ± 1.2
Reproduced:2 of 3 (66.7%)
Same Version:1 (50.0%)
Same OS:2 (100.0%)
From: hjcarlo at yahoo dot de Assigned:
Status: Wont fix Package: Unknown/Other Function
PHP Version: 4.2.1 OS: Win2000
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: hjcarlo at yahoo dot de
New email:
PHP Version: OS:

Further comment on this bug is unnecessary.

 

 [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


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-27 06:20 UTC] sander@php.net
Can you do post the output of the following here:
var_dump(printer_list(PRINTER_ENUM_LOCAL));
 [2002-06-27 09:25 UTC] hjcarlo at yahoo dot de
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
 [2002-12-19 23:16 UTC] iliaa@php.net
Appears to be an abandoned PECL extension.
 [2018-08-10 06:51 UTC] raghuram88585 at gmail dot com
If I talk approximately the exceptional printer and its functions then I constantly advocated canon printer because earlier than bought any printer we have to check its function. Canon printer has specific capabilities like Canon Pixma MG5620 is a successful system with a clean set-up process and an appealing set of capabilities. it's far very supportable with the consumer and the great factor is the Canon customer support team is always a gift for customer help. and you additionally go to this link https://www.printererrorrepair.com/canon-patron-service/ for greater statistics.
 [2018-08-11 04:45 UTC] ankitarathi6233 at gmail dot com
I have a Canon Printer and at some point in the past when I was putting in printer derive it changed into showing mistakes code 1931. while I discovered canon customer service and that they eliminated this error and gave me an exceptional answer you could touch them and speak you issue.
https://www.printererrorrepair.com/canon-customer-service/
 [2018-08-11 04:51 UTC] requinix@php.net
-Block user comment: No +Block user comment: Yes
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Oct 27 16:01:27 2024 UTC