Edit report at https://bugs.php.net/bug.php?id=53925&edit=1
ID: 53925 Comment by: tester123 at mail dot ru Reported by: stadnicki at gmail dot com Summary: Segmentation Fault while useing mysql.so Status: Feedback Type: Bug Package: MySQL related Operating System: FreeBSD 7.3 amd64 PHP Version: 5.3.5 Block user comment: N Private report: N New Comment: Hi. Here is my gdb output: gdb php /root/php.core ... This GDB was configured as "amd64-marcel-freebsd"...(no debugging symbols found)... Core was generated by `php'. Program terminated with signal 11, Segmentation fault. Reading symbols from /lib/libcrypt.so.4...(no debugging symbols found)...done. Loaded symbols for /lib/libcrypt.so.4 Reading symbols from /usr/lib/librt.so.1...(no debugging symbols found)...done. Loaded symbols for /usr/lib/librt.so.1 Reading symbols from /lib/libm.so.5...(no debugging symbols found)...done. Loaded symbols for /lib/libm.so.5 Reading symbols from /usr/local/lib/libxml2.so.5...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libxml2.so.5 Reading symbols from /lib/libz.so.4...(no debugging symbols found)...done. Loaded symbols for /lib/libz.so.4 Reading symbols from /usr/local/lib/libiconv.so.3...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libiconv.so.3 Reading symbols from /lib/libc.so.7...(no debugging symbols found)...done. Loaded symbols for /lib/libc.so.7 Reading symbols from /libexec/ld-elf.so.1...(no debugging symbols found)...done. Loaded symbols for /libexec/ld-elf.so.1 #0 0x00000008055e27b0 in ?? () (gdb) bt #0 0x00000008055e27b0 in ?? () Cannot access memory at address 0x7fffffffea48 (gdb) quit When i disable the mysql.so extension, all working. Please, solve the problem. Previous Comments: ------------------------------------------------------------------------ [2011-02-04 14:22:51] paj...@php.net Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php for *NIX and http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32 Once you have generated a backtrace, please submit it to this bug report and change the status back to "Open". Thank you for helping us make PHP better. ------------------------------------------------------------------------ [2011-02-04 14:21:18] stadnicki at gmail dot com Description: ------------ PHP was configured with: --prefix=/usr/local/"$DNAME" \ --target=i686-pc-freebsd \ --disable-debug \ --enable-exif \ --enable-libxml \ --enable-soap \ --with-iconv \ --with-zlib \ --enable-cli \ --with-curl \ --enable-mbstring=all \ --with-gettext \ --with-apxs2=/usr/local/apache/bin/apxs \ --with-gd \ --with-openssl \ --with-jpeg-dir \ --with-pear=/usr/local/php/lib/php \ --with-freetype-dir=/home/www/ \ --with-mssql \ --disable-phar \ --with-mcrypt then compiled and installed to: /usr/local/php-5.3.5 After that I needed to compile mysql.so from PHP extensions sources. We need to test basic mysql module before we will write our own (mysql is installed into /usr/local/mysql). So in directory of PHP sources (/home/soft/php-5.3.5/ext/mysql) : machine1# /usr/local/php-5.3.5/bin/phpize machine1# ./configure --with-php-config=/usr/local/php-5.3.5/bin/php-config --with-mysql=/usr/local/mysql machine1# make Here is everything OK, but after: machine1# /usr/local/php-5.3.5/bin/php -m -d extension=/home/php-5.3.5/ext/mysql/modules/mysql.so I recieve a Segmentation fault: 11 (core dumped) Test script: --------------- Just run php: /usr/local/php-5.3.5/bin/php -m -d extension=/home/php-5.3.5/ext/mysql/modules/mysql.so Expected result: ---------------- machine1# /usr/local/php-5.3.5/bin/php -m -d extension=/home/php-5.3.5/ext/mysql/modules/mysql.so [PHP Modules] Core ctype curl date dom ereg exif fileinfo filter gd gettext hash iconv json libxml mbstring mcrypt mssql mysql openssl pcre PDO pdo_sqlite posix Reflection session SimpleXML soap SPL SQLite sqlite3 standard tokenizer xml xmlreader xmlwriter zlib [Zend Modules] machine1# Actual result: -------------- machine1# /usr/local/php-5.3.5/bin/php -m -d extension=/home/php-5.3.5/ext/mysql/modules/mysql.so [PHP Modules] Core ctype curl date dom ereg exif fileinfo filter gd gettext hash iconv json libxml mbstring mcrypt mssql mysql openssl pcre PDO pdo_sqlite posix Reflection session SimpleXML soap SPL SQLite sqlite3 standard tokenizer xml xmlreader xmlwriter zlib [Zend Modules] Segmentation fault: 11 (core dumped) machine1# ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=53925&edit=1