|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-03-29 15:48 UTC] phpbug at pech dot cz
Description: ------------ PHP with OCI8 segfaults just _after_ the script ends, when executed from command line by php -q <anyscript.php. Everything is processed fine, but _after_ the script ends (past the processing of the last line), segmentation fault occurs and the core is dumped by php. Reproduce code: --------------- <?php $conn = oci_connect ($user, $password, $db); ?> Expected result: ---------------- Print nothing. In general, expected result means that it will end without segmentation fault. Actual result: -------------- Backtrace (seems really strange to me): #0 0x04ac8a8c in ?? () #1 0x00af3a90 in exit () from /lib/tls/libc.so.6 #2 0x00adeade in __libc_start_main () from /lib/tls/libc.so.6 #3 0x080738e1 in _start () When I accidentally forgotten to set evnironment variable ORA_NLS33, it prints: PHP Warning: oci_connect() [<a href='function.oci-connect'>function.oci-connect</a>]: _oci_open_server: Error while trying to retrieve text for error ORA-12154 in - on line 2 -(2) : Warning - oci_connect() [<a href='function.oci-connect'>function.oci-connect</a>]: _oci_open_server: Error while trying to retrieve text for error ORA-12154 /usr/src/redhat/BUILD/php-5.0.3/ext/oci8/oci8.c(3065) : Freeing 0x09A1E4BC (20 bytes), script=- === Total 1 memory leaks detected === "Error while trying to retrieve text for error ORA-12154" is OK, becuase all environment variables are not set and exported, but the error ORA-12154 and the memory leak are not. Please feel free to contact me for any further details if needed. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 03:00:01 2025 UTC |
Hi Tony, latest CVS version did not fixed it, so I went through the the runtime and compile time configuration and I've found that the configuration, which worked fine with Fedora Core 1-2/Oracle 8.1.7.4/PHP4 was: export ORACLE_BASE=your_location export ORACLE_HOME=$ORACLE_BASE export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data export ORA_LOG=your_log_location export NLS_LANG=your_encoding export NLS_SORT="your_sort_style" export LD_LIBRARY_PATH=$ORACLE_HOME/lib:${LD_LIBRARY_PATH} export LD_ASSUME_KERNEL=2.2.5 #export LD_PRELOAD=$ORACLE_HOME/lib/libclntsh.so When LD_PRELOAD was set (properly) with PHP4, apache never started up. But it works fine with PHP5 and we, fortunatelly, have no more strange core dumps. I apologize, you've said that. So, please, mark this as bogus, but maybe leave a note in the documentation. I assume that it impacts only some architectures.