List:General Discussion« Previous MessageNext Message »
From:Vivek Khera Date:May 17 1999 2:59pm
Subject:Re: DBI WORKS PERFECTLY IN COMMANd LINE but is not working in APACHE WEBSERVER !!!
View as plain text  
>>>>> "cs" == christopher sagayam <christopher_sagx@stripped>
> writes:

cs> HELLO

cs> I HAVE WRITTEN A CODE IN PERL 5.005_56.

cs> MY CODE WORKS PERFECTLY IN COMMAND LINE (IE ) perl myprgram.PL.

NO NEED TO SHOUT.  NO NEED TO BEG FOR HELP ON THIS LIST TWICE WITHIN A 
SHORT PERIOD OF TIME.  WE ARE NOT HERE TO BE YOUR SUPPORT LINE.  WE
ARE HERE TO HELP IF YOU ASK NICELY.


cs> But I try to access it using APACHE and  it is not working.

cs> I have written lot of cgi-scripts for my company , I am quite well
cs> versed in CGI .  

Your program below just prints "error checkX".  Why not print the
actual error message you get from DBI. It might be quite enlightning.

And I can tell from your program just what the problem is, but I'm
gonna let you figure it out by using proper debugging techniques.  The 
first of which is to print useful error messages.


cs> use CGI;
cs> ------------
cs> bla bla and bla
cs> -------------------
cs> use DBI;
cs> $dbh = new DBI;
cs> # STEP 1
cs> #===============================
cs> $connect = $dbh->connect(DBI:mysql:mydatabase);
cs> print "error check1";
cs> #STEP 2
cs> #================================
cs> $sql = "SELECT mycolumnname FROM mytablename";
cs> print "error check2";
cs> #STEP 3
cs> #------------------------------------
cs> $handle = $dbh->prepare($sql);
cs> print "error check3";
cs> #STEP 4
cs> #===========================================
cs> $handle->execute();
cs> print "error check4";
cs> #STEP 5 
cs> #===========================================
cs> $var1  = $handle->bind_column(undef , /$var1);
cs> print "error check5";
cs> # STEP 6
cs> #================================================
cs> while ($handle->fetch())
cs> {
cs> print "error check6";
cs> print "$var1";
cs> }
cs> $handle->finish;
cs> $dbh->disconnect;

cs> also I am using CGI.pm.

cs> MY CODE WORKS PERFECTLY IN THE COMMAND LINE ie perl 'Myprog.pl'
cs> But If I execute it from my APACHE WEB SERVER.
cs> I get the first 2 messages (ie) errorcheck1 and errorcheck2
cs> But nothing is printed after that.( I am using netscape navigator);

cs> PLEASE HELP ME !!!

cs> I MIGHT LOSE MY JOB BECAUSE OF THIS !!!!

If you worked for me, you wouldn't be working for me anymore by now...
Thread
DBI WORKS PERFECTLY IN COMMANd LINE but is not working in APACHE WEBSERVER !!!christopher sagayam17 May
  • Re: DBI WORKS PERFECTLY IN COMMANd LINE but is not working in APACHE WEBSERVER !!!Vivek Khera17 May
  • Re: DBI WORKS PERFECTLY IN COMMANd LINE but is not working in APACHE WEBSERVER !!!Sasha Pachev17 May
  • Re: DBI WORKS PERFECTLY IN COMMANd LINE but is not working in APACHE WEBSERVER !!!Oliver Artelt17 May