0

We're connecting to an old AS400 database through an iSeries linux driver. Everything works fine: we can connect and query the base with no problems, but we'd like to correct this error, as it fills the log file every time the script is run:

PHP:  syntax error, unexpected '(' in /etc/php.d/odbc.ini on line 14

The ini file is included in the script using:

putenv('ODBCSYSINI=/etc');  
putenv('ODBCINI=/etc/odbc.ini');

This is the line 14 of the odbc.ini:

DefaultPackage          = A/DEFAULT(IBM),2,0,1,0,512

Any help will be greatly appreciated.

user1398498
  • 377
  • 3
  • 11
  • 1
    Hmm..seems to be right out of IBM's example...http://www-01.ibm.com/support/docview.wss?uid=nas8N1020437 Are you sure you're looking at the right odbc.ini? – Charles Jun 26 '15 at 17:12
  • 2
    Someone posted an answer about connecting from Linux to IBM i recently: http://stackoverflow.com/questions/5241267/php-linux-to-as-400-db2 Perhaps that will give you some assistance. – Buck Calabro Jun 28 '15 at 01:13
  • Thanks for the input, it helped me fix some problems in etc/odbc.ini and etc/odbcinst.ini ( it was lacking the [odbc ...] headers ). The php.d/odbc.ini error was caused by erroneus entry ( sysadmin put there the same lines as etc/odbc.ini has had instead of putting 'extension=odbc.so'). So all solved, thanks again. – user1398498 Jun 29 '15 at 10:34

0 Answers0