From:             yuanhuanglin at hotmail dot com
Operating system: Linux (Redhat 9.0)
PHP version:      4.3.4
PHP Bug Type:     MySQL related
Bug description:  BUG  with  src=""

Description:
------------
1. Configure line of my PHP 4.3.4
***************************************
'./configure' '--with-apxs2=/usr/local/apache2/bin/apxs'
'--with-apache2=/usr/local/apache2' '--with-mysql=/usr/local/mysql'
'--enable-force-cgi-redirect' '--with-zlib' '--with-jpeg-dir'
'--with-png-dir' '--with-freetype-dir' '--with-gd'
'--with-mcrypt=/usr/local/lib' '--enable-bcmath' 

2. Changes of my php.ini
***************************************
asp_tags = On
safe_mode = Off
disable_functions = system exec
default_charset = 
session.name = D
session.cookie_domain = 
[Zend]
zend_optimizer.optimization_level=15
zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-2.1.0
zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-2.1.0
zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so

3. Information of MySQL
MySQL Support                   enabled 
Client API version              4.0.13  
MYSQL_MODULE_TYPE       external  
MYSQL_SOCKET            /tmp/mysql.sock  
MYSQL_INCLUDE           -I/usr/local/mysql/include  
MYSQL_LIBS                      -L/usr/local/mysql/lib -lmysqlclient  

4. Description:
***************************************
Because I want to log the accesses to the authenticating page of my site I
created a table named ¡°log_access¡± in MySQL which had a structure like
below:
¡°
CREATE TABLE `log_access` (
  `id` int(7) unsigned NOT NULL auto_increment,
  `ip` varchar(16) NOT NULL default '',
  `access_time` varchar(14) NOT NULL default '',
  `sql_access_time` datetime NOT NULL default '0000-00-00 00:00:00',
  `hostname` varchar(35) default NULL,
  `times` int(10) NOT NULL default '0',
  UNIQUE KEY `id` (`id`)
) TYPE=MyISAM AUTO_INCREMENT=138 ;
¡°
I also built a function called Create_Log_Access(), saved in an extral
file named fun_log.inc.php, which can return a log_access-SQL-query. 
In my authenticating page which I request user to enter the username and
password, I added such three lines like below to run Create_Log_Access():
¡°
        require("./myadmin/connect.inc.php");           // Connection to MySQL
        require_once("./myadmin/fun_log.inc.php");              // Include the funtion.
        $query_log_access = Create_Log_Access();
        mysql_query($query_log_access);
        mysql_close();
¡°
This can be done even if a user does nothing but just access the
authenticating page. And if the user is accepted, this page will redirect
the user to another page which named user.php by using the script

 header('Location: user.php'); 

. And of course I didn¡¯t add any scripts that can include or can run the
Create_Log_Access() in my other pages except the authenticating page.
Problem:  But I still found the number in my table ¡°log_access¡± is
increasing when I access some other pages even if in which I only use pure
html scripts. I cut any html scripts which will not effect the wrong
result and finally found that the script in the line below result the
problem.

<img src="" width="6" height="6" alt="" hspace="0"  vspace="0" border="1"
style="background-color: #617EBA">

This is a script which can display a colorful square in my page just for
beauty. But when I delete the src="" part, everything return to normal --
the number in the table will not increase.

So I am wondering whether it is a bug of PHP or something else because
this happened after I just updated the PHP from 4.3.2 to 4.3.4. 

Thank you.


Reproduce code:
---------------
http://www.s.fpu.ac.jp/t-yuan/php4.3.4_bug.htm

Expected result:
----------------
Do not do any counting in my 'log_access' table.

Actual result:
--------------
Do the counting in my 'log_access' table.

-- 
Edit bug report at http://bugs.php.net/?id=26370&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=26370&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=26370&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=26370&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=26370&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=26370&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=26370&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=26370&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=26370&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=26370&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=26370&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=26370&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26370&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=26370&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=26370&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=26370&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26370&r=float

Reply via email to