Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > getprotobyname don't work

Reply
Thread Tools

getprotobyname don't work

 
 
arnaudhasard@yahoo.fr
Guest
Posts: n/a
 
      01-25-2006

On my configuration (Windows 2000), the following command line doesn't
print any results :

perl -e "print getprotobyname tcp"

On 2 different systems, (same OS and the same perl version), the
correct line (tcpTCP6) is printed. I think it is a bind problem between
the perl built-in function and the corresponding system call.

Actually, no script using "IO::Socket" is working (error "Can't
connect" during the creation of a new socket), but scripts using
"Socket" or "HTTP::Lite" work well.

Thank you for any help.


perl -v

This is perl, v5.8.7 built for MSWin32-x86-multi-thread
(with 14 registered patches, see perl -V for more detail)

Copyright 1987-2005, Larry Wall

Binary build 815 [211909] provided by ActiveState
http://www.ActiveState.com
ActiveState is a division of Sophos.
Built Nov 2 2005 08:44:52

 
Reply With Quote
 
 
 
 
arnaudhasard@yahoo.fr
Guest
Posts: n/a
 
      01-25-2006
I should add that :
- yes, connexions work with other langages (C, C++, ...) and/or other
softwares (internet browser, telnet, ...), the only problem concern
Perl.
- no, it's not a problem of a file nammed "protocol", this file is
right there where it should
- perl version and OS was recently updated
- also tested with PXPerl and Perl into Cygwin => same problem...

Is it a bug of Socket.pm ? I check but did not found any information
yet.

Thank you for any help.

 
Reply With Quote
 
 
 
 
arnaudhasard@yahoo.fr
Guest
Posts: n/a
 
      01-29-2006
As nobody seems to have the answer, i am glad to tell that i finally
found the problem.

First, i observe that it was a OS-related problem, not a perl-related
problem.

For instance, with the last version of PHP, the following command did
not produce the correct result (in this case, it should print "6") :

<> echo "<?php print getprotobyname('tcp'); ?>" | php

The fact was that some internet-programs like the google desktop search
bar or spywares destroy some reg keys corresponding to Winsock (ie the
TCP/IP stack of Windows).

As nobody seems to notice the relationship between the two, and as this
"bug" could rot the life of somebody else, i prefer to include the
solution which helped me.

See (in french) :
http://forum.hardware.fr/hardwarefr/...t-222384-1.htm
To be short, rename
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Servic es\WinSock and
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Servic es\WinSock2, and
desinstall/reinstall TCP/IP in the properties of your network card.

Solution also cross-posted there =>
http://bugs.activestate.com/show_bug.cgi?id=44288
As I firstly think it was a Perl-bug.

 
Reply With Quote
 
A. Sinan Unur
Guest
Posts: n/a
 
      01-29-2006
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote in
news:(E-Mail Removed) ups.com:

> As nobody seems to have the answer, i am glad to tell that i finally
> found the problem.


Thank you very much for posting the solution here (and choosing a
relevant subject line), so that others who might run into the same
problem can find it.

I had tried to re-create the problems on the four different
versions of Windows I have access to, and had failed to do so.

> The fact was that some internet-programs like the google desktop
> search bar or spywares destroy some reg keys corresponding to Winsock
> (ie the TCP/IP stack of Windows).


That explains it.

> See (in french) :
> http://forum.hardware.fr/hardwarefr/...t-222384-1.htm To be short,
> rename HKEY_LOCAL_MACHINE\System\CurrentControlSet\Servic es\WinSock
> and HKEY_LOCAL_MACHINE\System\CurrentControlSet\Servic es\WinSock2, and
> desinstall/reinstall TCP/IP in the properties of your network card.
>
> Solution also cross-posted there =>
> http://bugs.activestate.com/show_bug.cgi?id=44288
> As I firstly think it was a Perl-bug.


Sinan
--
A. Sinan Unur <(E-Mail Removed)>
(reverse each component and remove .invalid for email address)

comp.lang.perl.misc guidelines on the WWW:
http://mail.augustmail.com/~tadmc/cl...uidelines.html

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RE;Kontki if you delete kontiki any program you loaded with it in it 'will not work I have tried it with three programs and none work anymore (if you se it just stop download) 1-Twitch Computer Support 5 04-23-2009 02:45 PM
MS work around on text wrapping in a datagrid does not work TB ASP .Net 2 02-22-2006 10:34 PM
Hi I am new to asp i can not get it to work on xp pro sp2 even though the localhost work but asp pages dont so can some one help craig dicker ASP .Net 9 07-07-2005 11:52 AM
Re: Those cute little "WORK-SAFE" / "NOT WORK-SAFE" tags that people put in the Subject headers of their posts... Soapy Digital Photography 1 08-16-2004 12:07 PM
Re: Those cute little "WORK-SAFE" / "NOT WORK-SAFE" tags that people put in the Subject headers of their posts... Soapy Digital Photography 1 08-16-2004 06:24 AM



Advertisments