Php – Zebra Printer – Socket Error 10054

PHPprintingsocket

While sending a large file to a Zebra Printer on the network (connected over wireless), the PHP script is throwing an error saying:

PHP Notice: fwrite(): send of 5932 bytes failed with errno=10054 An existing connection was forcibly closed by the remote host.

The printer has an internal print server and I have access to its settings.

I am trying to figure out how to solve this, but got no clue.
Anyone could help me please? Thank you.

Best Answer

Sorry to answer my own question, but thought this might be useful to someone.

I found what's causing the trouble. The wireless connection between the access point and the printer was not stable. When the wireless failed for a second and came back to operation the next moment, that small interval was enough for the server to throw the 10054 error.

The solutions I had in hand were to either migrate to a more robust wireless infrastructure, or to connect the printer through wire. I opted for the wired connection and everything worked normal.