|  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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
29 + 20 = ?
Subscribe to this entry?

 [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:


        <td background="#000000">

        	$QUERY = "SELECT visiteurs FROM compteur where id=1";				
		$result = mysql_query($QUERY);
		$val = mysql_fetch_row($result);
        	$nb = $val['0'];
        	$nb = $nb +1;
        	$query2 = "UPDATE compteur set visiteurs = '$nb' where id=1";
        	$result2 = mysql_query($query2);

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'


Add a Patch

Pull Requests

Add a Pull Request


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


PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Mon Jun 05 20:03:39 2023 UTC