G
Goblin
Hello i have a little code for updating somethink in my SQL database.
I get the error: bash: /root/remstats.pl: /usr/bin/perl: bad interpreter:
Permission denied
Can someone tell me what's wrong? Or how i can fix that?
Greets, Bert
The code of the script:
#!/usr/bin/perl
use DBI;
use strict;
my $dbh = DBI->connect('DBI:mysql:traffic:localhost',
'trafficadmin', # user name
'TRAff200AGo', # password
{ RaiseError => 1});
if (!$dbh) { die "Cannot connect to database" }
my $query = 'update upload SET byte = 0';
my $sth = $dbh->prepare($query);
if (!$sth) { die "Illegal query: $query" };
$sth ->execute;
$sth->finish;
I get the error: bash: /root/remstats.pl: /usr/bin/perl: bad interpreter:
Permission denied
Can someone tell me what's wrong? Or how i can fix that?
Greets, Bert
The code of the script:
#!/usr/bin/perl
use DBI;
use strict;
my $dbh = DBI->connect('DBI:mysql:traffic:localhost',
'trafficadmin', # user name
'TRAff200AGo', # password
{ RaiseError => 1});
if (!$dbh) { die "Cannot connect to database" }
my $query = 'update upload SET byte = 0';
my $sth = $dbh->prepare($query);
if (!$sth) { die "Illegal query: $query" };
$sth ->execute;
$sth->finish;