I do have a very strange problem on centos and don't know what to do.
I set up iSeries Access for Linux and evreything works fine. I got to the point where I even can connect via php, but only if I start php on the command line. As soon as I try to run the exact same script via apache I got the following error:
Mon Oct 04 17:26:45 2010 error http://client x.x.x.x PHP Warning: odbc_connect() : SQL error: unixODBCIBMiSeries Access ODBC DriverCommunication link failure. comm rc=10013 - CWBCO1003 - Sockets error, function returned 10013, ISERIES, SQL state 08S01 in SQLConnect in myscriptpath on line 34
odbc.ini and all the configuration in .iSeriesAccess/ is exact the same for both root and the user that runs apache. I even tried 'su' to the user that runs apache und there the script works too if I call it on the command line.
Switching on trace with cwbtrc didn't result in anything. This is the output I got:
04.10.2010;16:39:20.327;Communication;3210;-1208412480;I - Version 5 Release 4 Stufe 0;apache
04.10.2010;16:39:20.328;Communication;3210;-1208412480;I - CWBTRC;apache
And that's all.
I do have a server with SuSE Enterprise Linux that runs fine.
Anybody any idea how to further debug this problem?
This topic has been locked.
2 replies Latest Post - 2010-10-28T10:39:25Z by LCervantes
Pinned topic ODBC error with php and apache on centos
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2010-10-28T10:39:25Z at 2010-10-28T10:39:25Z by LCervantes
LCervantes 0600004MN82 Posts
LCervantes 0600004MN82 PostsACCEPTED ANSWER
Re: ODBC error with php and apache on centos2010-10-28T10:39:25Z in response to LCervantesHi.
I found the solutions.
The problem is posible that you have a SELINUX active.
If you see the logs of selinux, tell you what is happening and blocking the connection.
Its posible that you have to execute this command.
setsebool -P httpd_can_network_connect = 1