Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP printer troubleshoot

Status
Not open for further replies.

mcetintr

Programmer
Dec 19, 2005
2
TR
Hi,

I can print via thermal printer by using php_printer.dll.
But I failed on same type local network printer.

Operating Systems are XP pro, and php 5.0.5 PECL.

So I can print from notepad.exe via network printer. But isn't posssible with php.


Code:

$printer = "\\\\192.168.1.200\\WTP100Pa";
if(($conn_printer = printer_open($printer)) === NULL)
die("Could not connect to $printer\r\n");
var_dump($conn_printer);


printer_write($conn_printer, "Text to print");
printer_close($conn_printer);


What must I do? Please help.
 
i've never tried this myself but just a thought: have you allowed this kind of transport in your php.ini file?
 
I don't understand. Could you explain changes of php.ini a little?

Thanks your interest
 
i don't think i was on the right track here but try checking php.ini to make sure that
Code:
allow_url_fopen = On

other things to think about (more likely too) - does the user under which the script is running (likely to be iusr_[machine name]) have printing rights to the relevant server printer?
does the client have a server off-line files relationship and if so, is the relationship fully synchronised? (or at least is the server definitely online to the client).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top