nntp2http.com
Posting
Suche
Optionen
Hilfe & Kontakt

Probleme mit Oracle Instant Client und PHP

Von: Jens Bretschneider (news@jens-bretschneider.de) [Profil]
Datum: 24.02.2008 22:05
Message-ID: <fpsmdj$k1f$1@murphy.mediascape.de>
Newsgroup: de.comp.lang.php.datenbanken
Hallo,

ist hier vielleicht jemand dabei, der schon mal den Oracle Instant Client
und PHP miteinander verheiratet hat? :-)

Folgendes Szenario:

* Linux 2.6.23-gentoo-r8 #1 SMP i686

* Configure Command  './configure' '--prefix=/usr/lib/php5'
'--host=i686-pc-linux-gnu' '--mandir=/usr/lib/php5/man'
'--infodir=/usr/lib/php5/info' '--sysconfdir=/etc'
'--cache-file=./config.cache' '--disable-cli' '--with-apxs2=/usr/sbin/apxs2'
'--with-config-file-path=/etc/php/apache2-php5'
'--with-config-file-scan-dir=/etc/php/apache2-php5/ext-active'
'--without-pear' '--disable-bcmath' '--with-bz2=shared'
'--enable-calendar=shared' '--with-curl=shared' '--with-curlwrappers'
'--disable-dbase' '--enable-exif=shared' '--without-fbsql' '--without-fdftk'
'--disable-filter' '--enable-ftp=shared' '--with-gettext=shared'
'--without-gmp' '--disable-hash' '--without-kerberos'
'--enable-mbstring=shared' '--with-mcrypt=shared' '--with-mhash=shared'
'--without-msql' '--without-mssql' '--with-ncurses=shared' '--with-openssl'
'--with-openssl-dir=/usr' '--enable-pcntl=shared' '--disable-pdo'
'--without-pgsql' '--with-pspell=shared' '--without-recode' '--enable-shmop'
'--without-snmp' '--enable-soap=shared' '--enable-sockets=shared'
'--without-sybase' '--without-sybase-ct' '--enable-sysvmsg=shared'
'--enable-sysvsem=shared' '--enable-sysvshm=shared' '--without-tidy'
'--disable-wddx' '--disable-xmlreader' '--disable-xmlwriter'
'--without-xmlrpc' '--with-xsl=shared' '--disable-zip' '--with-zlib=shared'
'--disable-debug' '--enable-dba=shared' '--without-cdb' '--without-db4'
'--without-flatfile' '--with-gdbm' '--without-inifile' '--without-qdbm'
'--with-freetype-dir=/usr' '--with-t1lib=/usr' '--disable-gd-jis-conv'
'--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--without-xpm-dir' '--with-gd'
'--with-imap=shared' '--with-imap-ssl' '--with-ldap=shared'
'--without-ldap-sasl' '--with-mysql=shared,/usr'
'--with-mysql-sock=/var/run/mysqld/mysqld.sock'
'--with-mysqli=shared,/usr/bin/mysql_config' '--with-unixODBC=shared,/usr'
'--without-adabas' '--without-birdstep' '--without-dbmaker'
'--without-empress' '--without-esoob' '--without-ibm-db2' '--without-iodbc'
'--without-sapdb' '--without-solid'
'--with-oci8=shared,instantclient,/usr/lib/oracle/10.2.0.3/client/lib'
'--with-readline' '--without-libedit' '--with-mm' '--without-sqlite'

* Oracle Instant Client 10.2.0.3

* PHP 5.2.4-pl2-gentoo

Hiermit haben wir zwei Probleme:

1) Im Prinzip funktioniert der Zugriff, aber die Verbindung ist instabil:
sporadisch, mal mehr, mal weniger, wird keine Verbindung aufgebaut. TCPDUMP
zeigt dann auch keine Pakete, sprich die Verbindung scheitert schon im
Client. Wenn ich im PHP Code dann oci_internal_debug aktiviere, sehen die
Ausgaben bei gescheiterten Verbindungen wie folgt aus:

OCI8 DEBUG: OCINlsEnvironmentVariableGet at
(/var/tmp/portage/dev-lang/php-5.2.5_p20080206-r3/work/php-5.2.5_p20080206/ext/oci8/oci8.c
:1067)
OCI8 DEBUG: OCIEnvNlsCreate at
(/var/tmp/portage/dev-lang/php-5.2.5_p20080206-r3/work/php-5.2.5_p20080206/ext/oci8/oci8.c
:1223)
OCI8 DEBUG: OCIErrorGet at
(/var/tmp/portage/dev-lang/php-5.2.5_p20080206-r3/work/php-5.2.5_p20080206/ext/oci8/oci8.c
:922)

Wir sind völlig ratlos, googlen bringt zwar ne Menge Artikel, die ähnliche
Probleme beschreiben, aber keine wirkliche Lösung. Tendenziell geht alles in
Richtung EnvVars, aber unsere Versuche damit waren bislang erfolglos. Was
muss gesetzt sein, was sollte gesetzt sein, und was nicht?

2) Wenn ich Umlaute aus der Datenbank lese, kommen die im PHP nur noch als
Vokale an, ein "ä" in der DB wird zu einem "a" auf dem
Bildschirm. Setzen
von NLS_LANG hat keine Änderung gebracht, aber vielleicht haben wir es auch
nur an der falschen Stelle/auf falsche Werte gesetzt?

Bin für jede Hilfe dankbar...

Viele Grüße,
Jens


[ Auf dieses Posting antworten ]

Antworten