Recently a friend ran into this issue. One way to correct this issue is to set the i5_libl option on the db2 connection options (http://php.net/manual/en/function.db2-connect.php). Another way to do this is by changing the job description associated with the IBM i user profile by using the command CHGJOBD in a 5250 session. You would set the INLLIBL to LIBL (library list) you want to use. Then assign the jobd
(job description) to user profile your connecting with DB2_connect or Zend_DB and the ibmdb2 adapter.

For example:

CHGJOBD JOBD(MYJOBD) INLLIBL(&MYLIB &ANOTHERLIB)

Then associate this jobd with the user profile

To Debug the issue there are a few DB2 for i services you can call from PHP via SQL and they are:

Get the libary list information
SELECT * FROM QSYS2.LIBRARY_LIST_INFO;
Get the jobd of the current user and the current user name
SELECT a.JOBD,CURRENT USER FROM QSYS2.USER_INFO a WHERE AUTHORIZATION_NAME = CURRENT USER;
Get Job log information
SELECT * FROM table(QSYS2.JOBLOG_INFO('*')) a;
Get Even more info from the Special Registers
SELECT CURRENT CLIENT_ACCTNG AS ACCOUNTINGSTRINGSPCREG,
CURRENT CLIENT_APPLNAME AS APPLICATIONNAMESPCREG,
CURRENT CLIENT_PROGRAMID AS CLIENTPROGRAMIDSPCREG,
CURRENT CLIENT_USERID AS CLIENTUSERIDSPCREG,
CURRENT CLIENT_WRKSTNNAME AS WORKSTATIONNAMESPCREG,
CURRENT_DATE AS CURRENTDATESPCREG,
CURRENT DEBUG MODE AS DEBUGMODESPCREG,
CURRENT DECFLOAT ROUNDING MODE AS DECROUNDINGMODESPCREG,
CURRENT DEGREE AS DEGREEOFIOOFSMPSPCREG,
CURRENT_PATH AS PATHFORUNQUALIFIEDNAMESSPCREG,
CURRENT_SCHEMA AS CURRENTSCHEMASPCREG,
CURRENT_SERVER AS CURRENTSERVERSPCREG,
CURRENT_TIME AS CURRENTTIMESPCREG,
CURRENT_TIMESTAMP AS CURRENTTIMESTAMPSPCREG,
CURRENT_TIMEZONE AS CURRENTTIMEZONESPCREG,
SESSION_USER AS SESSIONUSRSPCREG,
USER AS USERVALUESPCREG,
SYSTEM_USER AS SYSTEMUSERSPCREG
FROM SYSIBM.SYSDUMMY1;
CL only available in 5250 or ACS
CHGSYSLIBL
CHGSYSVAL QSYSLIBL or QUSRLIBL
ADDLIBLE LIB(MYLIB) POSITION(*LAST)
RMVLIBLE
EDTLIBL
CHGCURLIB
CHGLIBL LIBL(MYLIB QGPL QTEMP)