oci8 + php cgi not working
I have successfully instaled oci8 module following this guide:
http://orfeogpl.info/wiki/index.php/Ubuntu_Oci8_Php5
oci8 is working through php cli but not through cgi /http
Does anyone knows who could i solve it? Is my OS lacking any php package needed by oci8?
Apache error log:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/oci8.so' - libclntsh.so.11.1: failed to map segment from shared object: Permission denied in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/oci8.so' - libclntsh.so.11.1: failed to map segment from shared object: Permission denied in Unknown on line 0
ldd -r shows:
ldd -r /usr/lib64/php/modules/oci8.so: linux-vdso.so.1 => (0x00007fffbc6c2000) libclntsh.so.11.1 => /usr/oracle/instantclient/libclntsh.so.11.1 (0x00007f326fc12000) libc.so.6 => /lib64/libc.so.6 (0x00007f326f879000) libnnz11.so => /usr/oracle/instantclient/libnnz11.so (0x00007f326f4b1000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f326f2ad000) libm.so.6 => /lib64/libm.so.6 (0x00007f326f028000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f326ee0b000) libnsl.so.1 => /lib64/libnsl.so.1 (0x00007f326ebf2000) libaio.so.1 => /lib64/libaio.so.1 (0x00007f326e9f0000) /lib64/ld-linux-x86-64.so.2 (0x000000361d400000) undefined symbol: OnUpdateLong (/usr/lib64/php/modules/oci8.so) undefined symbol: OnUpdateBool (/usr/lib64/php/modules/oci8.so) undefined symbol: zend_ini_boolean_displayer_cb (/usr/lib64/php/modules/oci8.so) undefined symbol: OnUpdateString (/usr/lib64/php/modules/oci8.so) undefined symbol: zend_standard_class_def (/usr/lib64/php/modules/oci8.so) undefined symbol: le_index_ptr (/usr/lib64/php/modules/oci8.so) undefined symbol: core_globals (/usr/lib64/php/modules/oci8.so) undefined symbol: executor_globals (/usr/lib64/php/modules/oci8.so) undefined symbol: convert_to_double (/usr/lib64/php/modules/oci8.so) undefined symbol: php_info_print_table_start (/usr/lib64/php/modules/oci8.so) undefined symbol: zend_fetch_resource (/usr/lib64/php/modules/oci8.so) undefined symbol: _zend_list_delete (/usr/lib64/php/modules/oci8.so) undefined symbol: zend_list_insert (/usr/lib64/php/modules/oci8.so) undefined symbol: zend_hash_del_key_or_index (/usr/lib64/php/modules/oci8.so) undefined symbol: zend_unregister_ini_entries (/usr/lib64/php/modules/oci8.so) undefined symbol: ap_php_snprintf (/usr/lib64/php/modules/oci8.so) undefined symbol: display_ini_entries (/usr/lib64/php/modules/oci8.so) undefined symbol: add_assoc_null_ex (/usr/lib64/php/modules/oci8.so) undefined symbol: zend_register_internal_class (/usr/lib64/php/modules/oci8.so) undefined symbol: _object_init_ex (/usr/lib64/php/modules/oci8.so) undefined symbol: zend_hash_destroy (/usr/lib64/php/modules/oci8.so) undefined symbol: zend_hash_find (/usr/lib64/php/modules/oci8.so) undefined symbol: _php_stream_free (/usr/lib64/php/modules/oci8.so) undefined symbol: _ecalloc (/usr/lib64/php/modules/oci8.so) undefined symbol: _php_stream_open_wrapper_ex (/usr/lib64/php/modules/oci8.so) undefined symbol: add_index_zval (/usr/lib64/php/modules/oci8.so) undefined symbol: _array_init (/usr/lib64/php/modules/oci8.so) undefined symbol: _emalloc (/usr/lib64/php/modules/oci8.so) undefined symbol: php_printf (/usr/lib64/php/modules/oci8.so) undefined symbol: add_next_index_stringl (/usr/lib64/php/modules/oci8.so) undefined symbol: _php_stream_write (/usr/lib64/php/modules/oci8.so) undefined symbol: zend_register_string_constant (/usr/lib64/php/modules/oci8.so) undefined symbol: _object_and_properties_init (/usr/lib64/php/modules/oci8.so) undefined symbol: zend_wrong_param_count (/usr/lib64/php/modules/oci8.so) undefined symbol: php_checkuid (/usr/lib64/php/modules/oci8.so) undefined symbol: zend_strndup (/usr/lib64/php/modules/oci8.so) undefined symbol: _zval_dtor_func (/usr/lib64/php/modules/oci8.so) undefined symbol: convert_to_array (/usr/lib64/php/modules/oci8.so) undefined symbol: _zend_hash_add_or_update (/usr/lib64/php/modules/oci8.so) undefined symbol: _zend_list_find (/usr/lib64/php/modules/oci8.so) undefined symbol: zend_hash_num_elements (/usr/lib64/php/modules/oci8.so) undefined symbol: zend_parse_parameters_ex (/usr/lib64/php/modules/oci8.so) undefined symbol: _efree (/usr/lib64/php/modules/oci8.so) undefined symbol: add_next_index_long (/usr/lib64/php/modules/oci8.so) undefined symbol: add_assoc_zval_ex (/usr/lib64/php/modules/oci8.so) undefined symbol: add_index_null (/usr/lib64/php/modules/oci8.so) undefined symbol: add_assoc_string_ex (/usr/lib64/php/modules/oci8.so) undefined symbol: php_check_open_basedir (/usr/lib64/php/modules/oci8.so) undefined symbol: php_error_docref0 (/usr/lib64/php/modules/oci8.so) undefined symbol: zend_register_list_destructors_ex (/usr/lib64/php/modules/oci8.so) undefined symbol: _convert_to_string (/usr/lib64/php/modules/oci8.so) undefined symbol: php_info_print_table_row (/usr/lib64/php/modules/oci8.so) undefined symbol: _estrdup (/usr/lib64/php/modules/oci8.so) undefined symbol: zend_parse_parameters (/usr/lib64/php/modules/oci8.so) undefined symbol: zend_register_resource (/usr/lib64/php/modules/oci8.so) undefined symbol: zend_hash_internal_pointer_reset_ex (/usr/lib64/php/modules/oci8.so) undefined symbol: php_info_print_table_end (/usr/lib64/php/modules/oci8.so) undefined symbol: add_next_index_null (/usr/lib64/php/modules/oci8.so) undefined symbol: add_assoc_long_ex (/usr/lib64/php/modules/oci8.so) undefined symbol: zend_hash_move_forward_ex (/usr/lib64/php/modules/oci8.so) undefined symbol: zend_hash_apply_with_argument (/usr/lib64/php/modules/oci8.so) undefined symbol: add_next_index_double (/usr/lib64/php/modules/oci8.so) undefined symbol: _zend_list_addref (/usr/lib64/php/modules/oci8.so) undefined symbol: _zval_ptr_dtor (/usr/lib64/php/modules/oci8.so) undefined symbol: php_strtolower (/usr/lib64/php/modules/oci8.so) undefined symbol: _estrndup (/usr/lib64/php/modules/oci8.so) undefined symbol: zend_register_ini_entries (/usr/lib64/php/modules/oci8.so) undefined symbol: _zend_hash_init (/usr/lib64/php/modules/oci8.so) undefined symbol: zend_hash_get_current_data_ex (/usr/lib64/php/modules/oci8.so) undefined symbol: gc_remove_zval_from_buffer (/usr/lib64/php/modules/oci8.so) undefined symbol: zval_add_ref (/usr/lib64/php/modules/oci8.so) undefined symbol: zend_strtod (/usr/lib64/php/modules/oci8.so) undefined symbol: _zend_bailout (/usr/lib64/php/modules/oci8.so) undefined symbol: _zval_copy_ctor_func (/usr/lib64/php/modules/oci8.so) undefined symbol: _safe_emalloc (/usr/lib64/php/modules/oci8.so) undefined symbol: add_property_resource_ex (/usr/lib64/php/modules/oci8.so) undefined symbol: zend_register_long_constant (/usr/lib64/php/modules/oci8.so) undefined symbol: zend_hash_index_find (/usr/lib64/php/modules/oci8.so) undefined symbol: zend_hash_apply (/usr/lib64/php/modules/oci8.so) undefined symbol开发者_StackOverflow社区: convert_to_long (/usr/lib64/php/modules/oci8.so) undefined symbol: _zend_hash_index_update_or_next_insert (/usr/lib64/php/modules/oci8.so) undefined symbol: _erealloc (/usr/lib64/php/modules/oci8.so)
cat /etc/php.ini |grep oci extension=oci8.so cat /etc/php.d/oci8.ini extension=oci8.so
In the cli (php -a)
, phpinfo(); shows oci8
oci8 OCI8 Support => enabled Version => 1.4.5 Revision => $Revision: 305257 $ Active Persistent Connections => 0 Active Connections => 0 Oracle Instant Client Version => 11.2 Temporary Lob support => enabled Collections support => enabled Directive => Local Value => Master Value oci8.connection_class => no value => no value oci8.default_prefetch => 100 => 100 oci8.events => Off => Off oci8.max_persistent => -1 => -1 oci8.old_oci_close_semantics => Off => Off oci8.persistent_timeout => -1 => -1 oci8.ping_interval => 60 => 60 oci8.privileged_connect => Off => Off oci8.statement_cache_size => 20 => 20
Through http/cgi
phpinfo(); shows:
Additional .ini files parsed /etc/php.d/curl.ini, /etc/php.d/fileinfo.ini, /etc/php.d/json.ini, /etc/php.d/mysql.ini, /etc/php.d/mysqli.ini, /etc/php.d/oci8.ini, /etc/php.d/pdo.ini, /etc/php.d/pdo_mysql.ini, /etc/php.d/pdo_sqlite.ini, /etc/php.d/phar.ini, /etc/php.d/sqlite3.ini, /etc/php.d/zip.ini
- Disabling SElinux
- Installing
php-mbstring
(solve theundefined symbol
errors)
Seems like SELinux is messing with library loading
ref: http://www.dbforums.com/oracle/1119593-oracle-error-oracle-10g-fedora-core-3-a.html
精彩评论