You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Richard Kelsch <ri...@csst.net> on 2005/07/23 19:20:49 UTC

[users@httpd] Weird CGI problem in Windows XP

Hello,

I am having a bizarre problem with Apache running on my Windows
development machine.  I've been using Apache on this machine for many
months replicating an unusual production environment and until recently
it has been rock solid.

None of my Perl scripts run anymore via Apache.

Let me explain.  I've been writing simple Perl CGI scripts to run on a
local Apache service via port 8888.  Using a web browser on localhost
has been an easy way of writing friendly software with a familiar web
interface.  All of the production machines do not have the problem, but
suddenly and out of the blue my CGI scripts refused to run.  When I
click on the link to run them I get no response.  At the bottom of the
browser status bar I get a quick "loading" message and then a "Done" and
nothing has changed, as if I never clicked on the link.

Before, it would run the script and show its output.  I have many
scripts and it fails on all of them now.  It's driving me crazy.

I checked the error logs and nothing shows up just the starting up of
Apache messages.  I typed in a bogus path and that showed up in the
error logs.

So I got frustrated, uninstalled Apache and Activestate's Perl.  Cleaned
out the registry, cleaned out the directory remnants and the directories
themselves.  Restarted the machine, reinstalled Apache and Perl,
restarted the machine again.  Loaded up my Firefox browser and tried it
again.  The same doggone thing happened.  I've gone through the
configuration line by line.  Nothing is out of the ordinary.

What's going on?  I never had this trouble in my life with Apache on a
Windows machine.

I've done the usual scan for viruses, adware, etc.  The system is
clean.  It ran the scripts manually from the command line and they work
just fine.  Perl works just fine.  Yet, for some reason Perl and Apache
refuse to work together.

A few answers to possible questions:

*  Yes, the Perl binary is in the PATH variable.
*  Yes, I have a #!Perl line, even though I never needed one.
*  Yes, the Perl scripts run from a command line without troubles.   A
simple "perl [scriptname]" works fine.
*  No, nothing shows in the access nor error logs.
*  No, nothing happens when I type in manually the path to the CGI
script.  I hit enter and nothing happens.  The browser acts like it's
done after a brief second of apparent handshaking.
*  Yes, I have completely started from scratch with fresh installs of
both Perl and Apache (I even removed all traces of them before
installing anew) and recreated the configure file for Apache.  Still no
difference.
*  Yes, Apache feeds web pages, but no longer runs CGI scripts.  I have
left the default CGI settings in the configure file, in case you wanted
to know that.
*  Yes, production machines work just fine.  Something happened with my
development machine and I beg anyone for help.

I'm at a loss, and I really need to get it working again.  This mimics
my production environment so changes are not possible.  All are Windows
XP Professional machines with Apache 2.0.53 (or 54), Perl 5.8.7-813 from
ActiveState, and Firefox web browsers.  The production machines are NOT
connected to any network.   The Apache server is just a simple means to
gain an easy web browser based GUI for the Perl scripts.

Thank you ahead of time for any suggestions you can offer me.  I'm stumped.

Richard Kelsch



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Weird CGI problem in Windows XP

Posted by Richard Kelsch <ri...@csst.net>.
Joshua Slive wrote:

>On 7/23/05, Richard Kelsch <ri...@csst.net> wrote:
>  
>
>>None of my Perl scripts run anymore via Apache.
>>
>>Let me explain.  I've been writing simple Perl CGI scripts to run on a
>>local Apache service via port 8888.  Using a web browser on localhost
>>has been an easy way of writing friendly software with a familiar web
>>interface.  All of the production machines do not have the problem, but
>>suddenly and out of the blue my CGI scripts refused to run.  When I
>>click on the link to run them I get no response.  At the bottom of the
>>browser status bar I get a quick "loading" message and then a "Done" and
>>nothing has changed, as if I never clicked on the link.
>>    
>>
>
>Sounds pretty strange.  Do you have all firewalls turned off?  I can
>imagine some sneaky firewall rejecting requests for anything ending in
>.pl.
>  
>
Of course, that was the first thing I thought of, but thanks for the 
suggestion.  The Windows XP Firewall (useless as it is), I turned it off 
and repeatedly checked.  I even restarted just because it was Windows 
(you never know).  The firewall is not an issue, in fact, the exceptions 
list lists Apache as well.  Nevertheless, I turned it off to make sure.  
It doesn't matter.

>>I checked the error logs and nothing shows up just the starting up of
>>Apache messages.  I typed in a bogus path and that showed up in the
>>error logs.
>>    
>>
>
>It is very odd that nothing shows up in the logs, and leads me to
>suspect that the request is never making it to apache.  You could try
>mod_log_forensic, which logs the request much earlier in the process,
>to see if apache ever sees the request.
>  
>
Actually, I started to investigate the DNS side of things more 
thoroughly.  My Windows XP seems to be ignoring the hosts file.  It 
seems to be the cause (I would guess).  I've made sure that "lmhosts" is 
checked in the TCP/IP settings (I even turned if off, restarted, tested, 
turned it on, restarted, tested) yet hosts seems to be ignored.

I would bet this was the result of some nasty ad-ware that caused XP to 
ignore its hosts file.  I have not been able to find a cure.  I run 
"Spy-Bot Search and Destroy" and "Ad-Aware" quite regularly.  Perhaps 
they caught something more nasty than I cared to read about and just 
removed it.

Therefore, I'd say you're right about Apache not even being reached.   
Nevertheless, I did try 127.0.0.1 manually, but still no dice.

Thanks anyway for the help.

Richard Kelsch


Re: [users@httpd] Weird CGI problem in Windows XP

Posted by Octavian Rasnita <or...@fcc.ro>.
Have you installed Service Pack 2?
If yes, that's the problem.

Windows XP Service Pack 2 activates a firewall, and also use to disconnect
the computer from the network when it decides that would be good to do so,
so you need to de-activate and then re-activate the network connection from
Control panel in order to make it work again.

Even if SP2 is not installed, check if this could be the problem...

Teddy


----- Original Message ----- 
From: "Joshua Slive" <js...@gmail.com>
To: <us...@httpd.apache.org>
Sent: Monday, July 25, 2005 20:58 PM
Subject: Re: [users@httpd] Weird CGI problem in Windows XP


On 7/23/05, Richard Kelsch <ri...@csst.net> wrote:
> None of my Perl scripts run anymore via Apache.
>
> Let me explain.  I've been writing simple Perl CGI scripts to run on a
> local Apache service via port 8888.  Using a web browser on localhost
> has been an easy way of writing friendly software with a familiar web
> interface.  All of the production machines do not have the problem, but
> suddenly and out of the blue my CGI scripts refused to run.  When I
> click on the link to run them I get no response.  At the bottom of the
> browser status bar I get a quick "loading" message and then a "Done" and
> nothing has changed, as if I never clicked on the link.

Sounds pretty strange.  Do you have all firewalls turned off?  I can
imagine some sneaky firewall rejecting requests for anything ending in
.pl.

>
> I checked the error logs and nothing shows up just the starting up of
> Apache messages.  I typed in a bogus path and that showed up in the
> error logs.

It is very odd that nothing shows up in the logs, and leads me to
suspect that the request is never making it to apache.  You could try
mod_log_forensic, which logs the request much earlier in the process,
to see if apache ever sees the request.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Weird CGI problem in Windows XP

Posted by Joshua Slive <js...@gmail.com>.
On 7/23/05, Richard Kelsch <ri...@csst.net> wrote:
> None of my Perl scripts run anymore via Apache.
> 
> Let me explain.  I've been writing simple Perl CGI scripts to run on a
> local Apache service via port 8888.  Using a web browser on localhost
> has been an easy way of writing friendly software with a familiar web
> interface.  All of the production machines do not have the problem, but
> suddenly and out of the blue my CGI scripts refused to run.  When I
> click on the link to run them I get no response.  At the bottom of the
> browser status bar I get a quick "loading" message and then a "Done" and
> nothing has changed, as if I never clicked on the link.

Sounds pretty strange.  Do you have all firewalls turned off?  I can
imagine some sneaky firewall rejecting requests for anything ending in
.pl.

> 
> I checked the error logs and nothing shows up just the starting up of
> Apache messages.  I typed in a bogus path and that showed up in the
> error logs.

It is very odd that nothing shows up in the logs, and leads me to
suspect that the request is never making it to apache.  You could try
mod_log_forensic, which logs the request much earlier in the process,
to see if apache ever sees the request.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org