Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Why does my CGI website look different on a webserver?

by jhill (Novice)
on Apr 29, 2004 at 10:23 UTC ( #349073=perlquestion: print w/ replies, xml ) Need Help??
jhill has asked for the wisdom of the Perl Monks concerning the following question:

I have been developing a website using CGI.pm on my local machine and am happy with the way it looks. Why then, when it is uploaded to a web host does it display differently even through the same browser (Mozilla)? More specifically it is the table sizes that have all changed. I have also noted that IE only displays the site correctly when CGI::Pretty is not used.

Comment on Why does my CGI website look different on a webserver?
Re: Why does my CGI website look different on a webserver?
by gellyfish (Monsignor) on Apr 29, 2004 at 10:31 UTC

    Have you checked that the HTML is the same? It could be that a different version of CGI.pm is emitting different HTML. If you are using a hosting provider that likes to stick a banner ad or otherwise monkey around your HTML that could well be it too.

    /J\

Re: Why does my CGI website look different on a webserver?
by Anneq (Vicar) on Apr 29, 2004 at 10:38 UTC

    Take a look at the page sources from the local and the remote server. That may give you a clue as to what the differences are and how to minimize them. In particular, pay attention to the first line, specifying the DOCTYPE. This was the culprit when I experienced the same problem as you.

    Anne

Re: Why does my CGI website look different on a webserver?
by z3d (Scribe) on Apr 29, 2004 at 14:22 UTC
    Have you confirmed you're using the same version of the CGI module as the server? I had the same situation once and it turned out my CGI:: locally was far newer than at my host's site - CGI.pm, despite the myth, does change over time, and its handling and formatting changes as well (cookie support alone has changed a lot in the last year or three).



    "I have never written bad code. There are merely unanticipated features."
Re: Why does my CGI website look different on a webserver?
by OhReally (Monk) on Apr 30, 2004 at 04:08 UTC
    Last time I had that problem it was due to invalid HTML. Try validating your HTML and you may find some missing or malformed tags.

    I know it is strange that it didnt appear previously but I believe it was due to browsers these days using quirks mode in different circumstances.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://349073]
Approved by matija
Front-paged by biosysadmin
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (9)
As of 2014-09-22 20:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (198 votes), past polls