php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13128 bug when specific html code is on the page
Submitted: 2001-09-04 08:13 UTC Modified: 2001-09-04 19:50 UTC
From: jrozot at club-internet dot fr Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 4.0.6 OS: FreeBSD 4.3-4.4
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: jrozot at club-internet dot fr
New email:
PHP Version: OS:

 

 [2001-09-04 08:13 UTC] jrozot at club-internet dot 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'

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-09-04 19:50 UTC] sniper@php.net
Same problem as in #10599
Not bug in PHP but in your HTML..

--Jani

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jan 15 13:01:29 2025 UTC