Re: PHP4.0.4 segfaults with odbc_pconnect

From: Date: Tue, 03 Apr 2001 03:07:55 +0000
Subject: Re: PHP4.0.4 segfaults with odbc_pconnect
References: 1  Groups: php.db php.general 
Request: Send a blank email to php-general+get-46750@lists.php.net to get a copy of this message
Daevid, connection script snipped (looked fine) > $dsn="DSN=OpenLink"; // this is a valid DSN set up in the above odbc.ini > //$conn_id = > odbc_connect("DSN=OpenLink;UID=daevid;PWD=secret","",""); > ?> > ---------------------- > > [OpenLink] > Driver = /usr/local/openlink/lib/oplodbc.so.1 > Description = Sample OpenLink DSN > Host = 10.2.3.11 > ServerType = Oracle 8.1.x > FetchBufferSize = 99 > UserName = daevid > Password = secret > Database = mydatabase > ServerOptions = > ConnectOptions = > Options = > ReadOnly = yes > Trace = 0 > TraceFile = /tmp/iodbc.trace > > [Default] > Driver = /usr/local/openlink/lib/oplodbc.so.1 > > Is "ServerType = Oracle 8.1.x" right? > I'm trying to connect to a MS SQL2000 server on a Win2k box: No, that is just a sample DSN - you will want to edit it to match your configureation or add an additional one wiht server type SQLServer 2000 Database is the sqlserver catalog, e.g. northwind, pubs, or yours. When adding a DSN, add a matching section at the top as well: [ODBC Data Sources] OpenLink = OpenLink Generic ODBC Driver //o SQLServer2k [SQLServer2k] Driver = /usr/local/openlink/lib/oplodbc.so.1 Host = 10.2.3.11 FetchBufferSize = 99 ServerType = SQLServer2000 UserName = daevid Password = secret Database = mydatabase You can add the other options as you see fit, or even override these by setting the RulesBook on the server side. Everything else looks fine. This assumes you have the server-side components of our Multi-Tier driver installed on the SQLServer box. It might be wise to add a DSN on the server using the OpenLink driver, to test you have the server-side components installed properly. If you've not yet installed them, the SQLServer agent / Request Broker components are at: http://www.openlinksw.com/software/open40/ntadmzzz.zip Checking the docs out for configuring OpenLink Drivers might not hurt either, and might have saved you time setting up your initial connection: http://www.openlinksw.com/info/docs/rel4doc/index.html > > [root=pts/2]7:35pm@content:{/usr/local/openlink/bin}> cat odbcinst.ini > [ODBC Drivers] > OpenLink Generic ODBC Driver = Installed > > [OpenLink Generic ODBC Driver] > Driver = /usr/local/openlink/lib/oplodbc.so.1 > Setup = /usr/local/openlink/lib/oplodbc.so.1 > > [root=pts/2]7:35pm@content:{/usr/local/openlink/bin}> ./odbctest > OpenLink ODBC Demonstration program > This program shows an interactive SQL processor > > Enter ODBC connect string (? shows list): ? > > DSN | Description > --------------------------------------------------------------- > OpenLink | OpenLink (MT) > > Enter ODBC connect string (? shows list): OpenLink > [iODBC][Driver Manager]Dialog failed, SQLSTATE=IM008 Syntax problem here - odbctest takes the argument "DSN=DSN_Name", not just the DSN_Name > > Have a nice day. > You obviously have the ODBCINI set properly in the environmnet, or odbctest wouldn't show your DSNs. So fix the ServerType, ensure working server-side components, and change your connection syntax for odbctest - you actually are just about there. Let me know if you need additional assistance. Best regards, Andrew --------------------------------------- Andrew Hill - OpenLink Software Director Technology Evangelism eBusiness Infrastructure Technology http://www.openlinksw.com

« previous php.general (#46750) next »