Frank Pineiro wrote:

Hi Guys,



I need some help.

All I want is create php cli scripts to access both a Progress DB and a MySQL DB.



I first configure php



>./configure

>make

>make install



but when try to use a odbc related function I get



<b>Fatal error</b>: Call to undefined function: odbc_connect() in <b>/dlc/odbc/connect.php</b> on line <b>7</b><br />



then I tried different options



./configure --with-custom-odbc=/usr/dlc/odbc --without-mysql

./configure --with-custom-odbc=/usr/dlc/odbc --with-mysql

./configure --with-custom-odbc --with-mysql

./configure --with-odbc=/usr/dlc/odbc --without-mysql



but when i do make I get the following type of errors

/usr/local/src/php-4.3.4/ext/odbc/php_odbc.c:3604: invalid type argument of `->'
/usr/local/src/php-4.3.4/ext/odbc/php_odbc.c:3605: `SWORD' undeclared (first use in this function)
/usr/local/src/php-4.3.4/ext/odbc/php_odbc.c:3605: `SQL_NTS' undeclared (first use in this function)
/usr/local/src/php-4.3.4/ext/odbc/php_odbc.c:3611: warning: passing arg 1 of `_efree' makes pointer from integer without a cast


and the error if I try to run the script is the same one.



can you please help? I've been playing with this for over 2 days now.

Frank,

A few points which may help.

It may be my ignorance, but do you mean Postgres rather than Progress? If so then I suggest using the --with-pgsql compile option.

If it is ODBC you need, then as you are on unix the manual says to compile with the --with-unixodbc=[DIR] option, unless you have a custom ODBC driver.

Does doing a "php phpinfo.php" (where phpinfo.php contains "<?php phpinfo(); ?>" show the compile options you used? Possibly it is not the PHP you compiled that is being used. Does the php returned by "which php" have the right timestamp for your compiled version?

Regards

Chris

Reply via email to