f



Perl PWS Windows 98 Internal Server Error 500

Problem: Internal Server Error 500 running ActivePerl 5.8.4
810-MSWin32-86 on PWS (MS Personal Web Server) with Windows 98

I installed Perl yesterday and it successfully runs the sample test
script (located in the Perl eg subdirectory) from the MS Dos command
line prompt.

PWS is set up and running correctly. Using Microsoft article Q231998
as a guide, I used Regedit to create and then modify the .pl file in
my registry to include "c:\Perl\bin\perl.exe %s %s" in the value data
box.

I then uploaded the testing.pl file (see below) to the cgi-bin virtual
subdirectory under  http://localhost.  (The real location is
c:\inetpub\wwwroot\cgi-bin)

The testing.pl file  runs successfully from the MS dos prompt when I
enter the command "perl testing.pl" from the
c:\inetpub\wwwroot\cgi-bin directory.

I also checked the "Execute" and "Script" boxes in the virtual cgi-bin
subdirectory.

When I use PWS and enter http://localhost/cgi-bin/testing.pl in my
browser window I get "HTTP: 500 Internal Server Error."

Here is the testing.pl script from  Microsoft article Q231998:

print "HTTP/1.0 200 OK\n";
print "Content-Type: text/html\n\n";
print "<HTML>\n";
print "<HEAD>\n";
print "<TITLE>Perl Test Page</TITLE>\n";
print "</HEAD>\n";
print "<BODY>\n";
print "<H3>This is a test to see if Perl is Working</H3>\n";
print "<P>\n";
print "<H5>If you can see this, Perl is properly configured</H5>\n";
print "</BODY>\n";
print "</HTML>\n";

Note 1: Robert Young posted a very helpful message on 2/19/02. He used
a sample script that began: (only first two lines are shown)

#!/usr/bin/perl

I substituted these this line  for the first line (eliminating the
print "HTTP/1.0 200 OK\n"; line) in the testing.pl script and I still
get the Internal Server Error.

Note 2: I read on another group that the Internal Server Error I am
experiencing might be related to the shebang line. That's why I want
to make sure my test scripts are good.

Note 3: I use PWS to test asp pages created with FrontPage 2000 and I
also need to test cgi scripts.

Be assured I would be grateful for help in solving this problem.

Greg G


-- 
PLEASE NOTE: comp.infosystems.www.authoring.cgi is a
SELF-MODERATED newsgroup. aa.net and boutell.com are
NOT the originators of the articles and are NOT responsible
for their content.

HOW TO POST to comp.infosystems.www.authoring.cgi:
http://www.thinkspot.net/ciwac/howtopost.html
0
gvg
7/19/2004 4:51:48 PM
comp.authoring.cgi 612 articles. 0 followers. Chandran.Rama (1) is leader. Post Follow

7 Replies
514 Views

Similar Articles

[PageSpeed] 26

This is a follow-up note that I hope will help others. I finally got
Perl working on my computer using PWS under Windows 98 by using Steve
Brenner's cgi-lib.pl and his sample test form, simpform.htm, which
runs his test script, simple-form.cgi. Really helpful error messages
were printed out which enabled me to correct a header problem and to
delete the -Tw commands following Perl in the top line of the
simple-form.cgi script.

Greg G


-- 
PLEASE NOTE: comp.infosystems.www.authoring.cgi is a
SELF-MODERATED newsgroup. aa.net and boutell.com are
NOT the originators of the articles and are NOT responsible
for their content.

HOW TO POST to comp.infosystems.www.authoring.cgi:
http://www.thinkspot.net/ciwac/howtopost.html
0
gvg
7/20/2004 6:06:59 PM
Greg G <gvg@ccil.org> wrote:
> Really helpful error messages were printed out which enabled me to
> correct a header problem and to delete the -Tw commands following Perl
> in the top line of the simple-form.cgi script.

Why did you delete the -Tw switches?  Both of these tell you important
things about the running of the script.   -w informs you of possible
coding errors, and -T makes sure all script input is at least nominally
processed before being used.  If they were causing output, it's probably
output you should be looking at.

Why would you remove -wT?  Like yanking the battery from a defective
smoke alarm...

Tim Hammerquist


-- 
PLEASE NOTE: comp.infosystems.www.authoring.cgi is a
SELF-MODERATED newsgroup. aa.net and boutell.com are
NOT the originators of the articles and are NOT responsible
for their content.

HOW TO POST to comp.infosystems.www.authoring.cgi:
http://www.thinkspot.net/ciwac/howtopost.html
0
Tim
7/20/2004 9:17:44 PM
gvg@ccil.org (Greg G) said:
>Problem: Internal Server Error 500 running ActivePerl 5.8.4
>810-MSWin32-86 on PWS (MS Personal Web Server) with Windows 98
>
>I installed Perl yesterday and it successfully runs the sample test
>script (located in the Perl eg subdirectory) from the MS Dos command
>line prompt.

Ok.

>The testing.pl file  runs successfully from the MS dos prompt when I
>enter the command "perl testing.pl" from the
>c:\inetpub\wwwroot\cgi-bin directory.
....
>When I use PWS and enter http://localhost/cgi-bin/testing.pl in my
>browser window I get "HTTP: 500 Internal Server Error."
>
>Here is the testing.pl script from  Microsoft article Q231998:
>
>print "HTTP/1.0 200 OK\n";
>print "Content-Type: text/html\n\n";
>print "<HTML>\n";
>print "<HEAD>\n";
>print "<TITLE>Perl Test Page</TITLE>\n";
>print "</HEAD>\n";
>print "<BODY>\n";
>print "<H3>This is a test to see if Perl is Working</H3>\n";
>print "<P>\n";
>print "<H5>If you can see this, Perl is properly configured</H5>\n";
>print "</BODY>\n";
>print "</HTML>\n";

Ok. What is the reason for the error 500 as described in your web server
log. It should tell pretty much on what went wrong.

>Note 1: Robert Young posted a very helpful message on 2/19/02. He used
>a sample script that began: (only first two lines are shown)
>
>#!/usr/bin/perl
>
>I substituted these this line  for the first line (eliminating the
>print "HTTP/1.0 200 OK\n"; line) in the testing.pl script and I still
>get the Internal Server Error.

You might add the '#!'-line, but you shouldn't remove the printing of
the 'HTTP/1.0 200 OK\n'. And also seconding the other comment that
questions the sanity of removing '-Tw' - both flags are very good to
have, as they inform you about slight programming errors and potential
security problems.
-- 
Wolf  a.k.a.  Juha Laiho     Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
         PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)


-- 
PLEASE NOTE: comp.infosystems.www.authoring.cgi is a
SELF-MODERATED newsgroup. aa.net and boutell.com are
NOT the originators of the articles and are NOT responsible
for their content.

HOW TO POST to comp.infosystems.www.authoring.cgi:
http://www.thinkspot.net/ciwac/howtopost.html
0
Juha
7/21/2004 4:11:06 AM
Tim, When I ran the script with the -wT commands, an error message
came up saying something to the effect that it was "too late to run"
the T command. When I took these commands out, the script ran. Be
assured I would welcome your further comments/advice. Greg G

Tim Hammerquist <tim@vegeta.ath.cx> wrote in message news:<slrncfr2p0.8qm.tim@vegeta.saiyix>...
> Greg G <gvg@ccil.org> wrote:
> > Really helpful error messages were printed out which enabled me to
> > correct a header problem and to delete the -Tw commands following Perl
> > in the top line of the simple-form.cgi script.
> 
> Why did you delete the -Tw switches?  Both of these tell you important
> things about the running of the script.   -w informs you of possible
> coding errors, and -T makes sure all script input is at least nominally
> processed before being used.  If they were causing output, it's probably
> output you should be looking at.
> 
> Why would you remove -wT?  Like yanking the battery from a defective
> smoke alarm...
> 
> Tim Hammerquist


-- 
PLEASE NOTE: comp.infosystems.www.authoring.cgi is a
SELF-MODERATED newsgroup. aa.net and boutell.com are
NOT the originators of the articles and are NOT responsible
for their content.

HOW TO POST to comp.infosystems.www.authoring.cgi:
http://www.thinkspot.net/ciwac/howtopost.html
0
gvg
7/21/2004 5:22:49 PM
Greg G wrote:
> Tim, When I ran the script with the -wT commands, an error message
> came up saying something to the effect that it was "too late to run"
> the T command. When I took these commands out, the script ran. Be
> assured I would welcome your further comments/advice. Greg G

It's the -T which is causing your problems here, not the -w.  You can, 
and should leave the -w in place (or if running >5.6.0 you can replace 
this with "use warnings;" in your script instead).

The taint problem comes from how your script is called by PWS. What it 
actually does is to launch a perl interpreter and then pass your script 
to it.  Thus by the time the interpreter sees the -T flag it's already 
running and can't turn on taint mode.  This is in contrast to how some 
other web servers do things where the script is lanched directly and the 
first line is used to determine which interpreter to use, and which 
flags to pass when launching it.

In your case if you want to use Taint mode (always a good idea on CGI 
scripts) you need to add the -T flag to the registry key which maps the 
perl interpreter to .pl files.  So where you entered:

"c:\Perl\bin\perl.exe %s %s"

into the registry, you should try:

"c:\Perl\bin\perl.exe -T %s %s"


If you don't want to do this univesally for all .pl files you could 
create a new extension mapping of .tpl which points to the perl 
interpreter launched with -T and then simply change the extension of the 
scripts you want to run under taint mode.

Hope this helps

Simon.


-- 
PLEASE NOTE: comp.infosystems.www.authoring.cgi is a
SELF-MODERATED newsgroup. aa.net and boutell.com are
NOT the originators of the articles and are NOT responsible
for their content.

HOW TO POST to comp.infosystems.www.authoring.cgi:
http://www.thinkspot.net/ciwac/howtopost.html
0
Simon
7/22/2004 12:58:16 PM
Simon, your message and solutions are extremely helpful. Thanks so
much. I hope these message threads help other users walk the process
with as few problems as possible. Because you are so knowledgeable
about my configuration, where can I find the 500 server error logs on
my computer? Thanks again, Greg


-- 
PLEASE NOTE: comp.infosystems.www.authoring.cgi is a
SELF-MODERATED newsgroup. aa.net and boutell.com are
NOT the originators of the articles and are NOT responsible
for their content.

HOW TO POST to comp.infosystems.www.authoring.cgi:
http://www.thinkspot.net/ciwac/howtopost.html
0
gvg
7/22/2004 9:40:43 PM
Greg G wrote:
> Simon, your message and solutions are extremely helpful. Thanks so
> much. I hope these message threads help other users walk the process
> with as few problems as possible. Because you are so knowledgeable
> about my configuration, where can I find the 500 server error logs on
> my computer? Thanks again, Greg
> 

There is only one error log for PWS and all errors go to it.  The 
location will be whatever is set up in your httpd.cnf file.  I believe 
the default is for it to be under your server root in log/error.log.  If 
  you can't find it just search your machine for a file called "error.log".


-- 
PLEASE NOTE: comp.infosystems.www.authoring.cgi is a
SELF-MODERATED newsgroup. aa.net and boutell.com are
NOT the originators of the articles and are NOT responsible
for their content.

HOW TO POST to comp.infosystems.www.authoring.cgi:
http://www.thinkspot.net/ciwac/howtopost.html
0
Simon
7/23/2004 12:47:46 PM
Reply:

Similar Artilces:

CGI
For "some" of my products I get this error in the browers, and for others, they are fine. I am 90% sure that it is an HTML error, but where? (There are no messages in Qsysopr, Joblog, cgidebug. We are running V5R3.) Is there a way I could get to the HTML that is created? I am thinking that if I could see the HTML, I could open with MSN Frontpage, golive, or ???, to debug the HTML. larryg wrote: > For "some" of my products I get this error in the browers, and for > others, they are fine. > > I am 90% sure that it is an HTML error, but where? (There a...

Error 500
Hi, I am trying to pass the following and it keeps giving the same error... http://www.megamotza.com/cst_hsql.php?firstlogin=Y&abc=sysman&sql=select%20*%20from%20sysuser%20where%20companies%20LIKE'%0002%'%20AND%20usrflag%20='U'&tblname=curSysuser ....the problem is the LIKE '%0002%'. If I remove the %'s from each side of the value, no error. Anyone got any ideas Regards Doug Johnston "Doug Johnston" wrote: > Hi, > > I am trying to pass the following and it keeps giving the same error... > > http://www.megamotza.com/cst...

get http error 500 internal server error
I use win xp home edition and use Zone Alarm Pro latest version 5.5 All of a sudden one of my pc is not able to browse the internet altho it can send and receive emails. I use internet explorer V6 and everything was working fine until today. I have checked all of my settings of Zone Labs and IE is set up as trusted application. When I try to access a web site, I gete "http error 500 internal server error" message. My other PCs on my home network have no problems. Regards, Sachi from Japan One additional note: When I turn off Zone Alarm Pro, I am able to access the internet u...

Error code 500. Message: Internal Server Error.
A day ago, all of a sudden, I just started having a problem (only in Firefox (1.5.07) - NOT in Opera or IE_. When every I get to a site where where I link to an https page, I get this diagnostic: Error code 500. Message: Internal Server Error. These are two of the URLs that give me trouble: +++++++++++++++++++++++ https://www.google.com/accounts/ServiceLogin?service=mail&passive=tru... https://login.yahoo.com/config/login_verify2?.page=p1&.partner=&.intl... +++++++++++++++++++++++ I've uninstalled and reinstalled Firefox and have cleared all personal data, co...

Custom error-handling creates "500 internal server error"
Hi there, For AJAX-calls I'm buffering my output, check for errors and if an error oc= curred print a custom, json-formatted error message. If everything works as= expected, the buffered output is printed. I don't send any headers in my s= cript, but for some reason if an error occurs and my buffering's on, I get = a "500 (Internal Server Error)" as response-header. If I switch off my cust= om error-handling an the same error is thrown, PHP responds with a "200 OK"= .. How can that be? My code's this: // Suppress normal error output ini_set('display_...

500 internal server error
I can connect to mysql through mysql workbench but my php connection script doesn't work? I get the 500 internal server error. It seems like it must be mysql error because php_info.php works. Mysql workbench query worked: show databases;use conduit_earth;select * from users; Mysql@127.0.0.1:3306 Why do I get a 500 error? <?php echo '<ul>'; $db_host = "localhost"; $db_user = "root"; $db_password ="root"; $db_name = "earth"; $db_port = "3306"; $db_link = mysqli_connect($db_host.":".$port, $db_use...

[PERL] internal server error
Hello, I tried my perl scrip on my localhost and it' s OK. When i upload it on a web server with perl interprer, i have "INTERNAL SERVOR ERROR", i used chomp 755 for the files.cgi and its directory , i have the good path in the program begining . So what's the problem ? Thanks Nicolas DAOUT On Tue, 15 Jun 2004, Nicolas D wrote: > Hello, > > I tried my perl scrip on my localhost and it' s OK. > When i upload it on a web server with perl interprer, i have "INTERNAL > SERVOR ERROR", i used chomp 755 for the files.cgi and its directory , > i h...

ZendCore+FastCGI+IIS7 : Cannot embed PHP errors in response HTML. Always get 500
Hello, I am running WS2008 + IIS7 + FASTCGI + ZendCore. I have not modified the default ZendCore php.ini configuration file. Actualy, any kind of PHP error, warning or notice gives me immediately a IIS 500 Error (Internal Server Error). It is a good thing in production environnement. For debuging purposes, I want temporary to be able to see PHP warnings and errors embedded on the html page. So I have set "display_errors = On" on the ZC admin panel. But nothing changes ... I still always got error 500 on pages containing errors, warning, or notice. But I found that if I go to the ...

Intermittent Error 500 - Internal Server Error
Hi, We recently had a server crash and we have rebuilt it from scratch. We have installed Linux 2.4.21-4.ELsmp and have setup Apache 2.0.54. We currently run 5 separate instances on Tomcat, 1 instance is run on Tomcat 5.0.27 and the rest are run on Tomcat 4.1.24. The problem we are having is that intermitently (quite regularly) you get an error page - Error 500 - Internal Server Error - displaying the standard windows - Page Could Not be displayed error page. We have Error 500 pages setup for both Tomcat & Apache but it is not either of these pages we see, it is th...

xmlrpc: 500 internal server error
I wrote this little server, and a simple client remote using Tk, using the fabulous XMLRPC: #!/usr/bin/ruby require "xmlrpc/server" require 'xmms' s = XMLRPC::Server.new(8080, '172.17.0.3') s.add_handler(XMLRPC::iPIMethods("xmms"), Xmms::Remote.new) s.serve This works fabulously, however for many calls (but not all), the client gets an exception raised: RuntimeError: HTTP-Error: 500 Internal Server Error The exception is raised, but the command (e.g. prev, next, pause, play, etc.) works perfectly. I think it might have to do with return type, because fun...

Unexplained 500 Internal Server Error
Hi All, I am getting the following error when I try to navigate to my site: Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, webmaster@2unify.com and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. I've looked in the /var/log/httpd/error_log, /var/log/messages, and just about every other log file I can think of, and see n...

Tomcat
Hi, I'm running Tomcat 4.0.1. I've a simple html page which executes a jsp page upon pressing submit. I'm getting status 500 internal server error, upon pressing submit. It shows the following exception: javax.servlet.ServletException: sun/tools/javac/Main at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:484) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at...

How to get more info on internal server errors (500)?
We are using Apache 2.0.x with mod_proxy and for a specific URL we get a 500 error. I check the error and access log files and only see that there was an internal server error in the access.log file. There is no info in error.log file that helps me find out what went wrong. I was wondering how else I can get more info why the request failed. I am sure the request doesn't get reverse proxied to the destination web server and something happens inside Apache. Any help is appreciated. -Jalil On 14 Sep 2006, jalil.feghhi@gmail.com wrote in comp.infosystems.www.servers.ms-windows: > A...

Perl cgi on Windows 2003 Server fails
My well tested Perl CGI scripts will not run on my web server after moving it from Windows NT 4.0 to a brand new Windows 2003 Server. The web server software is FirstClass Server 7.1 from Open Text Corp. (http://www.opentext.com/products/firstclass/), and the web server setup is identical with the setup on NT, which should be OK. Perl version on Windows 2003 Server is 5.806. Here are some of my observations: 1. Scripts are running OK from the command prompt on the server, and the Perl installation looks OK. I've been through the more classical Perl for win32 pitfalls checks. 2. Client br...

Web resources about - Perl PWS Windows 98 Internal Server Error 500 - comp.authoring.cgi

Internal combustion engine - Wikipedia, the free encyclopedia
The internal combustion engine is an engine in which the combustion of a fuel (normally a fossil fuel ) occurs with an oxidizer (usually air) ...

Self-harm in detention centres at epidemic levels, internal documents show
Asylum seekers have swallowed insect repellent, bashed their heads on walls and doused their bodies with boiling water in a culture of self-harm ...

Asylum seekers: Self-harm in detention centres at epidemic levels, internal documents show
A culture of self-harm in Australian detention centres suggests the problem appears to have reached crisis point.

Internal politics stalls PM's vision for a republic
Turnbull wary republic push could stir up dissent in his party

How the 'Hokey Pokey' Makes a Good Internal Branding Process
... in turn, your head, backside and finally your "whole self." Now take the common "Hokey Pokey" as a simple metaphor for building your internal ...

US Attorneys General say Volkswagen has refused to turn over internal documents
The automaker is citing German privacy laws as justification for not cooperating.

Rahm Emanuel: Dangerous Internal Enemy Of Our Country
I've been on Rahm-watch since 2005 and I can't imagine there's any chance he'd resign as mayor of Chicago unless it was part of a plea deal to ...

Bernanke: Don't Worry, China's $28 Trillion Debt is an "Internal Problem"
$28 Trillion "Internal Problem" The blue ribbon award for ridiculous comment of the day goes to Ben Bernanke who dismissed China's $28 trillion ...

Newark Police Department Internal Affairs Head To Be Civilian Lawyer « CBS New York
There are some big changes on the way to the Newark Police Department.

Internal German police report stokes migrant fears
Muslim community in Cologne on edge as leaked, unofficial report links sexual attacks and robberies to immigrant population

Resources last updated: 1/28/2016 5:23:12 AM