Problem with Apache Web Server
Rick Rosinski
rick@rickrosinski.com
Tue, 11 Apr 2000 17:28:23 -0700
Here is the error message from error_log.
[Sun Apr 9 16:29:15 2000] [error] [client 127.0.0.1] malformed
header from script. Bad header=An error occurred while perfor: /data/webmaster/homesite/cgi-bin/contents.cgi
I have already tried the full path name (instead of ../), and I have tried the
permissions (chmod 666 contents.list). Those didn't work out.
Normally, the contents.list is read (so, I would use open
"</data.files/contents.cgi). I gave the ">>/data.files/contents.list" because
I want to be able to write new stuff to the file (such as Add A Link on my
hosted site).
I don't understand the "bad header", especially if this script works on the
virtual hosting service, which also runs on Apache.
And, I did trie the open ... || die ...; It just generates the error message
with the quotation after die, and tells which line in the script caused the
error.
Any ideas?
On Sun, 09 Apr 2000, you wrote:
> One other thing, if it is the open function that is causing your request to fail,
> try this:
>
> open(FILE, ">>../data.files/contents.list") || die "Can't open file handle: $!";
>
> The || die ("reason") will cause standard error to be written and if you have
> httpd.conf setup correctly, this should write to the error log along with the reason
> why it failed, and the line number of the script that caused the failure.
>
> Hope it helps,
> Mike Cantrell
>
> >
> > Rick Rosinski wrote:
> >
> > > I am running a stand-alone web server on my Slackware box.
> > > I use it to set up my web site before uploading it to a virtual host.
> > > The problem that I have is with the perl script that generates the table of
> > > contents for the left frame of my web site (http://www.rickrosinski.com)
> > > The copy on the virtual host works fine, but the same script generates an
> > > internal server error, and the table of contents is not generated. This was
> > > not a problem on the SuSE system that I once had set up on the same box.
> > > I had narrowed the problem down to this: It seems that when any "open (FILE,
> > > ">>../data.files/contents.list") is encountered, it crashes with the Internal
> > > Server Error. I am running as root, all file permissions seem correct, and the
> > > same scripts work fine on the virtual server. Also, all scripts that don't
> > > involve file access work fine on the local server. I am using Apache 1.3.12.
> > > Also, when I just run "perl /cgi-bin/contents.cgi", the correct HTML is
> > > generated, including the table of contents from "../data.files/contents.list".
> > >
> > > So, I think that there is a problem with Apache and file access. Perl works
> > > fine, and the virtual host works fine. What could be wrong with Apache?
> > >
> > > --
> > > Rick Rosinski
> > > http://www.rickrosinski.com
> > > rick@rickrosinski.com
> > >
> > > _______________________________________________
> > > Plug-discuss mailing list - Plug-discuss@lists.PLUG.phoenix.az.us
> > > http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
> >
> > _______________________________________________
> > Plug-discuss mailing list - Plug-discuss@lists.PLUG.phoenix.az.us
> > http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>
>
> _______________________________________________
> Plug-discuss mailing list - Plug-discuss@lists.PLUG.phoenix.az.us
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
--
Rick Rosinski
http://rickrosinski.com
rick@rickrosinski.com