PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > comp.info.servers.unix > Apache w/ Perl config problem?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.info.servers.unix Web servers for UNIX platforms.

Apache w/ Perl config problem?

Réponse
 
LinkBack Outils de la discussion
Vieux 27/03/2005, 04h45   #1
ecropolan
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Apache w/ Perl config problem?


Perhaps someone will understand what is happening here. I've been
trying
to configure perl and apache on a redhat8 server with virtual hosts.
Perl
works well on the system and is executing cgi-bin scripts as well, but
the
output HTML is not being rendered by the browser on my scripts. I know
you're thinking, you're not sending the headers dummy! But please just
take a look: http://www.realtordb.com/cgi-bin/hello2.pl . Most of the
scripts I'm working with are tested and tried but I get the same text
only
output for all of them. Any ideas, suggestions, answers would be so
greatly appreciated. Surely I'm not the only one out there who has had
this problem.

The script is your basic html output.
#!/usr/local/bin/perl
# hello.cgi - My first CGI program
print "Content-Type: text/html\n\n";
print "<html> <head>\n";
print "<title>Hello, world!</title>";
print "</head>\n";
print "<body>\n";
print "<h1>Hello, world!</h1>\n";
print "</body> </html>\n";

  Réponse avec citation
Vieux 27/03/2005, 06h15   #2
Juha Laiho
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Apache w/ Perl config problem?

"ecropolan" <warren@ecropolis.com> said:
>Perhaps someone will understand what is happening here. I've been
>trying to configure perl and apache on a redhat8 server with virtual
>hosts. Perl works well on the system and is executing cgi-bin scripts
>as well, but the output HTML is not being rendered by the browser on my
>scripts. I know you're thinking, you're not sending the headers dummy!


That'd be the first guess.

>But please just take a look: http://www.realtordb.com/cgi-bin/hello2.pl .


Ok... testing:

~$ GET -sSeuU http://www.realtordb.com/cgi-bin/hello2.pl
GET http://www.realtordb.com/cgi-bin/hello2.pl
User-Agent: lwp-request/2.01

GET http://www.realtordb.com/cgi-bin/hello2.pl --> 200 Assumed OK
Client-Date: Sun, 27 Mar 2005 06:08:14 GMT
Client-Response-Num: 1

Content-Type: text/html

<html> <head>
<title>Hello, world!</title></head>
<body>
<h1>Hello, world!</h1>
</body> </html>

.... now, that is interesting. Something is creating an extra newline
after the server-generated headers, before the 'Content-Type'. I don't
see anything in your program that would cause this behaviour, so it
would look like it is something caused by your server set up.

>The script is your basic html output.
>#!/usr/local/bin/perl
># hello.cgi - My first CGI program
>print "Content-Type: text/html\n\n";
>print "<html> <head>\n";
>print "<title>Hello, world!</title>";
>print "</head>\n";
>print "<body>\n";
>print "<h1>Hello, world!</h1>\n";
>print "</body> </html>\n";


--
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)
  Réponse avec citation
Vieux 27/03/2005, 17h46   #3
ecropolan
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Apache w/ Perl config problem?

Looks like we're on to something there. I see what's happening. Now the
only question is how to fix it. Do you think it's an Apache problem or
Perl? Is there a configuration file for this type of header output?
Anyone out there have any knowledge of this?

I appreciate your taking the time to look at my problem.

  Réponse avec citation
Vieux 28/03/2005, 08h42   #4
Juha Laiho
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Apache w/ Perl config problem?

"ecropolan" <warren@ecropolis.com> said:
>Looks like we're on to something there. I see what's happening. Now the
>only question is how to fix it. Do you think it's an Apache problem or
>Perl? Is there a configuration file for this type of header output?
>Anyone out there have any knowledge of this?


It seems to me to be problem with Apache configuration -- or, with how
you've configured perl to be used with Apache. However, I can't imagine
what in configuration could cause this, as this would simply break
every CGI script in existence.

To verify, try (once more) running the exact same script from the
command line, and check that it doesn't start its output by printing out
an empty line.

You might also try to create a script of similar functionality with some
other language (say, a shell script), and invoke that through Apache
to see whether the problem applies to all CGI content regardless of
implementation language, or whether this is specific to scripts written
in Perl.
--
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)
  Réponse avec citation
Vieux 28/03/2005, 15h54   #5
ecropolan
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Apache w/ Perl config problem?

>From the command line definetley no extra space, so it's go to be an
Apache problem. I upgraded to 1.3.33, that didn't . I'm thinking of
going to a very basic build and adding mod and enableing features a
couple at a time. I don't know what else to do. Suggestions on a good
starting build. I'm thinking one of these modules I'm using has errors.
I tried stripping almost everything out of the httpd.conf file. Still
no luck.

Here's my build
mod_php4, mod_gzip, mod_throttle, mod_perl, mod_access_referer,
mod_session, mod_auth_, mod_ssl, mod_setenvif, mod_so, mod_auth,
mod_access, mod_alias, mod_userdir, mod_actions, mod_imap, mod_asis,
mod_cgi, mod_dir, mod_autoindex, mod_include, mod_info, mod_status,
mod_negotiation, mod_mime, mod_mime_magic, mod_log_config, mod_env,
http_core

Juha Laiho wrote:
> "ecropolan" <warren@ecropolis.com> said:
> >Looks like we're on to something there. I see what's happening. Now

the
> >only question is how to fix it. Do you think it's an Apache problem

or
> >Perl? Is there a configuration file for this type of header output?
> >Anyone out there have any knowledge of this?

>
> It seems to me to be problem with Apache configuration -- or, with

how
> you've configured perl to be used with Apache. However, I can't

imagine
> what in configuration could cause this, as this would simply break
> every CGI script in existence.
>
> To verify, try (once more) running the exact same script from the
> command line, and check that it doesn't start its output by printing

out
> an empty line.
>
> You might also try to create a script of similar functionality with

some
> other language (say, a shell script), and invoke that through Apache
> to see whether the problem applies to all CGI content regardless of
> implementation language, or whether this is specific to scripts

written
> in Perl.
> --
> 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)


  Réponse avec citation
Vieux 28/03/2005, 21h53   #6
T W Hu
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Apache w/ Perl config problem?

"ecropolan" <warren@ecropolis.com> wrote in ...
> >From the command line definetley no extra space, so it's go to be an

> Apache problem. I upgraded to 1.3.33, that didn't . I'm thinking of
> going to a very basic build and adding mod and enableing features a
> couple at a time. I don't know what else to do. Suggestions on a good
> starting build. I'm thinking one of these modules I'm using has errors.
> I tried stripping almost everything out of the httpd.conf file. Still
> no luck.


is the mime.types updated or messed up when you upgraded to 1.3.33?


  Réponse avec citation
Vieux 29/03/2005, 04h56   #7
ecropolan
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Apache w/ Perl config problem?

I didn't notice that it was messed up. I haven't really tested. What
would I do? I have noticed some strangeness. My admin site, which has a
php front end, when I click links that link to it Mozilla wants to
download the file. But other PHP applications I've go work just fine.
Also, I can type the link directly into the browser and it comes up
fine. The admin site is a fast-pitch setup. I'm about sick of it. It
takes more time but sometimes there's a lot of value in building things
one piece at a time! I'm about ready to start over.

T W Hu wrote:
> "ecropolan" <warren@ecropolis.com> wrote in ...
> > >From the command line definetley no extra space, so it's go to be

an
> > Apache problem. I upgraded to 1.3.33, that didn't . I'm

thinking of
> > going to a very basic build and adding mod and enableing features a
> > couple at a time. I don't know what else to do. Suggestions on a

good
> > starting build. I'm thinking one of these modules I'm using has

errors.
> > I tried stripping almost everything out of the httpd.conf file.

Still
> > no luck.

>
> is the mime.types updated or messed up when you upgraded to 1.3.33?


  Réponse avec citation
Vieux 29/03/2005, 15h05   #8
T W Hu
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Apache w/ Perl config problem?

my firefox just prints the content and it seems just plain text instead of
html.
mime.types is just my guess. you are better to install an apache without
PHP.
test your script and make sure it works before you install PHP.
you may compare your mime.types to the default one.

"ecropolan" <warren@ecropolis.com> wrote in ...
> I didn't notice that it was messed up. I haven't really tested. What
> would I do? I have noticed some strangeness. My admin site, which has a
> php front end, when I click links that link to it Mozilla wants to
> download the file. But other PHP applications I've go work just fine.
> Also, I can type the link directly into the browser and it comes up
> fine. The admin site is a fast-pitch setup. I'm about sick of it. It
> takes more time but sometimes there's a lot of value in building things
> one piece at a time! I'm about ready to start over.



  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 22h25.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,15222 seconds with 16 queries