Hello, I’m trying to connect my thermal printer so that I can print receipt.
I’m using Mike42/ESC-POS PHP Library which allows me to print from website to my local printer. I know my hosting website can’t access my local printer. That’s why I’m trying to use remote.it services.
I’ve added my services the same as my printer IP address, 192.168.1.6, and port 9100 using TCP and also HTTP.
If I access the remote endpoint with TCP on my local machine I get random printer error, I don’t know it’s just weird symbol. And If I accessed the IP with HTTP it will come as the printer admin page. Things started going down from here, if I try to print in my hosting server, the PHP came out as an error 500, and when I check the logs it gave me this:
PHP Fatal error: Uncaught Exception: Cannot initialise NetworkPrintConnector: Connection refused in /home/bowboxpr/public_html/vendor/mike42/escpos-php/src/Mike42/Escpos/PrintConnectors/NetworkPrintConnector.php:40
Stack trace:
It says that the connection is refused. I’m kinda at a dead end here. Maybe I setup my printer wrong?