in reply to problem loading ipx files

Sorry I didn't include more details. Here is the bulk of show_ipx.pl:
my $sth = $dbh->prepare(qq(SELECT tripdata, tripmimetype FROM vacation +_files WHERE id=?)); $sth->execute($id); $sth->bind_columns(\$tripdata, \$tripmimetype); $sth->fetch(); $sth->finish(); $dbh->disconnect; $tripmimetype = ($tripmimetype eq "application/octet-stream") ? 'appli +cation/x-ipix' : $tripmimetype; print "Content-type: $tripmimetype\n"; print $tripdata; exit;
I checked and is printing out the correct mime type.
When I insert it into the database it gets the mime type of application/octet-stream for some reason.
Thats why I'm changing it when pulling it back out.

Thanks again

Replies are listed 'Best First'.
Re^2: problem loading ipx files
by Anonymous Monk on Dec 17, 2004 at 03:49 UTC
Re^2: problem loading ipx files
by Thilosophy (Curate) on Dec 17, 2004 at 11:09 UTC
    print "Content-type: $tripmimetype\n";
    A CGI Header needs to end with two newlines (not one). This could be your problem. Can you open your show_ipx.pl in a browser? It should display a download dialog or something like that. Or does it show an error? If so, can you check the web server error log? If the second \n is missing you would see an "incomplete headers" message.