php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7262 Segfaults when URLs are rewritten
Submitted: 2000-10-16 20:01 UTC Modified: 2000-12-22 18:01 UTC
From: sean at fojar dot com Assigned: sas (profile)
Status: Closed Package: Session related
PHP Version: 4.0.3pl1 OS: RH Linux 6.2 kernl 2.1.16
Private report: No CVE-ID: None
 [2000-10-16 20:01 UTC] sean at fojar dot com
I've reported this before and every time get the ticket closed with messages like "Fixed in CVS" or "Fixed in next version."

It's still happening.  Every now and then, maybe every one out of 20 random pages, when cookies are disabled and URLs are being rewritten, the page just comes up blank or only half of the content is there.  I look at apache's error_log and see that it died with a segfault.

Linux 2.1.16
Apache 1.3.14 (also happens with 1.3.12)
PHP 4.0.3pl1 (had this problem with every version since 4.0.1 though)
Stock php.ini-optimized, only things changed are "Register Globals" turned on, trans sid turned on, an include directory set.

PHP compiled without mysql, enable trans sid, and with custom ODBC.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-10-17 13:14 UTC] sas@php.net
Please read

http://bugs.php.net/bugs-dos-and-donts.php

We cannot help you without a backtrace. Please refer to

http://bugs.php.net/bugs-generating-backtrace.php
 [2000-10-18 14:31 UTC] sas@php.net
Changing status to feedback.
 [2000-10-19 13:30 UTC] sean at fojar dot com
Backtrace after a segfault (the segfaults never occur when I accept the cookie, only when URLs are being rewritten transparently):
------------
#0  0x400c8fe5 in memmove (dest=0x8170ed4, src=0x8171081, len=4294967292)
    at ../sysdeps/generic/memmove.c:98
#1  0x4045d76e in mainloop () from /usr/local/apache/libexec/libphp4.so
#2  0x4045cb69 in url_adapt_ext_ex () from /usr/local/apache/libexec/libphp4.so
#3  0x4040a958 in session_adapt_uris ()
   from /usr/local/apache/libexec/libphp4.so
#4  0x40459ebe in php_ub_body_write_no_header ()
   from /usr/local/apache/libexec/libphp4.so
#5  0x404597bb in php_body_write () from /usr/local/apache/libexec/libphp4.so
#6  0x403d3b09 in php_body_write_wrapper ()
   from /usr/local/apache/libexec/libphp4.so
#7  0x403bf9a2 in zend_print_zval_ex ()
   from /usr/local/apache/libexec/libphp4.so
#8  0x403bf92e in zend_print_zval () from /usr/local/apache/libexec/libphp4.so
#9  0x403bf47b in zend_print_variable ()
   from /usr/local/apache/libexec/libphp4.so
#10 0x403ac6eb in execute () from /usr/local/apache/libexec/libphp4.so
#11 0x403b1654 in execute () from /usr/local/apache/libexec/libphp4.so
#12 0x403b1654 in execute () from /usr/local/apache/libexec/libphp4.so
#13 0x403c08d3 in zend_execute_scripts ()
   from /usr/local/apache/libexec/libphp4.so
#14 0x403d4924 in php_execute_script ()
   from /usr/local/apache/libexec/libphp4.so
#15 0x403d08ab in apache_php_module_main ()
   from /usr/local/apache/libexec/libphp4.so
#16 0x403d1445 in send_php () from /usr/local/apache/libexec/libphp4.so
#17 0x403d1485 in send_parsed_php () from /usr/local/apache/libexec/libphp4.so
#18 0x806d703 in ap_invoke_handler ()Cannot access memory at address 0x3336332c


 [2000-10-19 13:33 UTC] sean at fojar dot com
It's rewriting href's in area maps, if that is any help.

Also it's rewriting those IMG tags in the javascript, which I talked to you about before, but have changed to say:

var x = '<img src="image.gif">';

when it doesn't segfault, that is rewritten correctly.
 [2000-10-20 20:01 UTC] sas@php.net
From sean@fojar.com

I made some changes to the HTML and the problem seems to have stopped.

I picked up this web project when it was half-done already by someone
else.  This other person was fond of using single quotes for all the
HTML paramters.  <table width='100%'> <img src='blah.jpg'>

I went through and replaced all the single quotes with double quotes
(except in the case of those lines of JavaScript I've talked to you
about before) and it stopped segfaulting.
 [2000-12-22 18:01 UTC] sas@php.net
Forgot to close back in October.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Apr 28 22:01:29 2024 UTC