php3 question ?
Posted in 1999
Topics: Installation, Setup & Upgrades, Connectivity: ESQL/C, 4GL & Embedded SQL, Data Types & Schema Design, Internationalization & Character Sets
Hi all:
I got an error "Fatal error: Call to unsupported or undefined function
ifx_connect() ",when use browser open an php3 script file
R/H 6.0+informix IDS7.3+php-3.0.12+apache 1.3.6
I install apache & php3 following these steps:
==============================================
First : export these variables to envirmnent
INFORMIXDIR=/home/informixIFX_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
Second exec these commands:
1.gunzip apache_1.3.6.tar.gz
2.tar xvf apache_1.3.6.tar
3.gunzip php-3.0.12.tar.gz
4.tar xvf php-3.0.12.tar
5.cd apache_1.3.6
6. ./configure --prefix=/home/httpd
7. cd ../php-3.0.12
8.
./configure --with-informix --with-apache=../apache_1.3.6 --enable-track-var
s --with-config-file-path=/etc/httpd
9. make
10. make install
11. cd ../apache_1.3.6
12.
./configure --prefix=/home/httpd --activate-module=src/modules/php3/libphp3.
a
13. make
14. make install
15. cd ../php-3.0.x
16. cp php3.ini-dist /etc/httpd/php3.ini
17. Edit your httpd.conf or srm.conf file and add:
AddType application/x-httpd-php3 .php3
18. Edit /home/httpd/conf/httpd.conf file and add this line:
SetEnv LD_LIBRALY_PATH /home/informix/lib /home/informix/lib/c++
home/informix/lib/cli /home/informix/lib/dmi /home/informix/lib/esql
19. /etc/rc.d/init.d/httpd restart
httpd was running and OK !
==========================================================================
The php3 scripts are:
<body>
<?php
$conn_id=ifx_connect(mvdis@txgdbs_tcp,"txg16",tgdfff9");
ifx_textasvarchar(1);
$res_id=ifx_query("select * from car_reg where plt_no='BP-2248',$conn_id);
if (! $res_id)
{
printf ("Can't select car_reg :%s\\n<br>%s<br>\\n",ifx_error());
ifx_errormsg();
die
}
ifx_htmltbl_result($res_id,"border=\\"1\\"");
ifx_free_result($res_id);
?>
</body>
This is not an INFORMIX related error.
Check PHP3 modules you are using for connection to the database.
Check PHP ini file to make sure that all needed modules are uncommented.
Serge
David CHANG <clw@ms19.url.com.tw> wrote in message
news:83fci5$a4b@netnews.hinet.net...
> Hi all:
> I got an error "Fatal error: Call to unsupported or undefined function
> ifx_connect() ",when use browser open an php3 script file
> R/H 6.0+informix IDS7.3+php-3.0.12+apache 1.3.6
> I install apache & php3 following these steps:
> ==============================================
> First : export these variables to envirmnent
> INFORMIXDIR=/home/informix> 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
> Second exec these commands:
> 1.gunzip apache_1.3.6.tar.gz
> 2.tar xvf apache_1.3.6.tar
> 3.gunzip php-3.0.12.tar.gz
> 4.tar xvf php-3.0.12.tar
> 5.cd apache_1.3.6
> 6. ./configure --prefix=/home/httpd
> 7. cd ../php-3.0.12
> 8.
>
./configure --with-informix --with-apache=../apache_1.3.6 --enable-track-var
> s --with-config-file-path=/etc/httpd
> 9. make
> 10. make install
> 11. cd ../apache_1.3.6
> 12.
>
./configure --prefix=/home/httpd --activate-module=src/modules/php3/libphp3.
> a
> 13. make
> 14. make install
> 15. cd ../php-3.0.x
> 16. cp php3.ini-dist /etc/httpd/php3.ini
> 17. Edit your httpd.conf or srm.conf file and add:
> AddType application/x-httpd-php3 .php3
> 18. Edit /home/httpd/conf/httpd.conf file and add this line:
> SetEnv LD_LIBRALY_PATH /home/informix/lib /home/informix/lib/c++
> home/informix/lib/cli /home/informix/lib/dmi /home/informix/lib/esql
> 19. /etc/rc.d/init.d/httpd restart
> httpd was running and OK !
> ==========================================================================
> The php3 scripts are:
> <body>
> <?php
> $conn_id=ifx_connect(mvdis@txgdbs_tcp,"txg16",tgdfff9");
> ifx_textasvarchar(1);
> $res_id=ifx_query("select * from car_reg where
plt_no='BP-2248',$conn_id);
> if (! $res_id)
> {
> printf ("Can't select car_reg :%s\\n<br>%s<br>\\n",ifx_error());
> ifx_errormsg();
> die
> }
> ifx_htmltbl_result($res_id,"border=\\"1\\"");
> ifx_free_result($res_id);
> ?>
> </body>
>
>
>
>
Related threads
- Informix installation on Linux ...
- log_full.sh getting Aborted by client.
- i4gl problem in HP getting a library
- How to find Process corresponding to instance