Find an snippent of my script below... 

Also, I gave full permission to script(chmod 777 scriptname.pl). Other perl program 
works with 777 though! But while connecting to database it says 'permission denied'

Is anything to do with webserver/database connectivity?

Thanks


-----------------------------------------------
#!/home/iw-home/iw-perl/bin/perl 
use CGI qw(:standard);
use DBI;
use strict;

print "Content-type: text/html\n\n";
my $dbName     = "DBI:Oracle:CSPET101.WORLD";
my $dbUserName = "userid";
my $dbPassword = "password";

#Connecting to database
my ($sql,$dbh,$dataObject);


$dbh = DBI->connect($dbName, $dbUserName, $dbPassword,
{
        PrintError =>0,
        RaiseError =>0
}) or print "Can't Connect to the database:\n $DBI::errstr\n";

$sql = "select * from GROUP_TBL";
$dataObject = $dbh->prepare($sql) or print " $DBI::errstr  SQL Error";
$dataObject->execute() or print "Error Message: Requested table(s) might not exist 
$DBI::errstr\n";

while (my @result_set=$dataObject->fetchrow_array)
{
        print "@result_set\n";
}       
-----------------------------------------------




> From: "Sterin, Ilya" <[EMAIL PROTECTED]>
> Date: 2001/04/24 Tue AM 12:10:57 EDT
> To: Prasanna Gopalakrishna <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
> Subject: RE: Netscape server/ Oracle/ Perl
> 
> The web server runs as user www or nobody (usually), so you must first
> change the excution permissions for the script (chmod 755 script_name.cgi)
> Also a snippet of your script would be helpful.
> 
> Ilya Sterin
> 
> -----Original Message-----
> From: Prasanna Gopalakrishna [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 23, 2001 4:25 PM
> To: [EMAIL PROTECTED]
> Subject: Netscape server/ Oracle/ Perl
> Sensitivity: Confidential
> 
> 
> Hi all,
> 
> I'm trying to connect oracle(8.0.3) database via Netscape Enterprise
> server(3.6) on solaris 5.7
> 
> I able to connect to database from perl program at unix prompt and not from
> the web server.
> 
> Do I need to do anything at perl program or webserver configuration
> 
> log says 'permission denied'
> 
> any suggestions?
> 
> Thanks
> 
> 
> 
> 


Reply via email to