php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3386 Unresolved symbol: ifx_checkAPI
Submitted: 2000-02-02 09:55 UTC Modified: 2000-10-05 06:41 UTC
From: petr dot husak at meiller dot com Assigned: afalout (profile)
Status: Closed Package: Informix related
PHP Version: 4.0 Beta 3 OS: hpux 10.20
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: petr dot husak at meiller dot com
New email:
PHP Version: OS:

 

 [2000-02-02 09:55 UTC] petr dot husak at meiller dot com
When I use function ifx_connect(), httpd instance crashes and in the logfile appears record:

/usr/lib/dld.sl: Unresolved symbol: ifx_checkAPI (code)  from /apl/informix/lib/
esql/libifsql.sl

I use Iformix SE 7.22 and Inf. client sdk v2.40 uc11.
I've compiled php4 with informix support and the phpinfo() shows information about the informix extension well.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-05-30 03:01 UTC] afalout at cvs dot php dot net
In short, problem was caused by not using esql/c to link, so checkapi.o was not included. The fix/workaround (for this and many other missing libs issues re:Informix driver in PHP) is to include them explicitly:

IFX_LIBDIR="-L$INFORMIXDIR/lib -L$INFORMIXDIR/lib/esql"
IFX_INCDIR="$INFORMIXDIR/incl/esql"
IFX_LIBS="$INFORMIXDIR/lib/esql/libifsql.a \
$INFORMIXDIR/lib/libifasf.a \
$INFORMIXDIR/lib/esql/libifgen.a \
$INFORMIXDIR/lib/esql/libifos.a \
$INFORMIXDIR/lib/esql/libifgls.a \
-lgen -lgls -lm -ldl $INFORMIXDIR/lib/esql/checkapi.o \
$INFORMIXDIR/lib/esql/libifglx.a"

export IFX_LIBDIR IFX_INCDIR IFX_LIBS

./configure --with-informix=yes \
... and the rest ...

I cannot see why this should not be in makefiles. If nobody complains about it in week or so, I will put that in makefiles and close this.

Andrej Falout

(The folowing is partial discussion from computers.databases.informix newsgroup discussion. See DejaNews for details.)

---------------------------------------------------
From Danny Heijl:

I use PHP3 and PHP4 with the 2.40 CSDK on Linux, but only with a statically
built Apache/modphp.

If you use the Informix shared libraries, you can not run your httpd binary
on a machine with a different ESQL/C runtime than the one you compiled your
httpd on, which does not help with deployment.

People using a dso version of modphp + Informix have been complaining about
this "checkapi.o" problem, but I did not realize that CSDK 2.40 was the
cause.

I have in the past built modphp3 as a DSO, even with php3_ifx.dso as a
seperately loadable module, but that was a long time ago and I don't
remember the CSDK version I used at the time. It is possible that it no
longer works.

Danny
---


----- Original Message -----
From: "Andrej Falout" <afalout@xtra.co.nz>
To: "Richard Puchalsky" <rpuchalsky@att.net>; <petr.husak@meiller.com>;
<danny.heijl@pandora.be>
Sent: Tuesday, May 16, 2000 9:58 AM
Subject: Re: PHP/Informix consultant?


> [This followup was posted to comp.databases.informix and a copy was sent
> to the cited author.]
>
> In article <TEKT4.66788$fV.4095282@bgtnsc05-news.ops.worldnet.att.net>,
> rpuchalsky@att.net says...
>
> ...snip...
>
> > esql set.  I even tried setting INFORMIXC=gcc.   The symbol ifx_checkAPI
is
> > defined in /opt/informix/lib/esql/checkapi.o (according to Informix tech
>
> A little C&P from ESQL/C manual
>
> ESQL/C uses an Informix function that is called checkapi() to perform
> this check. The checkapi() function is in the checkapi.o object file,
> which is contained in the $INFORMIXDIR/lib/esql directory. The esql
> command automatically links this checkapi.o object file with every
> executable that it creates.
>
> To determine the API version of the library that the application uses,
> ESQL/C checks the values of special macro definitions in the executable
> file. When the ESQL/C preprocessor processes a source file, it copies
> the macro definitions from the sqlhdr.h header file into the C source
> file (.c) that it generates. The following example shows sample values
> for these macros:
>
>
> #define CLIENT_GEN_VER 710
> #define CLIENT_OS_VER 710
> #define CLIENT_SQLI_VER 710
> #define CLIENT_GLS_VER 710
>
>  Tip: The ESQL/C preprocessor automatically includes the sqlhdr.h file
> in all ESQL/C executable files that it generates.
> If the API version of the libraries in this executable file are not
> compatible, ESQL/C returns a runtime error that indicates which library
> is not compatible. You must recompile your ESQL/C application to link
> the new release-version of the shared library.
> If you do not use esql to link one of the shared Informix general
> libraries with your ESQL/C application, you must explicitly link the
> checkapi.o file with your application. Otherwise, ESQL/C might generate
> an error at link time of the form:
>
>
> undefined ifx_checkAPI()
>
> OK, lets try this:
>
> IFX_LIBDIR="-L$INFORMIXDIR/lib -L$INFORMIXDIR/lib/esql"
> IFX_INCDIR="$INFORMIXDIR/incl/esql"
> IFX_LIBS="$INFORMIXDIR/lib/esql/libifsql.a \
> $INFORMIXDIR/lib/libifasf.a \
> $INFORMIXDIR/lib/esql/libifgen.a \
> $INFORMIXDIR/lib/esql/libifos.a \
> $INFORMIXDIR/lib/esql/libifgls.a \
> -lgen -lgls -lm -ldl $INFORMIXDIR/lib/esql/checkapi.o \
> $INFORMIXDIR/lib/esql/libifglx.a"
>
> export IFX_LIBDIR IFX_INCDIR IFX_LIBS
>
> CFLAGS="-O2 -s -DEAPI " \
> ./configure --with-informix=yes \
> ... and the rest ...
>
> > I'm using:
> > Caldera OpenLinux eServer 2.3
> > Informix Foundation 2000
> > Informix Client SDK 2.40.UC1-2
>
> Not sure about this, but is it possible that ifx_checkAPI() cannot load
> because API is realy changed? I use 2.10.UC2-1 CSDK so cannot help here.
> So, is anyone using PHP3 with 2.40 SDK?
>
> More C&P, this time bugs.php.net
>
> ---start----
>
> When I use function ifx_connect(), httpd instance crashes and in the
> logfile appears
> record:
>
> /usr/lib/dld.sl: Unresolved symbol: ifx_checkAPI (code)  from
> /apl/informix/lib/
> esql/libifsql.sl
>
> I use Iformix SE 7.22 and Inf. client sdk v2.40 uc11.
> I've compiled php4 with informix support and the phpinfo() shows
> information about the
> informix extension well.
>
> ----end----
>
> Again 2.40
>
> There is another under http://bugs.php.net/bugs.php3?id=3765 but it does
> not state CSDK version.
>
> Danny, what do you say?
>
>
> --
> Yours, Andrej Falout, http://www.falout.com ICQ 7628616 ++64.21.607517
> #-----------------------------------------------------------------
> globals "std_disclaimer.4gl"
>
> Ask yourself just one question: ? Qu? m?s se puede hacer y aprender ?
> - Propellerhead ReBirth RB-338 manual
>

 [2000-06-09 12:03 UTC] stas at cvs dot php dot net
no user feedback
 [2000-06-09 12:09 UTC] stas at cvs dot php dot net
Actually, not close yet. It should be in "Assigned', not 'Feedback'...
 [2000-07-30 09:49 UTC] zak@php.net
Has there been any progress on this bug?
 [2000-08-03 06:55 UTC] afalout@php.net
I was examining an option to add described statemens to makefiles but after taking in account differences between CSDK, ESQL/C in different versions, I gave up. It seems that Informix spend half of there time renaming files in new versions. Just adding checkapi.o  should work, but location of that file changes trough versions too. Then, I noted that there are simmilar problem caused and fixed the same way, that do not nececery relate to checkapi.o in error message.

This information should be sufficient for users to resolve this issue. It should go to FAQ or manual or somewhere.

Closed.
 [2000-08-03 06:57 UTC] afalout@php.net
Closed. For real this time...I hope.
 [2000-10-05 06:41 UTC] afalout@php.net
I added additional comments to this workaround from Danny that apply to libtool in V4:

---------------------------------------
The work-around suggested by Andrej is still valid, but libtool does not
like those "libifsql.a libifasf.a ..." libraries, you have to specify them
as '-lifsql -lifasf ...' etc..

This will use the shared (.so) libraries, which is not a problem (unless you
move the binary to another machine with a different Informix server or
client version, in that case you should use the static libraries). If you
need the static Informix libraries, copy them to a separate directory and
add that directory to your $LDFLAGS when running configure for PHP and for
Apache, this way the linker won't find the shared libraries and use the
static ones. This is the way I build Apache/modphp4 because I have to
distribute the binary to SVR4  Unix servers running different Informix
server versions (7.21, 7.22, 7.23, 7.30 and 7.31).


Danny
---

 [2002-10-22 14:47 UTC] Hans-Theo dot Bister at t-online dot de
This may help somebody who is not so much in the stuff (like me) If you have to struggle with Apache,Informix and PHP installation troubles, have a look at this install-solution wich solved my problems in september 2002
Thanks to Paul Gardiner again, who helped me in further informix-problems, i could adjust his script for the actuall versions of HP-UX and INFORMIX.

Theo

--------------------------------------------------------------------------------------------------------------------------------------------
# QUICK INSTALL Apache 1.3.26 with static PHP-Modul (Informix  + mySQL Unterstützung)
# for HP-UX 11.00   Model 700/800
# a little modifyed by Hans-Theo Bister (with Informix-Fix)
#
# Nessesary preinstalls:
# Packages: bison, flex, libiconv, mysql, gcc-3.2
# APACHE_SOURCE=/users/apache-1.3.26/apache-1.3.26-ss-11.00.tar
# PHP_SOURCE=/users/apache-1.3.26/php-4.2.3.tar
# mySQL installed to /opt/mysql
# Informix installed to /usr/informix
# run Script as user web etc. , not as user root.
# Only start apache (./apachectl start) using ports < 1024 need root-rights
#
 
PATH=$PATH:/usr/local/bin; export PATH
INFORMIXDIR=/usr/informix; export INFORMIXDIR
 
# set IFX_LIBS to library dirs so configure doesn't try to configure them
IFX_LIBS="-L$INFORMIXDIR/lib -L$INFORMIXDIR/lib/esql"
IFX_INCDIR="$INFORMIXDIR/incl/esql"
IFX_LIBDIR="-L$INFORMIXDIR/lib -L$INFORMIXDIR/lib/esql"
 
export IFX_LIBS IFX_INCDIR IFX_LIBDIR
 
 
APACHE_VER=apache-1.3.26; export APACHE_VER
APACHE_TAR=apache-1.3.26-ss-11.00.tar; export APACHE_TAR
 
PHP_VER=php-4.2.3; export PHP_VER
PHP_TAR=php-4.2.3.tar; export PHP_TAR
 
echo "Static Module PHP4 with Apache, mySQL and Informix for HPUX 11.00\n"
echo "Ensure httpd is stopped.\n"
 
echo "Apache Version:            $APACHE_VER"
echo "Apache Tarfile             $APACHE_TAR"
echo "PHP4 Version:              $PHP_VER"
echo "PHP4 Tar File:             $PHP_TAR"
echo "\n---------------------------------------------------------------------\n"
 
cd /users/apache-1.3.26

#gunzip -c apache_1.3.26.tar.gz | tar xf -
echo "$APACHE_VER delete ..."
rm -rf $APACHE_VER
echo "\nApache extract ..."
tar -xvf $APACHE_TAR
 
echo "\nApache configure ..."
cd $APACHE_VER
./configure --with-layout=Apache
cd ..
 
#gunzip -c php-4.2.3.tar.gz | tar xf -
echo "$PHP_VER delete ..."
rm -rf $PHP_VER
echo "\nphp  extract ..."
tar -xvf $PHP_TAR
echo "\nphp  configure ..."
cd $PHP_VER
./configure --with-mysql=/opt/mysql       \
  --with-apache=../$APACHE_VER  \
  --with-informix=/usr/informix
 
echo "\nphp  make  ..."
make
echo "\nphp  make install ..."
make install
 
 
#Put in here the output of "esql -libs"  !
IFX_LIBS="/usr/informix/lib/esql/libixos.a  \
/usr/informix/lib/esql/libixgen.a           \
/usr/informix/lib/esql/libixsql.a           \
/usr/informix/lib/libixasf.a                \
/usr/informix/lib/esql/libixos.a            \
/usr/informix/lib/esql/libixgen.a           \
/usr/informix/lib/esql/libixgls.a           \
-lnsl_s -lm -lV3 -lcl -lsec /usr/informix/lib/esql/libixglx.a"
 
# Add any extra libs in here if required
LIBS="$IFX_LIBS"
export LIBS

 
echo "\nApache  configure activate php ..."
cd ../$APACHE_VER
./configure --with-layout=Apache --activate-module=src/modules/php4/libphp4.a
 
# (The above line is correct! Yes, we know libphp4.a does not exist at this
#stage. It isn't supposed to.  It will be created.)
echo "\nApache  make  jetzt mit php ..."
make
#(you should now have an httpd binary which you can copy to your Apache bin dir
#if is is your first install then you need to "make install" as well)> > 
echo "\nApache  make install      now with php ..."
make install
 
echo "\n  copy  php.ini  ..."
cd ../$PHP_VER
cp php.ini-dist /usr/local/lib/php.ini
 
# don't forget to edit  httpd.conf and php.ini  ...
echo "\n  done  \n"
-------------------------------------------------------------
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 06:01:30 2024 UTC