From: <ve...@gm...> - 2003-06-23 13:50:51
|
hi, i wanted to write a irc client to login into the unreal ircd server, but i get this error. i think that the ministerv.pl does not know the package Select, is that right? HTTP/1.0 500 Perl execution failed Server: MiniServ/0.01 Date: Sat, 21 Jun 2003 19:52:04 GMT Content-type: text/html Connection: close Error - Perl execution failed Can't locate object method "FILENO" via package "miniserv" at /usr/lib/perl5/5.8.0/i386-linux-thread-multi/IO/Select.pm line 61. thanks wlad -- +++ GMX - Mail, Messaging & more http://www.gmx.net +++ Bitte lächeln! Fotogalerie online mit GMX ohne eigene Homepage! -- +++ GMX - Mail, Messaging & more http://www.gmx.net +++ Bitte lächeln! Fotogalerie online mit GMX ohne eigene Homepage! |
From: Jamie C. <jca...@we...> - 2003-06-23 23:02:26
|
What does the code in your CGI that uses this Select package look like? The problem may be that STDOUT for webmin CGI scripts is not actually directly connected to the network, but instead is tied to a special perl package (miniserv) that interprets HTTP headers before actually sending them back to the web browser. - Jamie On Mon, 2003-06-23 at 23:43, ve...@gm... wrote: > hi, >=20 >=20 > i wanted to write a irc client to login into the unreal ircd server, but = i > get this error. > i think that the ministerv.pl does not know the package Select, is that > right? >=20 > HTTP/1.0 500 Perl execution failed Server: MiniServ/0.01 Date: Sat, 21 Ju= n > 2003 19:52:04 GMT Content-type: text/html Connection: close=20 > Error - Perl execution failed > Can't locate object method "FILENO" via package "miniserv" at > /usr/lib/perl5/5.8.0/i386-linux-thread-multi/IO/Select.pm line 61. >=20 > thanks > wlad >=20 > --=20 > +++ GMX - Mail, Messaging & more http://www.gmx.net +++ > Bitte l=E4cheln! Fotogalerie online mit GMX ohne eigene Homepage! >=20 >=20 >=20 > --=20 > +++ GMX - Mail, Messaging & more http://www.gmx.net +++ > Bitte l=E4cheln! Fotogalerie online mit GMX ohne eigene Homepage! >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: INetU > Attention Web Developers & Consultants: Become An INetU Hosting Partner. > Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! > INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php > - > Forwarded by the Webmin development list at web...@we... > To remove yourself from this list, go to > http://lists.sourceforge.net/lists/listinfo/webadmin-devel |
From: <ve...@gm...> - 2003-06-24 10:51:11
|
> What does the code in your CGI that uses this Select package look like? > > The problem may be that STDOUT for webmin CGI scripts is not actually > directly connected to the network, but instead is tied to a special perl > package (miniserv) that interprets HTTP headers before actually sending > them back to the web browser. > > - Jamie hm, yes, i think that could be the problem, because for irc a direct a dirct connection is needed. i pase the important code. thanks This is a iframe, which is called from a normal webmin page. #!/usr/bin/perl require './admirc-lib.pl'; &ReadParse(); &header(); [a lot of variables] use IO::Socket::INET; use IO::Select; use Term::ANSIColor; # main prog $| = 1; &c($servercolor); $data .= "*** "; &c('bold red'); $data .= "x.pl v$version"; &c($servercolor); $data .= " connecting to server $server on port $port\n"; $sock = new IO::Socket::INET->new(PeerAddr => $server, PeerPort => $port, Proto => 'tcp'); $sel = new IO::Select->new(); $sel->add($sock); $sel->add($cmd); $sel->add(STDIN); die "*E* Could not Connect to '$server' on port $port.\n" unless $sock; $username = $ENV{'USERNAME'} || $nick; $data .= "$sock \"USER $username 0 * :$realname\n\""; $data .= "$sock \"NICK $nick\n\""; while(@ready){# = $sel->can_read) { &c('reset'); foreach $fh (@ready) { if ($fh == $sock) { sysread($sock,$buf,4096); die("*** connection to server lost, sorry :P\n") unless $buf; @bufs = split(/\n/,$buf); foreach (@bufs) { &c($servercolor); &parse_serverline($_); &c($textcolor); } } if($fh == STDIN) { &c($servercolor); $buf = <STDIN>; &parse_userline($buf); &c($textcolor); } if($fh eq $command) { &c($servercolor); $buf = $command; &parse_commandline($buf); &c($textcolor); } } &c($incolor); } &c('reset'); [build html] [more sub funktions] -- +++ GMX - Mail, Messaging & more http://www.gmx.net +++ Bitte lächeln! Fotogalerie online mit GMX ohne eigene Homepage! |
From: Jamie C. <jca...@we...> - 2003-06-24 12:46:58
|
On Tue, 2003-06-24 at 20:50, ve...@gm... wrote: > > What does the code in your CGI that uses this Select package look like? > > > > The problem may be that STDOUT for webmin CGI scripts is not actually > > directly connected to the network, but instead is tied to a special perl > > package (miniserv) that interprets HTTP headers before actually sending > > them back to the web browser. > > > > - Jamie > > hm, yes, i think that could be the problem, because for irc a direct a dirct > connection is needed. > i pase the important code. > > [code deleted ..] Try taking out the $sel->add(STDIN); line, since it doesn't seem useful in this case, and is probably causing the problem. - Jamie |