0

i am doing web application based on php , while i am forcing my content to network printer
the following error was happening..

Fatal error: Uncaught Error: Call to undefined function printer_open() in E:\xampp\htdocs\print\index.php:3 Stack trace: #0 {main} thrown in E:\xampp\htdocs\print\index.php on line 3

my codes :

$php_content='Test Print';

$handle = printer_open("\\\\192.168.2.4\\EPSON L365 Series");

printer_write($handle, $php_content);

printer_close($handle);

I am adding php_printer.dll file to xampp/php/ext folder and adding the extension=php_printer into php.ini file

After restarting my xampp server its working fine on locally.

Same code I was executed on my Cpanel server HTTP ERROR 500 was showing.

Kindly give the solution for this..
Thanks in advance.

RiggsFolly
  • 93,638
  • 21
  • 103
  • 149
  • Does this answer your question? [Call to undefined function printer\_open()](https://stackoverflow.com/questions/15338132/call-to-undefined-function-printer-open) – Andrea Golin Feb 18 '20 at 09:54
  • Your CPanel Server is I assume a hosted Server and not one you control yourself? – RiggsFolly Feb 18 '20 at 10:04

0 Answers0