Edit PHP configure command

Hello!
This is my scenario: When running phpinfo(); on any of my ibays, in the section “configure command” i see an option there i have to change:
’–without-unixODBC’
In fact, I’ve successfully installed and configured on the system freedts and unixodbc for connect to a MSSQL DSN.

[root@nethserver ~]# isql -v <DSN> <user> <pwd>
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+

So it seems working, but i’d have to connect to this DSN by a PHP web app, and can’t do this with --whithout-unixODBC in PHP config.
Can someone help me?

Thanks!
Mike

I can’t understand what you’re tying to achieve.
Please do not post the solution, but the problem :wink:

What do you want to do?
Access an ODBC resource from a PHP script?

Correct Giacomo.
When I try to access an ODBC resource from a PHP script i get:

Fatal error: Call to undefined function odbc_exec()

Also, function_exists(‘odbc_exec’); and function_exists(‘odbc_connect’); returns both false.

Just install the relevant rpm and restart Apache:

yum install php-odbc
service httpd restart

I had already installed.
But:

yum remove php-odbc
service httpd restart
yum install php-odbc
service httpd restart

does the trick and worked for me.
Thank you Giacomo! :wink:

1 Like