Loading ...
Sorry, an error occurred while loading the content.

Re: [PBML] win32 mysql and perl = cant connect..STILL

Expand Messages
  • Adrian Fischer
    Hi Guys..its me again, Well what do you know... it was a problem my end all along (go figure). Seems for some reason that I have to have the password variable
    Message 1 of 1 , Jul 2, 2001
    • 0 Attachment
      Hi Guys..its me again,

      Well what do you know... it was a problem my end all along (go figure).
      Seems for some reason that I have to have the password variable empty in my
      script to access the db on my local set up. Not sure why? Obviously I have
      done something wrong when I set it up. But at least now I can access and
      develop it offline. Hmm...how can I change my password to what it should be
      will be my next little challenge.

      Thanks anyway

      Adrian Fischer
      ----- Original Message -----
      From: "Adrian Fischer" <adrian@...>
      To: <perl-beginner@yahoogroups.com>
      Sent: Monday, July 02, 2001 4:08 PM
      Subject: [PBML] win32 mysql and perl = cant connect..STILL


      > Hi Guys,
      >
      > Ive been away for a while and was hoping htat everything would work by
      some
      > miracle when I got back but alas...it doesnt.
      >
      > I have set up my pc with activestate perl, mysql, php and apache server.
      > All four work fine and perl and and apache work fine together as does php,
      > mysql and apache but I cant get perl and mysql to work together. I can
      > access mysql ok and my php,mysql prog (using phpadmin) accesses the mysql
      db
      > that I want but not via perl. Having said that..it doesnt throw and error
      > in cnnecting to the db ( I think) so perhaps its not what I think.
      >
      > I get this error:
      > <snip>
      > Can't call method "prepare" on an undefined value at... (refering to the
      > 'prepare' statement)
      > </snip>
      > when I run this bit of code:
      > <snip>
      > $db = &dbconnect;
      > $db_query = "SELECT rewardName,rewardCity,rewardRefers FROM tblReward
      WHERE
      > rewardRefers >=1 ORDER BY rewardRefers DESC";
      > $dbh=$db->prepare($db_query);
      > $varReturnResult = $dbh->execute();
      > </snip>
      > using this connect string:
      > <snip>
      > ####CONNECT
      > sub dbconnect {
      > $db = DBI->connect($config{'connectstring'}, $config{'dbusername'},
      > $config{'dbpassword'});
      > return $db;
      > </snip>
      >
      > This same bit of code works fine on my www hosted site but not locally. I
      > thought it may have been the connect string but Ive fiddled with that to
      no
      > avail. Im stumped!!!
      >
      > Any and all ideas would be appreciated
      >
      > Thanks
      >
      > Adrian Fischer
      >
      >
      >
      >
      > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.