php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17236 trans-sid only replace links in first 4138chars
Submitted: 2002-05-15 02:25 UTC Modified: 2003-05-09 08:26 UTC
From: alan at akbkhome dot com Assigned:
Status: Closed Package: Session related
PHP Version: 4.2.* OS: FreeBSD
Private report: No CVE-ID: None
 [2002-05-15 02:25 UTC] alan at akbkhome dot com
OK, This is a strange one..... the whole application works perfectly on 4.0*/4.1*, but we started testing with 4.2.1
 
I'm filing it as a trans-sid bug (as thats whats noticable the most)- but it could be 
 - output buffer?!?
 - class variable issues..
 - other weird stuff....
 


------------Part of the html/php page  
<table border="0" cellpadding="3" cellspacing="1" width="62%">
<tbody>
<tr class="cleartable">
<td width="10%"><? if ( $auth->is_Requestor() ) { ?><img src="<?=htmlspecialchars($config->simple_base_url) ?>/translatorsdb/newpo
sts.gif" width="15" height="14" border="0" alt=""> </td>



-----------Output from the html page

<table border="0" cellpadding="3" cellspacing="1" width="62%">
<tbody>
<tr class="cleartable">
<td<img src="/translators/translatorsdb/newposts.gif" width="15" height="14" border="0" alt=""> </td>

___^___ notice the misformed html in the output.


the output is somehow getting messed up...

CONFIGURE LINE
 './configure' '--with-apxs=/usr/local/sbin/apxs' '--with-config-file-path=/usr/local/etc' '--enable-versioning' '--with-system-regex' '--disable-debug' '--enable-track-vars' '--without-gd' '--with-mysql' '--enable-trans-sid'
 
 
QUICK OVERVIEW OF FEATURE USED:
trans-sess-id sessions are being used  and it does manage to replace all href with the 'sid' before (roughly) the 4138th character, 
after that, even if the break is in a valid place 'htmlwize', it will not replace any hrefs after that postition.

the file/code above is included from within a class instance method 
eg. something like this.
class default_page {
	var $template = "home.html";
	function output() {
		$template->compile($this->template);
		
		global $session,$config;
		$auth = &$session->auth;
		include($template->ouput_file);
		
	}
}




regards
alan

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-05-15 04:14 UTC] alan at akbkhome dot com
fter some further investigation:

This can be reproduced in php4.1.2 by changing the php.ini setting
output_buffering = 4000
IN 4.1.2
if it is 'off' = code works perfectly
if it is 4000 (or any number) = code has same problem
IN 4.2.1
if it is 'off or 4000' code has problems.

looking at 4.3 - all this stuff has been completely re-written :)
 [2002-07-10 06:47 UTC] alan_k@php.net
This only affects FreeBSD on php4.2.1, and is fixed in CVS.
 [2003-05-09 08:26 UTC] alan_k@php.net
this also affects 4.2.3 on BSD - I'm presuming it's ok on 4.3 as the code changed significantly - awaiting feedback

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 18 07:01:33 2024 UTC