Results 1 to 3 of 3

Thread: sybase odbc php

  1. #1
    Join Date
    Oct 2003

    Unanswered: sybase odbc php


    I'm having problems with sybase, odbc and php.

    I'm getting the following error:
    Warning: odbc_connect(): SQL error: [unixODBC][Driver Manager]Data source name not found, and no default driver specified, SQL state IM002 in SQLConnect in /home/virtual/site1/fst/var/www/database_sybase.php on line 23

    The database server is up and running i can ping it.

    I used to be able to connect to the database via php, but it has stopped working

    In PHP i set the env variable ODBCINI to /home/.odbc.ini and that used to work. Now it seems it's not seeing the ini file.

    I'm used to using the built in sybase driver manager, is there another location where unixODBC information should be stored? and are there other env variables I need to set for unixODBC.

    any help is appreciated.

  2. #2
    Join Date
    Oct 2003
    i can connect to the sybase database using

    does anyone know the format and ini file names that unixODBC is looking for?

    does anyone know how to get php to use the Sybase odbc instead of unixODBC, without uninstalling unixODBC?

    I recompiled php and didn't include unixODBC but that didnt help.

  3. #3
    Join Date
    Oct 2003
    i know sybase odbc and php info on the internet is hard to come by.

    I fixed my problem, if anyone has a similar problem this could be because httpd was starting before Sybase and the proper env variables werent set in PHP.

    So set the variables before starting httpd

    . /opt/sybase/SYBSsa8/bin/
    /etc/rc.d/init.d/httpd restart

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts