Cannot 'make' Apache / PHP / Informix IIF200
Posted in 2000
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Internationalization & Character Sets, Versions, Editions & End-of-Life
Ciao ... I cannot compile the Apache with PHP module with Informix functions enabled. I have PHP.3.0.11, IIF2000 (with IDS 9.20 UC1 and Client SDK 2.40 UC1) and Apache 1.3.9 . When trying the 'make' of Apache, I get this linker error: gcc -DLINUX=2 -DUSE_HSREGEX -DUSE_EXPAT -I./lib/expat-lite `./apaci` -L/usr1/i nformix/lib -L/usr1/informix/lib/esql -L/usr1/informix/extend/web.4.00.UC1/apach e \\ -o httpd buildmark.o modules.o /usr1/informix/extend/web.4.00.UC1/apache/a pache_1.3.6/explode.o modules/standard/libstandard.a modules/php3/libphp3.a main /libmain.a ./os/unix/libos.a ap/libap.a regex/libregex.a lib/expat-lite/libexpat .a -lifxw -lifsql -lifasf -lifgen -lifos -lifgls /usr1/informix/lib/esql/checkap i.o -lm -Wl,-rpath,/usr/lib/mysql -Lmodules/php3 -L../modules/php3 -L../../modul es/php3 -lmodphp3 -ldbf -lpcre -lpam -lm -ldl -lcrypt -ln sl -lresolv -lm -lgdbm -lgd -L/usr/lib/mysql -lmysqlclient modules/php3/libphp3.a(internal_functions.o): In function `getParametersArray': /usr1/src/php-3.0.11/internal_functions.c:227: undefined reference to `ifx_modul e_entry' collect2: ld returned 1 exit status make[2]: *** [target_static] Error 1 make[2]: Leaving directory `/usr1/src/apache_1.3.9/src' make[1]: *** [build-std] Error 2 make[1]: Leaving directory `/usr1/src/apache_1.3.9' make: *** [build] Error 2 HELP !!! Ciao and thanks -Gabriele
Gabriele Bartolini <g.bartol@comune.prato.it> writes: > Ciao ... > > I cannot compile the Apache with PHP module with Informix > functions enabled. I have PHP.3.0.11, IIF2000 (with IDS 9.20 UC1 and > Client SDK 2.40 UC1) and Apache 1.3.9 . > > When trying the 'make' of Apache, I get this linker error: [SNIP] > /usr1/src/php-3.0.11/internal_functions.c:227: undefined reference to > `ifx_modul Ah, I've seen this before... My problems went away when I rebuildt (php) with fresh source. Thomas
> >Ah, I've seen this before... >My problems went away when I rebuildt (php) with fresh source. > I did ... I have tried to rebuild with fresh source. And now I cannot even compile PHP module. If I try to compile it with the Informix support I get this: gcc -DLINUX=2 -DUSE_HSREGEX -DUSE_EXPAT -I./lib/expat-lite `./apaci` \\ -o httpd buildmark.o modules.o modules/standard/libstandard.a modules/php3/libphp3.a main/libmain.a ./os/unix/libos.a ap/libap.a regex/libregex.a lib/expa t-lite/libexpat.a -Wl,-rpath,/usr1/mysql/lib/mysql -lgd -L/usr1/mysql/lib/mysql -lmysqlclient -Lmodules/php3 -L../modules/php3 -L../../modules/php3 -lmodphp3 -lz -L/usr1/informix/lib -L/usr1/informix/lib/esql -lgd -lp am -lm -ldl -lcrypt -lnsl -lresolv -lm -lcrypt -lgdbm modules/php3/libphp3.a(ifx.o): In function `ifx_check': /usr/local/src/php/php-3.0.14/functions/ifx.ec:305: undefined reference to `SQLSTATE' /usr/local/src/php/php-3.0.14/functions/ifx.ec:306: undefined reference to `SQLSTATE' modules/php3/libphp3.a(ifx.o): In function `ifx_error': /usr/local/src/php/php-3.0.14/functions/ifx.ec:335: undefined reference to `SQLCODE' <SNIP - SNIP> /usr/local/src/php/php-3.0.14/functions/ifx.ec:4820: undefined reference to `ifx_lo_read' modules/php3/libphp3.a(ifx.o): In function `php3_ifxus_write_slob': /usr/local/src/php/php-3.0.14/functions/ifx.ec:4871: undefined reference to `ifx_lo_write' collect2: ld returned 1 exit status Any suggestions ? -Gabriele
Hi Gabriele, I had exactly the same problem today. 1st you must install the ClientSDK (esql) - free from the Informix web site. After installing it you must then read the INSTALL file in your php directory. I used the following command ( in the directory I unpacked the PHP source ) to configure php for Informix as an apache module: ./configure --with-apache=/u/local/src/apache_1.3.11/ --with-informix=$INFORMIXDIR /u/local/src/apache_1.3.11 is where I unpacked the apache source. Next type make install. That's it for PHP. Next, apache: Ignore the new way to configure apache in the PHP INSTALL file. Instead, use the old method. Go to the directory where you unpacked the apache source and add these 2 lines to src/Configuration: EXTRA_LIBS=-lifsql -lifasf -lifgen -lifos -lifgls -lc -lm -ldl -lcrypt /u/informix/lib/esql/checkapi.o -lifglx AddModule modules/php4/libphp4.a The EXTRA_LIBS line includes the esql libraries you are missing. The modules/php4/libphp4.a is the library that was created during the PHP compile. Next, cd to the src directory & type ./Configure, then make install. You must then uncomment these lines from /usr/local/apache/conf/httpd.conf: # And for PHP 4.x, use: # AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps Start up the server ( having 1st set INFORMIXDIR DBPATH,etc ) by typing /usr/local/apache/bin/apachectl start You should then be set :-) If you have any problems just get in touch php@nihc.demon.co.uk Regards, Chris. Gabriele Bartolini wrote: > > > >Ah, I've seen this before... > >My problems went away when I rebuildt (php) with fresh source. > > > > I did ... I have tried to rebuild with fresh source. And now I cannot > even compile PHP module. > > If I try to compile it with the Informix support I get this: > > gcc -DLINUX=2 -DUSE_HSREGEX -DUSE_EXPAT -I./lib/expat-lite `./apaci` > \\ > -o httpd buildmark.o modules.o modules/standard/libstandard.a > modules/php3/libphp3.a main/libmain.a ./os/unix/libos.a ap/libap.a > regex/libregex.a lib/expa t-lite/libexpat.a > -Wl,-rpath,/usr1/mysql/lib/mysql -lgd -L/usr1/mysql/lib/mysql > -lmysqlclient -Lmodules/php3 -L../modules/php3 -L../../modules/php3 > -lmodphp3 -lz -L/usr1/informix/lib -L/usr1/informix/lib/esql > -lgd -lp am -lm -ldl -lcrypt -lnsl -lresolv -lm -lcrypt -lgdbm > > modules/php3/libphp3.a(ifx.o): In function `ifx_check': > /usr/local/src/php/php-3.0.14/functions/ifx.ec:305: undefined > reference to `SQLSTATE' > /usr/local/src/php/php-3.0.14/functions/ifx.ec:306: undefined > reference to `SQLSTATE' > modules/php3/libphp3.a(ifx.o): In function `ifx_error': > /usr/local/src/php/php-3.0.14/functions/ifx.ec:335: undefined > reference to `SQLCODE' > > <SNIP - SNIP> > > /usr/local/src/php/php-3.0.14/functions/ifx.ec:4820: undefined > reference to `ifx_lo_read' > modules/php3/libphp3.a(ifx.o): In function `php3_ifxus_write_slob': > /usr/local/src/php/php-3.0.14/functions/ifx.ec:4871: undefined > reference to `ifx_lo_write' > collect2: ld returned 1 exit status > > Any suggestions ? > > -Gabriele
Hi Gabriele, I had exactly the same problem today. 1st you must install the ClientSDK (esql) - free from the Informix web site. After installing it you must then read the INSTALL file in your php directory. I used the following command ( in the directory I unpacked the PHP source ) to configure php for Informix as an apache module: ./configure --with-apache=/u/local/src/apache_1.3.11/ --with-informix=$INFORMIXDIR /u/local/src/apache_1.3.11 is where I unpacked the apache source. Next type make install. That's it for PHP. Next, apache: Ignore the new way to configure apache in the PHP INSTALL file. Instead, use the old method. Go to the directory where you unpacked the apache source and add these 2 lines to src/Configuration: EXTRA_LIBS=-lifsql -lifasf -lifgen -lifos -lifgls -lc -lm -ldl -lcrypt /u/informix/lib/esql/checkapi.o -lifglx AddModule modules/php4/libphp4.a The EXTRA_LIBS line includes the esql libraries you are missing. The modules/php4/libphp4.a is the library that was created during the PHP compile. Next, cd to the src directory & type ./Configure, then make install. You must then uncomment these lines from /usr/local/apache/conf/httpd.conf: # And for PHP 4.x, use: # AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps Start up the server ( having 1st set INFORMIXDIR DBPATH,etc ) by typing /usr/local/apache/bin/apachectl start You should then be set :-) If you have any problems just get in touch php@nihc.demon.co.uk BTW, It's seems VERY important that you don't change any directory names of the PHP or Apache source during the config & compile, otherwise you'll have to reinstall the source of both. Regards, Chris. Gabriele Bartolini wrote: > > > >Ah, I've seen this before... > >My problems went away when I rebuildt (php) with fresh source. > > > > I did ... I have tried to rebuild with fresh source. And now I cannot > even compile PHP module. > > If I try to compile it with the Informix support I get this: > > gcc -DLINUX=2 -DUSE_HSREGEX -DUSE_EXPAT -I./lib/expat-lite `./apaci` > \\ > -o httpd buildmark.o modules.o modules/standard/libstandard.a > modules/php3/libphp3.a main/libmain.a ./os/unix/libos.a ap/libap.a > regex/libregex.a lib/expa t-lite/libexpat.a > -Wl,-rpath,/usr1/mysql/lib/mysql -lgd -L/usr1/mysql/lib/mysql > -lmysqlclient -Lmodules/php3 -L../modules/php3 -L../../modules/php3 > -lmodphp3 -lz -L/usr1/informix/lib -L/usr1/informix/lib/esql > -lgd -lp am -lm -ldl -lcrypt -lnsl -lresolv -lm -lcrypt -lgdbm > > modules/php3/libphp3.a(ifx.o): In function `ifx_check': > /usr/local/src/php/php-3.0.14/functions/ifx.ec:305: undefined > reference to `SQLSTATE' > /usr/local/src/php/php-3.0.14/functions/ifx.ec:306: undefined > reference to `SQLSTATE' > modules/php3/libphp3.a(ifx.o): In function `ifx_error': > /usr/local/src/php/php-3.0.14/functions/ifx.ec:335: undefined > reference to `SQLCODE' > > <SNIP - SNIP> > > /usr/local/src/php/php-3.0.14/functions/ifx.ec:4820: undefined > reference to `ifx_lo_read' > modules/php3/libphp3.a(ifx.o): In function `php3_ifxus_write_slob': > /usr/local/src/php/php-3.0.14/functions/ifx.ec:4871: undefined > reference to `ifx_lo_write' > collect2: ld returned 1 exit status > > Any suggestions ? > > -Gabriele