Topic
2 replies Latest Post - ‏2010-10-28T10:39:25Z by LCervantes
SystemAdmin
SystemAdmin
262 Posts
ACCEPTED ANSWER

Pinned topic ODBC error with php and apache on centos

‏2010-10-04T15:37:39Z |
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:
Date;Time;Component;ProcessID;ThreadID;
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
<EOF>

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?
Updated on 2010-10-28T10:39:25Z at 2010-10-28T10:39:25Z by LCervantes
  • LCervantes
    LCervantes
    2 Posts
    ACCEPTED ANSWER

    Re: ODBC error with php and apache on centos

    ‏2010-10-28T09:16:45Z  in response to SystemAdmin
    Hi Starocotes...
    I update to a new driver version for iSeries 7.1.0, and I have the same problems.

    You found the solutions?

    Thanks.
    • LCervantes
      LCervantes
      2 Posts
      ACCEPTED ANSWER

      Re: ODBC error with php and apache on centos

      ‏2010-10-28T10:39:25Z  in response to LCervantes
      Hi.
      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

      LCervantes