RE: php and unixODBC

From: John Gruber (John.Gruber_at_e-hps.com)
Date: 10/13/04

  • Next message: Marco A. Ramos: "IPTables and forward"
    Date: Wed, 13 Oct 2004 11:47:07 -0500
    To: <redhat-list@redhat.com>
    
    

    Nevermind... It was an environment thing. odbcinst put its odbc.ini file
    in my home directory like it is supposed to. (for us older folks... it
    needs a man page!)

    Fixed /etc/odbc.ini to include my datasource, reloaded Apache, and it
    works great.

    Sorry to waste everyone's time.

    John
     

    -----Original Message-----
    From: John Gruber
    Sent: Wednesday, October 13, 2004 9:57 AM
    To: 'redhat-list@redhat.com'
    Subject: php and unixODBC

    I'm running Redhat ES 3 and have a problem.

    I installed the FreeTDS packages and have unixODBC setup to communicate
    to a MS SQL Server. The iSQL tool and the php CLI have no problem
    talking to my database. When I call the same php script from libphp4
    apache I get the following:

    Warning: SQL error: [unixODBC][Driver Manager]Data source name not
    found, and no default driver specified, SQL state IM002 in SQLConnect

    Mind you the php command line runs the scripts, talks to the database
    and returns my record set. I assume this is an environment thing. Can
    anyone tell me how to setup my php.ini or set environment for apache to
    be able to talk to my database? Is it not finding /etc/odbc.ini or what?

    Thanks you smart people!

    John Gruber

    -- 
    redhat-list mailing list
    unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
    https://www.redhat.com/mailman/listinfo/redhat-list
    

  • Next message: Marco A. Ramos: "IPTables and forward"

    Relevant Pages

    • Re: OT: MySQL And Native File Writes Versus Ports and TCP/IP
      ... as it didn't come from a TimeWarner email address. ... Is there a native database environment built into PHP, ... I think this is an Apache question though. ...
      (comp.lang.php)
    • Fwd: [PHP] pdo-oracle + nls_lang environment variable...
      ... pdo-oracle + nls_lang environment variable... ... Nah I checked and apache has support for both latin1 and utf8 charsets, ... I'm almost convinced it's something about php reading the NLS_LANG ... If I run the script in console (using the CLI ...
      (php.general)
    • Re: DBI connect consistently fails from one httpd worker
      ... should not use a cached environment handle if it's not usable. ... application that queries an Oracle 10.2.0.4 database. ... Unfortunately, even after the database is back up again, the apache worker ...
      (perl.dbi.users)
    • Re: 2 web servers serving same pages
      ... This is not recommended unless the PHP does not modifications to the pages or a database. ... Unless you put logic in the php code to check for simultaneous access, you're libel to get weird and unpredictable results of the two servers attempt to modify the same thing at the same time. ... Irrespective of how many apache servers are driving the database. ...
      (comp.lang.php)
    • PHP and MySQL Help!!
      ... Hi, just to get things started im new at using PHP, MySQL, and Apache, ... and we have a book by him in our database and when you hit the submit ...
      (alt.php)