Bug #13128 Updated: bug when specific html code is on the page

From: Date: Tue, 04 Sep 2001 23:50:32 +0000
Subject: Bug #13128 Updated: bug when specific html code is on the page
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-65118@lists.php.net to get a copy of this message
ID: 13128
Updated by: sniper
Reported By: jrozot@club-internet.fr
Old Status: Open
Status: Bogus
Bug Type: MySQL related
Operating System: FreeBSD 4.3-4.4
PHP Version: 4.0.6
New Comment:

Same problem as in #10599
Not bug in PHP but in your HTML..

--Jani


Previous Comments:
------------------------------------------------------------------------

[2001-09-04 08:13:23] jrozot@club-internet.fr

this bug was found using php v4.0.6. it was tested on 2 computers a FreeBSD4.3 and a FreeBSD4.4 both
with php 4.0.6.

The bug is, that with some html code on the page the counter doesn't work correctly, it count
from 2 on 2 and not from 1 on 1.
The bug is caused by the code "<td background="#...>"
More exactly due to the "#". but this code is not between the <? ?> and php should
not be affected.


here is the code for a simple counter:

<HTML>
<table>
  <tr>

        <td background="#000000">

 	<?
  	mysql_connect("localhost","user","pass");
		mysql_select_db("database");	
        	$QUERY = "SELECT visiteurs FROM compteur where id=1";				
		$result = mysql_query($QUERY);
		$val = mysql_fetch_row($result);
        	$nb = $val['0'];
        	echo"$nb";
        	$nb = $nb +1;
        	$query2 = "UPDATE compteur set visiteurs = '$nb' where id=1";
        	$result2 = mysql_query($query2);
        ?>
        </td>
        </table>
        </html>

the database structure is:

CREATE TABLE compteur (
   id tinyint(4) DEFAULT '0' NOT NULL,
   visiteurs int(11) DEFAULT '0' NOT NULL
);


INSERT INTO compteur VALUES ( '1', '0');

this is my php configure options:

'./configure2' '--with-mysql=../mysql'
'--with-config-file-path=/usr/local/www2/conf' '--with-gd=/usr/local'
'--with-png-dir=/usr/local' '--with-zlib-dir=/usr/local'
'--enable-track-vars' '--enable-ftp'
'--with-apxs=/usr/local/www2/bin/apxs' '--with-jpeg-dir=/usr/local'

and the configure optiosn on the second computer tested:
'./configure' '--with-mysql=/opt1/mysql'
'--with-config-file-path=/opt1/www/conf' '--with-gd=/usr/local'
'--with-png-dir=/usr/local' '--with-zlib-dir=/usr/local'
'--enable-track-vars' '--enable-ftp' '--with-apxs=/opt1/www/bin/apxs'
'--with-jpeg-dir=/usr/local' '--enable-bcmath' '--enable-sockets'
'--with-openssl'

------------------------------------------------------------------------



Edit this bug report at http://bugs.php.net/?id=13128&edit=1



Thread (2 messages)

« previous php.dev (#65118) next »