Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / Ingres Topics / May 2005

Tip: Looking for answers? Try searching our database.

Strange problem with PHP and Ingres R3.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Arild Saether - 19 May 2005 16:06 GMT
Hi,

I am trying to connect an Ingres web server to Ingres R3 via ODBC. Works
fine. Almost. I get Net and ODBC working via isql (also both netutil and
iiodbcadmn report back fine when testing the connection), but I get this
error from the Apache error_log:

PHP Warning:  odbc_connect() [<a
href='function.odbc-connect'>function.odbc-connect</a>]: SQL error:
[unixODBC][Driver Manager]Can't open lib
'/opt/CA/IngresII/ingres/lib/libiiodbcdriver.1.so' : libq.1.so: cannot
open shared object file: No such file or directory, SQL state 01000 in
SQLConnect in /var/www/html/odbc/index.php on line 3

The strange bit: libiiodbcdriver.1.so and libq.1.so reside in the same
directory. LD_LIBRARY_PATH seems to help Apache/PHP find the former, and
I would assume it would also help it find the latter. But no dice.
However, on a similar box running Windows/Apache/PHP, there are no
problems. So I am vaguely guessing that there is some sort of environment
variable I need to pass on. But searching the web has not helped much. And
so I turn to the experts.

I am running Ingres R3 on a Red Hat Enterprise Linux 3 server and Apache
2.0.52-3.1 with PHP 5.0.4-10 and all the required Ingres trimmings
(rpm-based net/odbc etc - no dbms) on a Fedora 3 machine.

Best regards,

Arild
grant - 19 May 2005 16:25 GMT
Hi Arild

you normally need to have the following defined in the script that
starts up apache.

II_SYSTEM
LD_LIBRARY_PATH
ODBCSYSINI

if you are using pre-configured DSNs then you also need
ODBCINI

in apache's configuration file (i am not familar with Fedora/RH config
layout) you will need to PassEnv  the above variables. Make sure
mod_env is being loaded otherwise that will fail.

I am trying to get PHP to build against the Ingres ODBC/CLI removing
the need to use unixODBC. That however it is proving tricky at the
moment.

regards

grant
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.