in reply to Re: Malformed HTML output
in thread Malformed HTML output

Yeah, I would do that. The only problem is that I can't seem to install one module that is required for my script -- it's Chart::Plot, and every time I try to get CPAN to install it, it fails on installing the GD module, which Chart::Plot is dependent upon, so I can't run my script locally.

I did notice, though, that commenting out any three hidden text fields fixes the problem -- like the perl script doesn't like to have more than a certain number of hidden text fields. I can't imagine that there's that restriction on HTML files, so any ideas why it would refuse to print out more than a specific number of hidden text fields? It doesn't seem to matter whether I use the hidden() function or print them out manually via text.

As for checking the HTTP headers and stuff -- I don't think that would be necessary since the script works fine when first run; it just fails when the user inputs a value into the chemical element field. And since commenting out those few lines will get the HTML page to show correctly, it doesn't seem like the HTTP headers would be the problem.

Replies are listed 'Best First'.
Re: Re: Re: Malformed HTML output
by skyknight (Hermit) on Jul 24, 2003 at 19:40 UTC
    How did the install of GD fail? Did the compile fail, or did something like just one of the tests fail? If it was just some lame little test that failed then you probably got a message like "will not install without force", in which case you can go into your .cpan directory (or whatever dir you specified for building modules) and do "make install" so as to forcibly install it. Of course, if it broke at some earlier stage it may have been because you're missing some other program/library for which it is a wrapper, in which case forcing an install is decidedly not the right thing to do.
      No, it made a bunch of errors when trying to install GD. I successfully installed GD with fink, but I still can't get the CPAN installer to recognize it, so the Chart::Plot installation fails because it requires GD. Arg. Maybe you know how to fix that, too? That would be awesome.
        I just tried to install GD on a machine running Perl 5.00503, and the compiler barfed. Then I tried it on a machine running Perl 5.008 and the compiler barfed there too. I don't know how to fix this, but I can tell you what the issue most likely involves: C compiler flags. When you configure and compile perl, it makes a Config.pm file that contains the correct compiler options to use. On the former of my two above mentioned system, this file lives at the /usr/lib/perl5/5.00503/i386-linux/Config.pm location. If you do "perldoc -l Config" that will probably tell you where yours lives. You might have to tweak this. :-/
Re: Re: Re: Malformed HTML output
by mildside (Friar) on Jul 24, 2003 at 23:52 UTC
    I did notice, though, that commenting out any three hidden text fields fixes the problem -- like the perl script doesn't like to have more than a certain number of hidden text fields.
    Could it be that there is a restriction on the size or number of parameters that are being POSTed, either at the server or at your end (proxy)?
      I didn't think so, since I had had the same number of parameters before I started doing all these modifications to the code that landed me into this mess that was finally resolved (see sauoq's reply and the subsequent replies). I had actually removed a few fields that were made unnecessary after some modifications that I had made.

      Thanks for the reply, though. -- simX