[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Phpprintipp] Cups Printserver
From: |
Thomas Harding |
Subject: |
Re: [Phpprintipp] Cups Printserver |
Date: |
Wed, 15 Aug 2012 18:33:28 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:10.0.5) Gecko/20120624 Icedove/10.0.5 |
On 15/08/2012 10:39, Mathias Musiol (address@hidden) wrote:
Hello,
[extended answer on stack overflow: URI at this post end]
i have a problem with phpprintipp. I want to print a document to a
network printer. The Printer is connected with an CUPS Server. I get
this error message.
[Wed Aug 15 09:55:05 2012] [error] [client 141.28.64.39] PHP Notice:
Use of undefined constant debug_backtrace - assumed 'debug_backtrace'
in /usr/share/php/printipp/http_class.php on line 316
Committed that for monthes: debug_backtrace is a function, not a constant :)
=> check cvs:
cvs -z3 \
-d:pserver:address@hidden:/sources/phpprintipp \
co phpprintipp
=> or correct locally
file "php_classes/http_class.php"
line 316
- debug_backtrace
+ debug_backtrace();
anyway, this piece of code is not your mere problem (this is to format
warning messages).
**** Another call: will a new maintainer would take other that library
in order (I cannot without because it needs a maintainer with
disponibilities *and* whishes to code in a long term in address@hidden PHP
language) I could give away and donate that code to FSF. ****
** or simpler: Is s.o. here can send me an e-mail (address
<mailto:address@hidden>), then public GPG + ssh2 keys + savannah login
after a polite mail exchange, I will add him to project maintainers (cvs
commits for project + web_project, savannah page, maybe add too to ml
admins if possible) **
[Wed Aug 15 09:55:05 2012] [error] [client 141.28.64.39] PHP Warning:
Invalid argument supplied for foreach() in
/usr/share/php/printipp/http_class.php on line 317
[Wed Aug 15 09:55:05 2012] [error] [client 141.28.64.39] PHP Warning:
\\nE_USER_WARNING: [errno: ]: Unable to connect to
"tcp://141.28.64.191 port 631": Connection timed out in
/usr/share/php/printipp/http_class.php on line 329
[you, http server or standalone client]: IP 141.28.64.39
[the CUPS server]: IPP 141.28.64.191
CUPS is /normally/ listen TCP:631
*****************
I use standard "fsockopen" from PHP, so you can also check for your
PHP for the 3 functions below:
(transport type: tcp, or unix socket for eg CUPS co-hosted with
convenient setup)
(std tcp port: 631 -- rfc2911 => please correct for unix abstract
sockets **this is untested: only filesystem binded sockets has been
tested, in case not working on abstract ones I should re-write fsockopen
function call with a test case on unix/tcp**)
################
http_class.php :
################
[...]
$ip = gethostbyname ($url);
$ip = @gethostbyaddr ($ip);
[...]
$this->connection = @fsockopen ($transport_type.$url, $port, $errno,
$errstr, $this->timeout);
[...]
************
the trace said => cannot connect to server-ip tcp 631
most probably : please check connectivity (ping server IP, then telnet
ip-server 631,
(this will normally fails as your error message said "cannot connect
to server")
(if not fails) GET / HTTP/1.1, [enter] twice
(if fails) => check your IP addresses, check your CUPS setup ("listen
127.0.0.1 /and/ *141.28.64.191*" or "listen 0.0.0.0" + check: port 631)
(if not fails) => write a php test snippet (gethostbyname,
gethostbyaddress, fsockopen)
[Wed Aug 15 09:55:05 201
2] [error] [client 141.28.64.39] PHP Notice: Undefined offset: 0 in
/usr/share/php/printipp/BasicIPP.php on line 1197
I will take a look on that: in case of connexion fails the table or
string (probably string) should have not to be checked.
[Wed Aug 15 09:55:05 2012] [error] [client 141.28.64.39] PHP Warning:
No Response From Server in /usr/share/php/printipp/BasicIPP.php on
line 1218
the "log / warning" message is clear enough, isnt'it ?
Can you tell me whats wrong?
I just given an extended response on "how to find the print server",
"how to find the printer uri", "how to find the paths", "which document
formats are handled", "does it works with MS-Winxxx server (probably
not, try to install postscript driver, then post on list)"
here:
http://stackoverflow.com/questions/7313594/phpprintipp-printer-setup-help/11970768#11970768
I also given the ML address on the "web post" above, as I don't dig for
whatever concerning my stuff on the Ternet and the guy asked for his
question for months :)
So your one was welcome for others too...
(to be copied on a future "FAQ" page on main site)
See above ;)
Cheers,
--
TSFH.