Advertisement

05.24.2005 at 12:52PM PDT, ID: 21435341
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.0

WORKS ON COMMAND LINE AND NOT FROM THE WEB

Asked by micro_learner in CGI Scripting

Tags:

Hi I am new to perl CGI as you might guess with my question ...

I have a simeple CGI script that makes a Database connection and retreves the records.
When I run the script from the command line ..the html generated from the command Line works just fine,
But when I access it from the web ..the html before the actual CGI starts works but does not display the html after CGI part in the script.Am I missing something



The HTML that is visble up to
print "<font color=blue><i>Connection is being set";

after that it just does not show anything ...........

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

#!/usr/local/bin/perl -w

#
use DBI;



my $ora_host="########";
my $ora_sid="$$$";
my $ora_driver="Oracle";
my $ora_username="admin";
my $ora_password="$$$$$";
my $ora_port=1521;
my $dsn_ora="dbi:$ora_driver:host=$ora_host;sid=$ora_sid;port=$ora_port";



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

print "<html><head><title>$$$$$$$$$$$$</head>\n\n";

print "<body link=darkgreen vlink=brown>\n";
print "<br><font size=+3 color=red>\n";
print "<center>^^^^^^^^^^^^^</font><br><br><br>\n";


#initialization

$weekday=""; $isdaylight=""; $yearday="";

($sec, $min, $hr, $day, $mon, $yr, $weekday, $yearday, $isdaylight)=localtime(time);

$mon++; $yr += 1900;

print "<font color=blue><i>You filed this query on $day/0$mon/$yr at
$hr:$hr:$min:$sec \n ";
print "<i></font></center>\n";

print "<hr><br>";

print "<font color=blue><i>Connection is being set";         $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
                                                             PRINTS TILL HERE ON THE WEB PAGE

my $dbh=DBI->connect($dsn_ora,$ora_username,$ora_password)
    or die "Error : $DBI::errstr\n";

if($DBI::err){
    print "problem here \n";
}
print "<font color=blue><i>The Connection is set";



my $sth=$dbh->prepare("select * from user_profile");

$sth->execute() or die "$DBI::errstr \n";


#get data from database

#format for display

print "<center>\n";
print "<table border=1>\n";
print "<TR bgcolor=0000aa>";
print "<TD><font color=yellow><b>First Name</b></font></TD>";

print "<TR>\n";

while(($first)=$sth->fetchrow()){

print "<TR><TD>This si the $first</TD></TR>";
}

#print "$DBI::rows rows affected !\n";

$sth->finish();

$dbh->disconnect();

print "\n</table>";
print "</center>";


print "<br><br><br><hr><br><br>\n";
print "<font color=red><i>Last update by ";
print "\n</body></html>\n"
####################################################################################Start Free Trial
[+][-]05.24.2005 at 06:09PM PDT, ID: 14073990

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.25.2005 at 02:18AM PDT, ID: 14075663

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.25.2005 at 07:00AM PDT, ID: 14077370

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.25.2005 at 07:21AM PDT, ID: 14077604

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: CGI Scripting
Tags: error
Sign Up Now!
Solution Provided By: Peewee
Participating Experts: 3
Solution Grade: A
 
 
[+][-]05.25.2005 at 07:35AM PDT, ID: 14077776

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.26.2005 at 02:22AM PDT, ID: 14084252

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.30.2005 at 01:20AM PDT, ID: 14107059

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]06.25.2005 at 08:30AM PDT, ID: 14300083

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]06.26.2005 at 01:36AM PDT, ID: 14303024

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.28.2005 at 05:07AM PDT, ID: 14317253

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.28.2005 at 05:22AM PDT, ID: 14317373

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.28.2005 at 07:01AM PDT, ID: 14318309

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.28.2005 at 08:15AM PDT, ID: 14319253

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.16.2005 at 06:33AM PDT, ID: 14457504

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]07.20.2005 at 09:55AM PDT, ID: 14486701

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32