Re: Printer functions



On Sat, 16 Aug 2008 23:00:16 +0200, in comp.lang.php "Stefano"
<aaa@xxxxxx>
<48a73ff0$0$41657$4fafbaef@xxxxxxxxxxxxxxxxxxx> wrote:

| I've got a problem using printer functions with my network printer shared on
| another PC as \\192.168.1.3\HP
|
| If the printer is connected and reachable, printer_***() functions work
| correctly.
|
| Now let suppose the printer cable is unplagged so the printer is no more
| reachable:
|
| $handle = printer_open($printer_address); // Returns an handle also if the
| printer is unreachable (it is strange, it should return null)
| printer_start_doc($handle, "My Document"); // Returns false. It is correct
| because the printer is unreachable.
|
| Now I reconnect the printer cable:
|
| $handle = printer_open($printer_address); // Returns the handle
| printer_start_doc($handle, "My Document"); // RETURNS FALSE ALTHOUGHT THE
| PRINTER IS CONNECTED.
|
| At this point I cannot print anything using printer functions.
| I have to stop and restart Apache service to get TRUE from
| printer_start_doc() and every thing works correctly again.
|
| Any idea ?
|
| Thanks for the help.

You say that you disconnect and reconnect the cable. Have you tried
turning the printer off then on again?
This could be the reason that the printer is still not responding.
Have you tried printing a document, via word etc, to the same printer
once you reconnect the cable? If this is not successful then it would
indicate that the printer hasn't re-initialised the network
connection.
.



Relevant Pages

  • Re: $100 reward for socket disconnection help
    ... > I'm running Java 1.4.1 as an applet on the client side, under Windows 98, ... > with a DSL connection through a Linksys Wireless-B Router. ... > disconnects at the same time my application does ("AOL Instant Messenger ... > still trying to reconnect, IM is always able to immediately reconnect, and ...
    (comp.lang.java.programmer)
  • Re: restarting mobile broadband
    ... I'm a newbie to NetworkManager and have a few ... connection drops from time to time and doesn't ... But is doesn't reconnect automatically ... and a file called rx_bytes which may or may not run boot to boot rather than ...
    (Fedora)
  • Re: OT: Eclipse regrade slowing things?
    ... first 10 days of connection. ... broadband service may be periodically interrupted for up to 1 minute. ... This is normal and most routers will reconnect automatically, ... realigning to faster speeds up to 8Mbps. ...
    (uk.comp.sys.mac)
  • Re: restarting mobile broadband
    ... I'm a newbie to NetworkManager and have a few ... connection drops from time to time and doesn't ... to reconnect automatically? ... but the changes there will help out the mobile broadband stuff too." ...
    (Fedora)
  • Re: Terminal Services
    ... him When he's knocked out of TS he can immediately reconnect and be ... No internet disruption on the ... When I log back in TS acts like the connection was closed - ... that was left open when his VPN connection dropped. ...
    (microsoft.public.windows.server.sbs)