<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000066">
    Hello everyone,<br>
    <br>
    I am new to using the ensembl perl API (version 63). I would really
    appreciate some help for a problem I'm having with my perl script.<br>
    <br>
    The perl script basically connects to the DB and uses the slice
    method to retrieve some information. If I run this perl script<br>
    from my terminal, it works fine, and I am able to get results from
    ensembl. However, if I call this perl script via a php script<br>
    (because I am trying to develop a web based tool), the MySQL
    connection fails. <br>
    <br>
    Error message in httpd/error_log:<br>
    <blockquote> DBI
      connect('host=ensembldb.ensembl.org;port=5306','anonymous',...)
      failed: Can't connect to MySQL server on<br>
      'ensembldb.ensembl.org' (13) at
      /var/www/cgi-bin/tll_blat/ensembl-src/ensembl/modules/Bio/EnsEMBL/Registry.pm


      line 1452<br>
      Can't call method "selectall_arrayref" on an undefined value at<br>
      /var/www/cgi-bin/tll_blat/ensembl-src/ensembl/modules/Bio/EnsEMBL/Registry.pm


      line 1455.<br>
    </blockquote>
    <br>
    I have explicitly set the location of the ensembl and perl modules
    at the top of my perl script as follows:<br>
    <blockquote>use warnings;<br>
      <br>
      use lib '/var/www/cgi-bin/tll_blat/ensembl-src/bioperl-1.2.3';<br>
      use lib '/var/www/cgi-bin/tll_blat/ensembl-src/ensembl/modules';<br>
      <br>
      use Bio::EnsEMBL::Registry;<br>
      <br>
      $registry = 'Bio::EnsEMBL::Registry';<br>
      $slice='Bio::EnsEMBL::Slice';<br>
      $gene='Bio::EnsEMBL::Gene';<br>
      <br>
      $registry->load_registry_from_db(-host =>
      'ensembldb.ensembl.org', -user => 'anonymous');<br>
      <br>
    </blockquote>
    All this works when I run it from command line, but not via the web.<br>
    Where could I be going wrong...?<br>
    <br>
    Thank you so much!<br>
    <br>
    ~ Natascha<br>
  
<br>
Information in this email is confidential and may also be privileged. It is intended solely for the person to whom it is addressed. If you are not the
intended recipient, please notify the sender, and please delete the message and any other record of it from your system immediately.
<br>
</body>
</html>