Fatal error: Call to undefined function using ODBC on a Red Hat Enterprise 4 Server

We are trying to set up PHP/Apache on a Red Hat Enterprise 4 server to connect via ODBC to a Progress V10 database on an AIX server.  I can successfully run a PHP test page from the command line and get successful results.  When I run the same page through the browser I get the following error in the Apache log:

[client x.x.x.x] PHP Fatal error:  Call to undefined function:  
odbc_connect() in /var/www/html/bgtest2.php on line 15

Versions we are running:
php-4.3.9-3.8
php-mysql-4.3.9-3.8
php-pear-4.3.9-3.8
php-odbc-4.3.9-3.8
httpd-2.0.52

We have compiled it with and without mySQL support.  Ideally, we would like to connect to both mySQL and Progress but I can work aound not having mySQL if that is an issue.

Any help would be greatly appreciated.
bsg999Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

gamebitsCommented:
Make sure you define the connection parameter in the odbc_connect() function

From http://ca.php.net/odbc_connect


resource odbc_connect ( string dsn, string user, string password [, int cursor_type] )


Returns an ODBC connection id or 0 (FALSE) on error.

The connection id returned by this functions is needed by other ODBC functions. You can have multiple connections open at once as long as they either use different db or different credentials. The optional fourth parameter sets the type of cursor to be used for this connection. This parameter is not normally needed, but can be useful for working around problems with some ODBC drivers.

Gamebits
0
bsg999Author Commented:
The connection parameters are correct . I get sucessful results when I run "php /var/www/html/bgtest2.php" from the command line.  The error occrs when I attemp to load the page in the browser using the apache web server.
0
gamebitsCommented:
Did you compile php with ODBC support?

Gamebits
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
bsg999Author Commented:
Yes.  If there was a path problem or any other problem with the compile would it work from the command line?  I had first suspected a problem with the compile with ODBC support but the fact that it worked from the command line pointed me in a different direction.  I am using the Merant ODBC driver provided with Progress's SQL Client Access product.  Is it worth trying iodbc?
0
gamebitsCommented:
Yes, i think it's worth it.

Gamebits
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.