From: bianchini dot alessio at gmail dot com Operating system: Sun Solaris 8 PHP version: 5.3.14 Package: Reproducible crash Bug Type: Bug Bug description:Apache 2.2 core dump with PHPExcel 1.7.7 with --enable-zip
Description: ------------ I have configured an environment with this product: 1)apache 2.2 2) PHP 5.3.14 I tried to use the library PHPExcel 1.7.7 (this library works fine on my machine with XAMPP) but I have error that the "ZipArchive Library is not enbaled". So i build php with this command line: ./configure --with-curl --with-apxs2=/usr/local/apache/bin/apxs --disable-debug --enable-ftp --enable-inline-optimization --enable-magic-quotes --enable- mbstring --enable-safe-mode --enable-wddx=shared --with-gd --with-gettext -- with-mysql=/usr/local/mysql --with-mysqli --with-regex=system --with- zlib=/usr/local/zlib --enable-zip --with-libxml- dir=/usr/local/include/libxml2/libxml But now when i call my php page, apache core dumped Test script: --------------- Before to add the option "--enable-zip", the error is in this line: Excel2007.php: if (!class_exists('ZipArchive')) { throw new Exception("ZipArchive library is not enabled"); } After, apache core dumped Expected result: ---------------- I expect that my page doesn't cause apache core dump: mypage.php (part of code): set_include_path(get_include_path() . PATH_SEPARATOR . './Classes/'); /** PHPExcel */ include 'PHPExcel.php'; include 'PHPExcel/IOFactory.php'; $inputFileName = "Estrazione SM giugno 2012.xlsx"; $inputFileType = PHPExcel_IOFactory::identify($inputFileName); $objReader = PHPExcel_IOFactory::createReader($inputFileType); $objReader->setReadDataOnly(true); // sola lettura $objPHPExcel = $objReader->load($inputFileName); //Carico il file xls $total_sheets=$objPHPExcel->getSheetCount();// numeri sheet $allSheetName=$objPHPExcel->getSheetNames(); // nomi dei sheet $objWorksheet = $objPHPExcel->setActiveSheetIndex(1); // mi prendo il primo sheet $highestRow = $objWorksheet->getHighestRow(); // Numero riga massima $highestColumn = $objWorksheet->getHighestColumn(); // Colonna Max $highestColumnIndex = PHPExcel_Cell::columnIndexFromString($highestColumn); // Indice delle colonne Actual result: -------------- Now Apache core dumped; below there is backtrace: mysql@etiopia # gdb /usr/local/apache/bin/httpd ./core GNU gdb 6.8 Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "sparc-sun-solaris2.8"... warning: Can't read pathname for load map: I/O error. warning: .dynamic section for "/usr/local/apache/modules/libphp5.so" is not at the expected address (wrong library or version mismatch?) Reading symbols from /usr/lib/libm.so.1...done. Loaded symbols for /usr/lib/libm.so.1 Reading symbols from /usr/local/lib/libiconv.so.2...done. Loaded symbols for /usr/local/lib/libiconv.so.2 Reading symbols from /usr/lib/libsendfile.so.1...done. Loaded symbols for /usr/lib/libsendfile.so.1 Reading symbols from /usr/lib/librt.so.1...done. Loaded symbols for /usr/lib/librt.so.1 Reading symbols from /usr/lib/libsocket.so.1...done. Loaded symbols for /usr/lib/libsocket.so.1 Reading symbols from /usr/lib/libnsl.so.1...done. Loaded symbols for /usr/lib/libnsl.so.1 Reading symbols from /usr/lib/libpthread.so.1...done. Loaded symbols for /usr/lib/libpthread.so.1 Reading symbols from /usr/lib/libdl.so.1...done. Loaded symbols for /usr/lib/libdl.so.1 Reading symbols from /usr/lib/libc.so.1...done. Loaded symbols for /usr/lib/libc.so.1 Reading symbols from /usr/local/lib/libgcc_s.so.1...done. Loaded symbols for /usr/local/lib/libgcc_s.so.1 Reading symbols from /usr/lib/libaio.so.1...done. Loaded symbols for /usr/lib/libaio.so.1 Reading symbols from /usr/lib/libmp.so.2...done. Loaded symbols for /usr/lib/libmp.so.2 Reading symbols from /usr/platform/SUNW,Sun-Fire-280R/lib/libc_psr.so.1...done. Loaded symbols for /usr/platform/SUNW,Sun-Fire-280R/lib/libc_psr.so.1 Reading symbols from /usr/lib/libthread.so.1...done. Loaded symbols for /usr/lib/libthread.so.1 Reading symbols from /usr/local/apache/modules/libphp5.so...done. Loaded symbols for /usr/local/apache/modules/libphp5.so Reading symbols from /usr/local/lib/libintl.so.8...done. Loaded symbols for /usr/local/lib/libintl.so.8 Reading symbols from /usr/local/lib/libpng12.so.0...done. Loaded symbols for /usr/local/lib/libpng12.so.0 Reading symbols from /usr/local/zlib/lib/libz.so...done. Loaded symbols for /usr/local/zlib/lib/libz.so Reading symbols from /usr/lib/libresolv.so.2...done. Loaded symbols for /usr/lib/libresolv.so.2 Reading symbols from /usr/local/lib/libcurl.so.4...done. Loaded symbols for /usr/local/lib/libcurl.so.4 Reading symbols from /usr/local/ssl/lib/libssl.so.0.9.7...done. Loaded symbols for /usr/local/ssl/lib/libssl.so.0.9.7 Reading symbols from /usr/local/ssl/lib/libcrypto.so.0.9.7...done. Loaded symbols for /usr/local/ssl/lib/libcrypto.so.0.9.7 Reading symbols from /usr/lib/libldap.so.4...done. Loaded symbols for /usr/lib/libldap.so.4 Reading symbols from /usr/local/mysql/lib/mysql/libmysqlclient.so.16...done. Loaded symbols for /usr/local/mysql/lib/mysql/libmysqlclient.so.16 Reading symbols from /usr/local/lib/libxml2.so.2...done. Loaded symbols for /usr/local/lib/libxml2.so.2 Reading symbols from /usr/lib/libsec.so.1...done. Loaded symbols for /usr/lib/libsec.so.1 Reading symbols from /usr/lib/libz.so.1...done. Loaded symbols for /usr/lib/libz.so.1 Reading symbols from /usr/local/lib/php/extensions/no-debug-non-zts- 20090626/zip.so...done. Loaded symbols for /usr/local/lib/php/extensions/no-debug-non-zts- 20090626/zip.so Reading symbols from /usr/lib/nss_files.so.1...done. Loaded symbols for /usr/lib/nss_files.so.1 warning: Can't read pathname for load map: I/O error. warning: Can't read pathname for load map: I/O error. Core was generated by `/usr/local/apache/bin/httpd -k start'. Program terminated with signal 11, Segmentation fault. [New process 85866 ] [New process 151402 ] [New process 216938 ] #0 0xe4068000 in ?? () Redefine command "____executor_globals"? (y or n) [answered Y; input not from terminal] Redefine command "print_cvs"? (y or n) [answered Y; input not from terminal] Redefine command "dump_bt"? (y or n) [answered Y; input not from terminal] Redefine command "printzv"? (y or n) [answered Y; input not from terminal] Redefine command "____printzv_contents"? (y or n) [answered Y; input not from terminal] Redefine command "____printzv"? (y or n) [answered Y; input not from terminal] Redefine command "____print_const_table"? (y or n) [answered Y; input not from terminal] Redefine command "print_const_table"? (y or n) [answered Y; input not from terminal] Redefine command "____print_ht"? (y or n) [answered Y; input not from terminal] Redefine command "print_ht"? (y or n) [answered Y; input not from terminal] Redefine command "print_htptr"? (y or n) [answered Y; input not from terminal] Redefine command "print_htstr"? (y or n) [answered Y; input not from terminal] Redefine command "____print_ft"? (y or n) [answered Y; input not from terminal] Redefine command "print_ft"? (y or n) [answered Y; input not from terminal] Redefine command "____print_inh_class"? (y or n) [answered Y; input not from terminal] Redefine command "____print_inh_iface"? (y or n) [answered Y; input not from terminal] Redefine command "print_inh"? (y or n) [answered Y; input not from terminal] Redefine command "print_pi"? (y or n) [answered Y; input not from terminal] Redefine command "____print_str"? (y or n) [answered Y; input not from terminal] Redefine command "printzn"? (y or n) [answered Y; input not from terminal] Redefine command "printzops"? (y or n) [answered Y; input not from terminal] Redefine command "zbacktrace"? (y or n) [answered Y; input not from terminal] Redefine command "zmemcheck"? (y or n) [answered Y; input not from terminal] (gdb) bt #0 0xe4068000 in ?? () #1 0xfda02060 in WhirlpoolTransform (context=0x4f9700) at /export/home/mysql/php-5.3.14/ext/hash/hash_whirlpool.c:166 #2 0xfda04e3c in _php_iconv_mime_decode (pretval=0x0, str=0x414550 "", str_nbytes=0, enc=0xffbeeed0 "ÿ¾îÃ", next_pos=0x1, mode=3505840) at /export/home/mysql/php-5.3.14/ext/iconv/iconv.c:1772 #3 0xfdc0f218 in mult (a=0x357d68, b=0xc000) at /export/home/mysql/php- 5.3.14/Zend/zend_strtod.c:727 #4 0xfdc0e50c in zend_exception_error (exception=0xffbef600, severity=1758304) at /export/home/mysql/php-5.3.14/Zend/zend_exceptions.c:765 #5 0xfdbeabf8 in zend_atoi (str=0x8 <Address 0x8 out of bounds>, str_len=1) at /export/home/mysql/php-5.3.14/Zend/zend_operators.c:68 #6 0xfdb8f278 in c_ziparchive_deleteName (ht=0, return_value=0xfe130430, return_value_ptr=0x6, this_ptr=0x8, return_value_used=1885892608) at /export/home/mysql/php-5.3.14/ext/zip/php_zip.c:2220 #7 0xfdc7f24c in ZEND_FETCH_OBJ_W_SPEC_CV_VAR_HANDLER (execute_data=0x341298) at /export/home/mysql/php-5.3.14/Zend/zend_gc.h:183 #8 0x0003dd48 in ap_run_handler (r=0x341298) at config.c:157 #9 0x0003e1dc in ap_invoke_handler (r=0x341298) at config.c:376 #10 0x00056784 in ap_process_request (r=0x341298) at http_request.c:282 #11 0x00053870 in ap_process_http_connection (c=0x33b358) at http_core.c:190 #12 0x000444e0 in ap_run_process_connection (c=0x33b358) at connection.c:43 #13 0x000714f0 in child_main (child_num_arg=0) at prefork.c:662 #14 0x00071754 in make_child (s=0x71000, slot=3) at prefork.c:763 #15 0x00071824 in startup_children (number_to_start=2) at prefork.c:781 #16 0x00072200 in ap_mpm_run (_pconf=0xf4698, plog=0xea400, s=0xf93a0) at prefork.c:1002 #17 0x0002aee4 in main (argc=3, argv=0xffbefcec) at main.c:739 -- Edit bug report at https://bugs.php.net/bug.php?id=62603&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=62603&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=62603&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=62603&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=62603&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=62603&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=62603&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=62603&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=62603&r=needscript Try newer version: https://bugs.php.net/fix.php?id=62603&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=62603&r=support Expected behavior: https://bugs.php.net/fix.php?id=62603&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=62603&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=62603&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=62603&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=62603&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=62603&r=dst IIS Stability: https://bugs.php.net/fix.php?id=62603&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=62603&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=62603&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=62603&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=62603&r=mysqlcfg