Informix + PHP + Apache + Linux (SQLCODE=-25553)
Posted in 2004
PHP's ifx_connect() under Apache on Linux failed with SQLCODE -25553 (sqlhosts not found/unreadable). Replies pointed to file permissions and the INFORMIXSQLHOSTS setting; the poster found the Apache user (wwwrun) couldn't read sqlhosts, and granting group read access fixed it. A follow-on error -25560 was caused by Apache lacking the Informix environment; the fix was to set and export INFORMIXDIR, INFORMIXSERVER, INFORMIXSQLHOSTS, PATH and LD_LIBRARY_PATH (lib, lib/esql) in the Apache startup script. Resolved.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Installation, Setup & Upgrades, Error Codes & Troubleshooting, Platform-Specific Issues
Hallo everybody, we installed Informix on linux and everything worked find. Than we compiled the php packages and there where no errors. Apache started up and php is runnung well. Whenn i tried to use the funktion ifx_connect(db@ifx_svr,"name","pass") we get an error: [SQLSTATE=IX 000 SQLCODE=-25553]. We have seen the postet massages here about this topic but nothing helps. All envirement Variables were set in System (INFORMIXSERVER, INFORMIXDIR) and Apache as well. We use Informix in the File System, so not with RAW devices. Informix is a user at this system and wwwrun as well. So wwwrun is a member of the informix group. May i missed a thing?! May anybody had an idea what we have forgotten at this time or an Step by Step documentation how to install php, apache and informix on a linux system? Thank you for your help
Marconus wrote: > Hallo everybody, > > we installed Informix on linux and everything worked find. > > Than we compiled the php packages and there where no errors. Apache > started up and php is runnung well. > > Whenn i tried to use the funktion > ifx_connect(db@ifx_svr,"name","pass") we get an error: [SQLSTATE=IX > 000 SQLCODE=-25553]. We have seen the postet massages here about this > topic but nothing helps. All envirement Variables were set in System > (INFORMIXSERVER, INFORMIXDIR) and Apache as well. > > We use Informix in the File System, so not with RAW devices. Informix > is a user at this system and wwwrun as well. So wwwrun is a member of > the informix group. May i missed a thing?! Probably: -25553 Sqlhosts file not found or cannot be opened. The sqlhosts file is required to determine information to establish connection to a local or remote server. Create an sqlhosts file in the directory $INFORMIXDIR/etc according to the format that the manual for your database server product describes. Are you sure you have INFORMIXSQLHOSTS defined in the Apache environment? Does the Apache user have access to that file? If it isn't defined it looks for in the mentioned $INFORMIXDIR/etc Regards.
If you've got this far then I doubt it's an install problem, most likely a startup environment or file permissions, does sqlhosts exist where INFORMIXSQLHOSTS says it does, AFAIK INFORMIXSQLHOSTS is a full path and not an offset from $INFORMIXDIR JLeffler did a good guide to the install, it can be found via google or a copy is at www.oninit.com/reference/ Marconus wrote: > > Hallo everybody, > > we installed Informix on linux and everything worked find. > > Than we compiled the php packages and there where no errors. Apache > started up and php is runnung well. > > Whenn i tried to use the funktion > ifx_connect(db@ifx_svr,"name","pass") we get an error: [SQLSTATE=IX > 000 SQLCODE=-25553]. We have seen the postet massages here about this > topic but nothing helps. All envirement Variables were set in System > (INFORMIXSERVER, INFORMIXDIR) and Apache as well. > > We use Informix in the File System, so not with RAW devices. Informix > is a user at this system and wwwrun as well. So wwwrun is a member of > the informix group. May i missed a thing?! > > May anybody had an idea what we have forgotten at this time or an Step > by Step documentation how to install php, apache and informix on a > linux system? > > Thank you for your help -- Paul Watson # Oninit Ltd # Growing old is mandatory Tel: +44 1436 672201 # Growing up is optional Fax: +44 1436 678693 # Mob: +44 7818 003457 # www.oninit.com #
Thank you all, for your advices. The webpage (oninit.com) is really good. The problem where the rights of the wwwrun user. This user can't read the sqlhosts file, so we set the group rights for reading this file and everything worked. But than we get another Error [SQLSTATE=IX 000 SQLCODE=-25560]. I think the wwwrun(Apache) don't has the System Environment of the informix user. So we logged in as Informix and than we logged in as root with the system Environment of the Informix user an restart the apache an everything works fine (connection established). So the problem now is to give the wwwrun the same System Environment (exspecially : INFORMIXDIR/INFORMIXSQLHOSTS/INFORMIXSERVER). So how can we do that? Paul Watson <paul@oninit.com> wrote in message news:<40338C36.2425AC73@oninit.com>... > If you've got this far then I doubt it's an install problem, most > likely a startup environment or file permissions, does sqlhosts > exist where INFORMIXSQLHOSTS says it does, AFAIK INFORMIXSQLHOSTS > is a full path and not an offset from $INFORMIXDIR > > JLeffler did a good guide to the install, it can be found via google > or a copy is at www.oninit.com/reference/ > > Marconus wrote: > > > > Hallo everybody, > > > > we installed Informix on linux and everything worked find. > > > > Than we compiled the php packages and there where no errors. Apache > > started up and php is runnung well. > > > > Whenn i tried to use the funktion > > ifx_connect(db@ifx_svr,"name","pass") we get an error: [SQLSTATE=IX > > 000 SQLCODE=-25553]. We have seen the postet massages here about this > > topic but nothing helps. All envirement Variables were set in System > > (INFORMIXSERVER, INFORMIXDIR) and Apache as well. > > > > We use Informix in the File System, so not with RAW devices. Informix > > is a user at this system and wwwrun as well. So wwwrun is a member of > > the informix group. May i missed a thing?! > > > > May anybody had an idea what we have forgotten at this time or an Step > > by Step documentation how to install php, apache and informix on a > > linux system? > > > > Thank you for your help
In your apache startup script just set and export your informix environment, you'll need INFORMIXDIR, INFORMIXDIR/bin on the path, INFORMIXDIR/lib (and maybe INFORMIXDIR/lib/esql) on LD_LIBRARY_PATH, INFORMIXSQLHOSTS, if you are using the webblade you will need MI_WEBCONFIG Marconus wrote: > > Thank you all, > > for your advices. The webpage (oninit.com) is really good. > The problem where the rights of the wwwrun user. This user can't read > the sqlhosts file, so we set the group rights for reading this file > and everything worked. > > But than we get another Error [SQLSTATE=IX 000 SQLCODE=-25560]. I > think the wwwrun(Apache) don't has the System Environment of the > informix user. So we logged in as Informix and than we logged in as > root with the system Environment of the Informix user an restart the > apache an everything works fine (connection established). > > So the problem now is to give the wwwrun the same System Environment > (exspecially : INFORMIXDIR/INFORMIXSQLHOSTS/INFORMIXSERVER). So how > can we do that? > > Paul Watson <paul@oninit.com> wrote in message news:<40338C36.2425AC73@oninit.com>... > > If you've got this far then I doubt it's an install problem, most > > likely a startup environment or file permissions, does sqlhosts > > exist where INFORMIXSQLHOSTS says it does, AFAIK INFORMIXSQLHOSTS > > is a full path and not an offset from $INFORMIXDIR > > > > JLeffler did a good guide to the install, it can be found via google > > or a copy is at www.oninit.com/reference/ > > > > Marconus wrote: > > > > > > Hallo everybody, > > > > > > we installed Informix on linux and everything worked find. > > > > > > Than we compiled the php packages and there where no errors. Apache > > > started up and php is runnung well. > > > > > > Whenn i tried to use the funktion > > > ifx_connect(db@ifx_svr,"name","pass") we get an error: [SQLSTATE=IX > > > 000 SQLCODE=-25553]. We have seen the postet massages here about this > > > topic but nothing helps. All envirement Variables were set in System > > > (INFORMIXSERVER, INFORMIXDIR) and Apache as well. > > > > > > We use Informix in the File System, so not with RAW devices. Informix > > > is a user at this system and wwwrun as well. So wwwrun is a member of > > > the informix group. May i missed a thing?! > > > > > > May anybody had an idea what we have forgotten at this time or an Step > > > by Step documentation how to install php, apache and informix on a > > > linux system? > > > > > > Thank you for your help -- Paul Watson # Oninit Ltd # Growing old is mandatory Tel: +44 1436 672201 # Growing up is optional Fax: +44 1436 678693 # Mob: +44 7818 003457 # www.oninit.com #
Thanks a lot, that fixed our secound Problem. Now we have a stable connection to the Informix Database. Paul Watson <paul@oninit.com> wrote in message news:<4034736B.72A51DA5@oninit.com>... > In your apache startup script just set and export your informix > environment, you'll need INFORMIXDIR, INFORMIXDIR/bin on the path, > INFORMIXDIR/lib (and maybe INFORMIXDIR/lib/esql) on LD_LIBRARY_PATH, > INFORMIXSQLHOSTS, if you are using the webblade you will need > MI_WEBCONFIG > > Marconus wrote: > > > > Thank you all, > > > > for your advices. The webpage (oninit.com) is really good. > > The problem where the rights of the wwwrun user. This user can't read > > the sqlhosts file, so we set the group rights for reading this file > > and everything worked. > > > > But than we get another Error [SQLSTATE=IX 000 SQLCODE=-25560]. I > > think the wwwrun(Apache) don't has the System Environment of the > > informix user. So we logged in as Informix and than we logged in as > > root with the system Environment of the Informix user an restart the > > apache an everything works fine (connection established). > > > > So the problem now is to give the wwwrun the same System Environment > > (exspecially : INFORMIXDIR/INFORMIXSQLHOSTS/INFORMIXSERVER). So how > > can we do that? > > > > Paul Watson <paul@oninit.com> wrote in message news:<40338C36.2425AC73@oninit.com>... > > > If you've got this far then I doubt it's an install problem, most > > > likely a startup environment or file permissions, does sqlhosts > > > exist where INFORMIXSQLHOSTS says it does, AFAIK INFORMIXSQLHOSTS > > > is a full path and not an offset from $INFORMIXDIR > > > > > > JLeffler did a good guide to the install, it can be found via google > > > or a copy is at www.oninit.com/reference/ > > > > > > Marconus wrote: > > > > > > > > Hallo everybody, > > > > > > > > we installed Informix on linux and everything worked find. > > > > > > > > Than we compiled the php packages and there where no errors. Apache > > > > started up and php is runnung well. > > > > > > > > Whenn i tried to use the funktion > > > > ifx_connect(db@ifx_svr,"name","pass") we get an error: [SQLSTATE=IX > > > > 000 SQLCODE=-25553]. We have seen the postet massages here about this > > > > topic but nothing helps. All envirement Variables were set in System > > > > (INFORMIXSERVER, INFORMIXDIR) and Apache as well. > > > > > > > > We use Informix in the File System, so not with RAW devices. Informix > > > > is a user at this system and wwwrun as well. So wwwrun is a member of > > > > the informix group. May i missed a thing?! > > > > > > > > May anybody had an idea what we have forgotten at this time or an Step > > > > by Step documentation how to install php, apache and informix on a > > > > linux system? > > > > > > > > Thank you for your help