PHP4 mit Informix Unterstützung

Original geschrieben von Reta
Hallo,
wer kann mir sagen, wie ich das hinbekomme?
Danke

Moin,
das einfachste wird sein, dass du in das Makefile aus dem Port (/usr/ports/lang/php4/) schaust, und dort gegebenenfalls die Argumente, die für eine Kompilierung mit Informix-Unterstützung notwendig sind, einträgst.

Auf der PHP-Website lese ich (http://si.php.net:8888/manual/en/ref.ifx.php)
Make sure that the "INFORMIXDIR" variable has been set, and that $INFORMIXDIR/bin is in your PATH before you run the "configure" script.

Installation

To be able to use the functions defined in this module you must compile your PHP interpreter using the configure line --with_informix[=DIR], where DIR is the Informix base install directory, defaults to nothing.
Also, ins Makefile gucken, und einfach mal nach "informix" suchen - es findet sich nichts.

Nun, am Anfang des Makefiles steht:
CONFIGURE_ARGS= --enable-versioning \
--enable-memory-limit \
--with-layout=GNU \
--with-zlib-dir=/usr \
--disable-all
Es bietet sich also eigentlich an, die Zeile mit dem Informix einzufügen:

CONFIGURE_ARGS= --enable-versioning \
--enable-memory-limit \
--with-layout=GNU \
--with-zlib-dir=/usr \
--with-informix=${INFORMIXDIR} \
--disable-all

Alternativ kannst du natürlich auch weiter unten so etwas hinzufügen:
.if defined(WITH_INFORMIX)
CONFIGURE_ARGS+=--with-informix=${INFORMIXDIR}
.endif
Bei beiden Möglichkeiten sollte die Umgebungsvaribale "INFORMIXDIR" gesetzt sein.
Vielleicht schickst du auch eine Mail an den Maintainer des Ports, und bittest ihn, Informix in Zukunft miteinzubeziehen. Die E-Mailadresse des Maintainers findest du auch in dem Makefile.

Gruß
 
--with-informix=

hatte ich beim kompilieren gesetzt. Als Client Libraries csdk-2.80.UC2-1 (für Linux) installiert. Beim Builden allerdings bekomme ich einen Fehler beim Linken:
/bin/sh libtool --silent --mode=compile cc -I/usr/local/include/apache -Isapi/ap
ache/ -I/usr/ports/www/mod_php4/work/php-4.3.1/sapi/apache/ -DPHP_ATOM_INC -I/us
r/ports/www/mod_php4/work/php-4.3.1/include -I/usr/ports/www/mod_php4/work/php-4
.3.1/main -I/usr/ports/www/mod_php4/work/php-4.3.1 -I/usr/ports/www/mod_php4/wor
k/php-4.3.1/Zend -I/usr/local/include/mysql -I/usr/local/include -I/usr/ports/ww
w/mod_php4/work/php-4.3.1/ext/xml/expat -DLOGIN_CAP -DDOCUMENT_LOCATION="/usr/l
ocal/www/data" -DDEFAULT_PATH="/bin:/usr/bin:/usr/local/bin" -DHARD_SERVER_LIMIT
=512 -I/usr/ports/www/mod_php4/work/php-4.3.1/TSRM -O -pipe -march=pentiumpro -
I/usr/local/include -I/usr/local/include/pgsql -prefer-pic -c /usr/ports/www/mo
d_php4/work/php-4.3.1/sapi/apache/sapi_apache.c -o sapi/apache/sapi_apache.lo
/bin/sh libtool --silent --mode=compile cc -I/usr/local/include/apache -Isapi/ap
ache/ -I/usr/ports/www/mod_php4/work/php-4.3.1/sapi/apache/ -DPHP_ATOM_INC -I/us
r/ports/www/mod_php4/work/php-4.3.1/include -I/usr/ports/www/mod_php4/work/php-4
.3.1/main -I/usr/ports/www/mod_php4/work/php-4.3.1 -I/usr/ports/www/mod_php4/wor
k/php-4.3.1/Zend -I/usr/local/include/mysql -I/usr/local/include -I/usr/ports/ww
w/mod_php4/work/php-4.3.1/ext/xml/expat -DLOGIN_CAP -DDOCUMENT_LOCATION="/usr/l
ocal/www/data" -DDEFAULT_PATH="/bin:/usr/bin:/usr/local/bin" -DHARD_SERVER_LIMIT
=512 -I/usr/ports/www/mod_php4/work/php-4.3.1/TSRM -O -pipe -march=pentiumpro -
I/usr/local/include -I/usr/local/include/pgsql -prefer-pic -c /usr/ports/www/mo
d_php4/work/php-4.3.1/sapi/apache/mod_php4.c -o sapi/apache/mod_php4.lo
/bin/sh libtool --silent --mode=compile cc -I/usr/local/include/apache -Isapi/ap
ache/ -I/usr/ports/www/mod_php4/work/php-4.3.1/sapi/apache/ -DPHP_ATOM_INC -I/us
r/ports/www/mod_php4/work/php-4.3.1/include -I/usr/ports/www/mod_php4/work/php-4
.3.1/main -I/usr/ports/www/mod_php4/work/php-4.3.1 -I/usr/ports/www/mod_php4/wor
k/php-4.3.1/Zend -I/usr/local/include/mysql -I/usr/local/include -I/usr/ports/ww
w/mod_php4/work/php-4.3.1/ext/xml/expat -DLOGIN_CAP -DDOCUMENT_LOCATION="/usr/l
ocal/www/data" -DDEFAULT_PATH="/bin:/usr/bin:/usr/local/bin" -DHARD_SERVER_LIMIT
=512 -I/usr/ports/www/mod_php4/work/php-4.3.1/TSRM -O -pipe -march=pentiumpro -
I/usr/local/include -I/usr/local/include/pgsql -prefer-pic -c /usr/ports/www/mo
d_php4/work/php-4.3.1/sapi/apache/php_apache.c -o sapi/apache/php_apache.lo
/bin/sh libtool --silent --mode=compile cc -Imain/ -I/usr/ports/www/mod_php4/wo
rk/php-4.3.1/main/ -DPHP_ATOM_INC -I/usr/ports/www/mod_php4/work/php-4.3.1/inclu
de -I/usr/ports/www/mod_php4/work/php-4.3.1/main -I/usr/ports/www/mod_php4/work/
php-4.3.1 -I/usr/ports/www/mod_php4/work/php-4.3.1/Zend -I/usr/local/include/mys
ql -I/usr/local/include -I/usr/ports/www/mod_php4/work/php-4.3.1/ext/xml/expat
-DLOGIN_CAP -DDOCUMENT_LOCATION="/usr/local/www/data" -DDEFAULT_PATH="/bin:/usr/
bin:/usr/local/bin" -DHARD_SERVER_LIMIT=512 -I/usr/ports/www/mod_php4/work/php-4
.3.1/TSRM -O -pipe -march=pentiumpro -I/usr/local/include -I/usr/local/include/
pgsql -prefer-pic -c main/internal_functions.c -o main/internal_functions.lo
/bin/sh libtool --silent --mode=link cc -O -pipe -march=pentiumpro -I/usr/local/
include -I/usr/local/include/pgsql -prefer-pic -rpath /usr/ports/www/mod_php4/w
ork/php-4.3.1/libs -export-symbols /usr/ports/www/mod_php4/work/php-4.3.1/sapi/a
pache/php.sym -avoid-version -module -L/opt/informix/lib -L/opt/informix/lib/esq
l -L/usr/ports/www/mod_php4/work/php-4.3.1/ext/informix -L/usr/local/lib/mysql -
L/usr/local/lib -R /opt/informix/lib -R /opt/informix/lib/esql -R /usr/ports/ww
w/mod_php4/work/php-4.3.1/ext/informix -R /usr/local/lib/mysql -R /usr/local/lib
ext/zlib/zlib.lo ext/zlib/zlib_fopen_wrapper.lo ext/ctype/ctype.lo ext/informix
/ifx.lo ext/mysql/php_mysql.lo ext/overload/overload.lo ext/pcre/pcrelib/maketab
les.lo ext/pcre/pcrelib/get.lo ext/pcre/pcrelib/study.lo ext/pcre/pcrelib/pcre.l
o ext/pcre/php_pcre.lo ext/pgsql/pgsql.lo ext/posix/posix.lo ext/session/session
.lo ext/session/mod_files.lo ext/session/mod_mm.lo ext/session/mod_user.lo ext/s
tandard/array.lo ext/standard/base64.lo ext/standard/basic_functions.lo ext/stan
dard/browscap.lo ext/standard/crc32.lo ext/standard/crypt.lo ext/standard/cyr_co
nvert.lo ext/standard/datetime.lo ext/standard/dir.lo ext/standard/dl.lo ext/sta
ndard/dns.lo ext/standard/exec.lo ext/standard/file.lo ext/standard/filestat.lo
ext/standard/flock_compat.lo ext/standard/formatted_print.lo ext/standard/fsock.
lo ext/standard/head.lo ext/standard/html.lo ext/standard/image.lo ext/standard/
info.lo ext/standard/iptc.lo ext/standard/lcg.lo ext/standard/link.lo ext/standa
rd/mail.lo ext/standard/math.lo ext/standard/md5.lo ext/standard/metaphone.lo ex
t/standard/microtime.lo ext/standard/pack.lo ext/standard/pageinfo.lo ext/standa
rd/parsedate.lo ext/standard/quot_print.lo ext/standard/rand.lo ext/standard/reg
.lo ext/standard/soundex.lo ext/standard/string.lo ext/standard/scanf.lo ext/sta
ndard/syslog.lo ext/standard/type.lo ext/standard/uniqid.lo ext/standard/url.lo
ext/standard/url_scanner.lo ext/standard/var.lo ext/standard/versioning.lo ext/s
tandard/assert.lo ext/standard/strnatcmp.lo ext/standard/levenshtein.lo ext/stan
dard/incomplete_class.lo ext/standard/url_scanner_ex.lo ext/standard/ftp_fopen_w
rapper.lo ext/standard/http_fopen_wrapper.lo ext/standard/php_fopen_wrapper.lo e
xt/standard/credits.lo ext/standard/css.lo ext/standard/var_unserializer.lo ext/
standard/ftok.lo ext/standard/aggregation.lo ext/standard/sha1.lo ext/tokenizer/
tokenizer.lo ext/xml/xml.lo ext/xml/expat/xmlparse.lo ext/xml/expat/xmlrole.lo e
xt/xml/expat/xmltok.lo regex/regcomp.lo regex/regexec.lo regex/regerror.lo regex
/regfree.lo TSRM/TSRM.lo TSRM/tsrm_strtok_r.lo TSRM/tsrm_virtual_cwd.lo main/mai
n.lo main/snprintf.lo main/spprintf.lo main/php_sprintf.lo main/safe_mode.lo mai
n/fopen_wrappers.lo main/alloca.lo main/php_ini.lo main/SAPI.lo main/rfc1867.lo
main/php_content_types.lo main/strlcpy.lo main/strlcat.lo main/mergesort.lo main
/reentrancy.lo main/php_variables.lo main/php_ticks.lo main/streams.lo main/netw
ork.lo main/php_open_temporary_file.lo main/php_logos.lo main/output.lo main/mem
ory_streams.lo main/user_streams.lo Zend/zend_language_parser.lo Zend/zend_langu
age_scanner.lo Zend/zend_ini_parser.lo Zend/zend_ini_scanner.lo Zend/zend_alloc.
lo Zend/zend_compile.lo Zend/zend_constants.lo Zend/zend_dynamic_array.lo Zend/z
end_execute_API.lo Zend/zend_highlight.lo Zend/zend_llist.lo Zend/zend_opcode.lo
Zend/zend_operators.lo Zend/zend_ptr_stack.lo Zend/zend_stack.lo Zend/zend_vari
ables.lo Zend/zend.lo Zend/zend_API.lo Zend/zend_extensions.lo Zend/zend_hash.lo
Zend/zend_list.lo Zend/zend_indent.lo Zend/zend_builtin_functions.lo Zend/zend_
sprintf.lo Zend/zend_ini.lo Zend/zend_qsort.lo Zend/zend_multibyte.lo Zend/zend_
execute.lo sapi/apache/sapi_apache.lo sapi/apache/mod_php4.lo sapi/apache/php_ap
ache.lo main/internal_functions.lo -lifsql -lifasf -lifgen -lifos -lifgls -lnets
tub -ldl -lcrypt -lphpifx -lifglx -lpq -lmysqlclient -lz -lcrypt -lm -L/usr/lib
-lcrypto -lssl -lcrypt -o libphp4.la
/usr/libexec/elf/ld: cannot find -ldl

Nun bin ich nicht sicher, ob das an dem Linux csdk liegt?
 
hi, hat da jemand ne lösung dafür??
irgendwie will er die lib dl (aus dem linuxbase) net linken.


k33n
 
Du kannst keine FreeBSD- und Linux-Libraries miteinander mischen. Wenn du keine Informix-Libraries für FreeBSD bekommst, wird dein Vorhaben nicht funktionieren.

Eine Möglichkeit wäre es, einen Linux-Apache mit einem Linux-PHP unter der Linux-Emulation von FreeBSD laufen zu lassen - wenn du das willst ...
 
ich hab schon ein unter linux kompiliertes php binary im cgi modus laufen, aber irgendwie tut das auch ned richtig......
das kann ja wohl ned sein, das ich wegen so nem verf!"$%§%!" informix connect auf ne linux kiste ausweichen muss...

k33n
 
Zurück
Oben