Hi Stas,
here is the google groups page that defines the
problem.
http://groups.google.com/groups?hl=enlr=lang_enie=UTF-8threadm=7j14it%248v1%241%40zonnetje.NL.netrnum=1prev=/groups%3Fnum%3D100%26hl%3Den%26lr%3Dlang_en%26ie%3DISO-8859-1%26q%3DIO%253A%253ASocket%253A%253AINET%2Bmod_perl%2BWindows%2BNT%26sa%3DN%26tab%3Dwg
Basically it says the following:
Hello.
I'm having a problem with IO::Socket::INET using
Apache mod_perl. I'm using
ModPerl 1.19,
Perl 5.005_03 and Apache 1.3.6 on my NT system. I've
included a small
sample program below that demonstrates the behaviour.
The basic problem I am having is as follows:
The first time I get the page it works correctly.
However, if I reload the page, no output is
returned.
But, by pressing reload repeatedly, I noticed that
every 5 times, it
works correctly.
As if refusing to return anything wasn't bad
enough, no error is given.
Any suggestions would be greatly appreciated.
Thanks,
Mark.
Here is the possible solution, which actually works:
I actually just found the problem this morning. It
was a server problem.
An NT thing I guess. I changed the ThreadsPerChild
setting to 1 in my
httpd.conf file.
The problem disappeared right away.
--- Stas Bekman [EMAIL PROTECTED] wrote:
Ged Haywood wrote:
Hi there,
On Thu, 7 Aug 2003, Mustafa Tan wrote:
script's name is A, and I execute the same script
20
times subsequently there is no problem. But if I
execute B after A, and then execute A again, then
I
have a problem and the problem is that there is a
socket error. This happens only on Windows
machines. I
learnt that this is a common problem and that it
is
because of threads. Making number of threads on
apache
1 solves the problem
I doubt this has anything to do with threads,
because they are serialized in
mod_perl 1.0 on windows. Do you use mod_perl 2.0?
Most likely your problem is the usual one: global
variables persist under
mod_perl and you have to reset them before using.
For more information see:
http://perl.apache.org/docs/1.0/guide/porting.html#Global_Variables_Persistence
In any case when reporting problems you should at
least copy-n-paste the exact
error. And follow the guidelines:
mp1:
http://perl.apache.org/docs/1.0/guide/help.html#How_to_Report_Problems
mp2:
http://perl.apache.org/docs/2.0/user/help/help.html#Reporting_Problems
Sorry I know prcatically nothing about running
Apache on Windows.
Seems strange to me that anyone would do it... :)
This is correct for mod_perl 1.0, because threads
are serialized to make
things thread-safe.
But this is no longer valid for mod_perl 2.0.
mod_perl 2.0 on windows should
be as good as on any other system.
Ok, here is the real question. Should I move to
5.8
and if I should, what are the general issues that
I
have to be careful about. One more thing is that,
can
I run perl 5.8 with mod_perl 1.0? Is that
possible, or
do I also have to move to mod_perl 2 and apache 2?
You can run 5.8.x with mod_perl 1.x, the issue you
will most likely
meet involves character encoding. Check the
archives of this List
for more information. Look for UTF-8 and/or
locale.
This is correct only for several RedHat linux
versions. it should be fixed in
RH9.1:
http://archive.develooper.com/[EMAIL PROTECTED]/msg97360.html
Version 2 of Apache/mod_perl might enable you to
address some of your
threading problems on Windows, hopefully others
will be able to tell
you more than I can.
73,
Ged.
--
__
Stas BekmanJAm_pH -- Just Another
mod_perl Hacker
http://stason.org/ mod_perl Guide ---
http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org
http://apacheweek.com
http://modperlbook.org http://apache.org
http://ticketmaster.com
__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com