PHP 4.0 Bug #7802 Updated: get_meta_tags() segfaults on certain sites

From: Date: Wed, 15 Nov 2000 09:41:25 +0000
Subject: PHP 4.0 Bug #7802 Updated: get_meta_tags() segfaults on certain sites
Groups: php.dev 
Request: Send a blank email to php-dev+get-38129@lists.php.net to get a copy of this message
ID: 7802 Updated by: stas Reported By: erik.monson@gte.net Status: Closed Bug Type: *URL Functions Assigned To: Comments: OK, crash should be fixed. Please verify and repoen if it still happens. Previous Comments: --------------------------------------------------------------------------- [2000-11-15 04:18:00] stas@php.net Verified - crashes on http://151.196.200.20 (warning: this is an adult site, so I am not responcible if you get a heart attack after looking on it, I need it only for HTML parsing debugging :) --------------------------------------------------------------------------- [2000-11-14 06:12:51] stas@php.net Can you please give one example of URL where this function crashes? --------------------------------------------------------------------------- [2000-11-14 04:54:26] erik.monson@gte.net I am running the php CGI in shell scripts. A database SELECT downloads a list of websites (that are known to exist) and feeds each IP address like so: $meta_data = get_meta_tags(http://$url); And it frequently segfaults - often when it reaches the same site. Could it be a problem with the URL? Here is the backtrace on the core from gdb: Core was generated by `php -q ./test.sh'. Program terminated with signal 11, Segmentation fault. Reading symbols from /lib/libpam.so.0...done. Reading symbols from /lib/libdl.so.2...done. Reading symbols from /usr/lib/libsnmp.so.0...done. Reading symbols from /usr/lib/libz.so.1...done. Reading symbols from /usr/lib/libpng.so.2...done. Reading symbols from /usr/lib/libgd.so.1...done. Reading symbols from /lib/libresolv.so.2...done. Reading symbols from /lib/libm.so.6...done. Reading symbols from /lib/libcrypt.so.1...done. Reading symbols from /lib/libnsl.so.1...done. Reading symbols from /lib/libc.so.6...done. Reading symbols from /lib/ld-linux.so.2...done. Reading symbols from /usr/lib/gconv/ISO8859-1.so...done. Reading symbols from /lib/libnss_files.so.2...done. Reading symbols from /lib/libnss_nisplus.so.2...done. Reading symbols from /lib/libnss_nis.so.2...done. Reading symbols from /lib/libnss_dns.so.2...done. #0 0x80f6a5b in zend_hash_find (ht=0x81e9d34, arKey=0x81db49c "keywords", nKeyLength=9, pData=0xbfffd720) at zend_hash.c:859 859 if ((p->h == h) && (p->nKeyLength == nKeyLength)) { (gdb) (gdb) (gdb) (gdb) (gdb) (gdb) (gdb) bt #0 0x80f6a5b in zend_hash_find (ht=0x81e9d34, arKey=0x81db49c "keywords", nKeyLength=9, pData=0xbfffd720) at zend_hash.c:859 #1 0x812d1a6 in zend_fetch_dimension_address_inner (ht=0x81e9d34, op2=0x81df108, Ts=0xbfffd7c4, type=0) at ./zend_execute.c:521 #2 0x8124767 in zend_fetch_dimension_address (result=0x81df0e8, op1=0x81df0f8, op2=0x81df108, Ts=0xbfffd7c4, type=0) at ./zend_execute.c:665 #3 0x8126890 in execute (op_array=0x81d18fc) at ./zend_execute.c:1185 #4 0x80f1ed4 in zend_execute_scripts (type=8, file_count=3) at zend.c:717 #5 0x806090f in php_execute_script (primary_file=0xbffff8e4) at main.c:1200 #6 0x805e82c in main (argc=3, argv=0xbffff974) at cgi_main.c:715 (gdb) quit PHP was compiled with the following 'configure' flags: ./configure --with-mysql --with-gd --with-snmp --enable-debug --enable-track-vars Thanks in advance !! Erik Monson erik.monson@gte.net --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=7802

« previous php.dev (#38129) next »