php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7802 get_meta_tags() segfaults on certain sites
Submitted: 2000-11-14 04:54 UTC Modified: 2000-11-15 04:41 UTC
From: erik dot monson at gte dot net Assigned:
Status: Closed Package: *URL Functions
PHP Version: 4.0.3pl1 OS: Linux 2.2.X SMP (Mandrake 7)
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: erik dot monson at gte dot net
New email:
PHP Version: OS:

 

 [2000-11-14 04:54 UTC] erik dot monson at gte dot 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-11-14 06:12 UTC] stas@php.net
Can you please give one example of URL where this function
crashes?

 [2000-11-15 04:18 UTC] 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-15 04:41 UTC] stas@php.net
OK, crash should be fixed. Please verify and repoen if it
still happens.

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun May 11 08:01:28 2025 UTC