Re: PHP and Easysoft ODBC
| From: | Patrick Brown | Date: | Thu, 20 Jul 2000 06:39:23 +0000 |
| Subject: | Re: PHP and Easysoft ODBC | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-1315@lists.php.net to get a copy of this message | ||
I have been using PHP3 with ESOOB for about a year. I just upgraded my
install to PHP4 with ESOOB and it's working great. This is the configure
command for PHP:
'./configure' '--with-apache=../apache' '--enable-track-vars'
'--enable-magic-quotes' '--with-esoob' '--without-mysql'
I installed the ESOOC client in the default path on my Redhat server.
It sounds like you're missing the DNS on your database server. Be sure to
create a system DSN with the same name as in the odbc.ini file.
This is my connect string:
$conn = odbc_connect($dsn, $user, $pass) or die ("Unable to connect to SQL
server");
--Pat
""Jason Stechschulte"" <jpstech@nc.edu> wrote in message
news:JIEAINLPFEMCFBHFNFKMGEDGCLAA.jpstech@nc.edu...
> Our system administrator recently installed ESOOB
> and PHP4 on our servers. I'm able to use the demo
> program to connect to the database from our linux
> server. I changed the odbc.ini file to point to
> our dsn and use our username and password, and all
> is well. However, I am not nearly as Successful
> when trying the same using PHP. I am using this
> code:
>
> <?
> $link = odbc_connect("data_source_name",
> "username", "password");
> phpinfo();
> ?>
>
> the strings sent are changed here, but in the real
> program they match what is in the odbc.ini file.
> I am getting the following error:
>
> Warning: SQL error: [Easysoft ODBC (Client)]Data
> source not found and no default driver specified,
> SQL state IM002 in SQLConnect in
> /path/filename.php on line 7
>
> phpinfo() shows this as the configure command for
> php:
> './configure' '--prefix=/usr' '--with-apxs'
> '--with-mysql' '--with-esoob'
>
> In the ODBC section it gives the following
> information(path is substituting the real path):
>
> ODBC library | ESOOB
> ODBC_INCLUDE | -l/path/easysoft/oob/client/include
> ODBC_LFLAGS | -L/path/easysoft/oob/client/lib
> ODBC_LIBS | -lesoobclient
>
> I've searched for similar problems in newsgroups
> as well as the PHP mailing lists and found some
> people had to include this line into their
> programs:
>
> putenv("ODBCINI=/path/easysoft/oob/examples/odbc.i
> ni");
>
> I tried this and used the correct path to the
> odbc.ini file and got the same results. The only
> difference was that ODBCINI |
> /path/easysoft/oob/examples/odbc.ini also showed
> up in phpinfo()
>
> Does anyone have any ideas about how I can get php
> working with easysoft??
>
> Jason Stechschulte
> jpstech@nc.edu
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>