PHP with Informix-support.
Posted in 2004
Topics: Installation, Setup & Upgrades, Connectivity: ESQL/C, 4GL & Embedded SQL, Platform-Specific Issues, Internationalization & Character Sets, Versions, Editions & End-of-Life
Hi. I'm having problems getting PHP running with Informix-support. It Seems to be problems with the esql libs... Setup: Debian Linux - kernel 2.6.1 IDS 9.40UC1 - csdk 2.81UC2 LINUX php 4.3.4 I've got the database up and running, everything is ok, works fine. I THINK (not sure, had to hack some) that the csdk install is ok aswell. (bet ya gonna blaim it anyhow ;) Didn't have Informixsupport in my php4 installation, so i grabbed the latest version and recompiled it.... ran into problems... stripped down the config-row as much as I could, so I knew it really was the informix-part that was shouting errors (works if i leave just the informix-part out). See stripped work-logg below... All needed environment variables are set (sourced the .bashrc the informixuser uses). both $INFORMIXDIR/lib & $INFORMIXDIR/lib/esql is added to /etc/ld.so.conf and ldconfig is issued. root:/usr/local/src/php-4.3.4# configure --with-informix=/usr/informix && make .../rintf.lo Zend/zend_ini.lo Zend/zend_qsort.lo Zend/zend_multibyte.lo Zend/zend_execute.lo sapi/cgi/cgi_main.lo sapi/cgi/getopt.lo main/internal_functions.lo -lcrypt -lifsql -lifasf -lifgen -lifos -lifgls -ldl -lcrypt -lphpifx -lifglx -lcrypt -lresolv -lm -ldl -lnsl -lcrypt -lcrypt -o sapi/cgi/php ext/mysql/libmysql/my_tempnam.o: In function `my_tempnam': /usr/local/src/php-4.3.4/ext/mysql/libmysql/my_tempnam.c:115: the use of `tempnam' is dangerous, better use `mkstemp' /usr/informix/lib/esql/libifos.a(osenv.o): In function `idx_ggetenv2': osenv.o(.text+0x55b): undefined reference to `is8bitstr' /usr/informix/lib/esql/libifos.a(osenv.o): In function `ggetenv_oledb': osenv.o(.text+0x14b3): undefined reference to `is8bitstr' /usr/informix/lib/esql/libifos.a(osfutil.o): In function `_ofreadable': osfutil.o(.text+0x788): undefined reference to `gcvaccess' /usr/informix/lib/esql/libifos.a(osdnet.o): In function `_osmntnm': osdnet.o(.text+0x370): undefined reference to `gcvstat' /usr/informix/lib/esql/libifos.a(osdnet.o): In function `_osfullpath': osdnet.o(.text+0x57d): undefined reference to `gcvaccess' osdnet.o(.text+0x5b5): undefined reference to `gcvchdir' osdnet.o(.text+0x616): undefined reference to `gcvchdir' collect2: ld returned 1 exit status make: *** [sapi/cgi/php] Error 1 That's my problem, please help... Best Regards. Jens.
..Since I just love posting answers to my own questions.... =) I found a the solution to the problem. Therefore im posting it here since someone else might run into the same problem I had. Could be usefull for someone. The problem actually was the esql installation. I saw that when I began trying esql for other things than the php-installation that I had problems with. The esql-installation was pretty f-cked up actually. Running the binarys was no problem , but not when I tried to run 'em against something... Since the installationscript for the csdk ( || conn-package || generally anything else in ibm's cpio-packages ) is related to problems (u'll know why that's my opinion soon (god damn, whatever happend to .tar.gz distributed packages?)) I wasn't that supprised that i had to do some manual work to install the csdk in the first place. Anyhow, as I mentioned above, the esql installation seemed OK till I ran some deeper tests with it (trying to actually compile something, not only do a esql --help) and got pretty much the same as in the previous post. I ended up re-installing the csdk to see if I could do it better now when it was a fact that the previous installation wasn't fault-free. I also found the source to all evil on earth(why I have had problems with the packages containing cpio-packages). It seems like my cpio binary doesn't like the -c flag.... Ending up with the error Premature Ending On File when ran through the installationscripts... editing all the installationscripts and removing that flag (remember that some scripts calls upon echother) made the installation go a whole lot better. It even created the RUN_AS_ROOT.clientsdk file. THAT was what i had missed before. Running that file made the world a better place. doing a make clean and a reconfigure/recompile of the php package afterwards took all the problems away. Hope this could be of use for someone who might run into the same problem as me some day. (Ok, checklist: I have had the glibc problem, I have had the cpio problem, dare I ask what's next? :) Regards. J.