English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Hi im trying to connect to a database using perl on dreamweaver mx, when I do so using a php page I get a http headers error and am stuck, any help will be greatly appreciated thankyou

2007-01-29 01:40:14 · 1 answers · asked by BlueIceWeb 2 in Computers & Internet Programming & Design

1 answers

Try running your perl script from the command line - check the output to make sure it starts with proper headers. You need to fix the headers anyway :-)

The simplest headers you can have would just be this -

Content-type: text/html

(followed by 2 newlines)

Here's a dummy perl script as an example:

#!/usr/bin/perl

# A sample script to generate a web page...

print "Content-type: text/html\n\n";

print "\n";
print "Sample Program\n";
print "\n";
print "Hello there!\n";
print "\n";
print "\n";

Then you need to figure out whether or not your database code is working. You're using DBI right? See the Perl DBI web site for lots of info about getting this working:

http://dbi.perl.org/

2007-01-30 06:07:16 · answer #1 · answered by Anonymous · 0 0

fedest.com, questions and answers