Forum Moderators: coopster & phranque

Message Too Old, No Replies

unable to run perl script in the browser when link to ODBC

         

aneza

1:45 am on May 17, 2006 (gmt 0)



I am unable to run perl script using the browser. I tried to changed the httpd.conf but still unable to figure out the problem. That script is running on the command prompt.

i check at error.log file and they wrote this :

#################################################################################################

[Tue May 16 11:09:21 2006] [error] [client 127.0.0.1] Premature end of script headers: c:/program files/apache group/apache/cgi-bin/percubaan.pl
[Tue May 16 11:09:21 2006] [error] [client 127.0.0.1] DBI connect('statistic','aneza',...) failed: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (SQL-IM002)(DBD: db_login/SQLConnect err=-1) at c:\PROGRA~1\APACHE~1\apache\cgi-bin\PERCUB~1.PL line 7

[Tue May 16 11:09:21 2006] [error] [client 127.0.0.1] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (SQL-IM002)(DBD: db_login/SQLConnect err=-1)

#################################################################################################

could any one tell me what to do? i can't settle this problem for 2 weeks..=(

thanx..

vincevincevince

8:02 am on May 18, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



When running the script it must output proper headers first - before ANYTHING else, e.g. Content-type: text/html

If you are getting database errors before your content is output then that may be causing the problem.

KevinADC

6:10 pm on May 18, 2006 (gmt 0)

10+ Year Member



This thread should be closed as the problem was solved on another forum a couple of days ago.