php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7701 loads include files twice
Submitted: 2000-11-08 16:24 UTC Modified: 2001-03-08 20:34 UTC
From: fmoreira at imediata dot pt Assigned:
Status: Closed Package: IIS related
PHP Version: 4.0.3pl1 OS: W2k IIS5
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: fmoreira at imediata dot pt
New email:
PHP Version: OS:

 

 [2000-11-08 16:24 UTC] fmoreira at imediata dot pt
sometimes... I can't especify how or the circumstances that make it happen.

when I load the PHP script (that has an 'include' statement) it loads twice the include file...

mod0.php:

"if(!$fs) 
    include("funcoes.php");"

funcoes.php:

"
$fs=1;
..."

the $fs variable was a way I used to check if the problem is in the script or in the script engine...

IF THE BROWSER RELOADS THE PAGE, IT OPENS CORRECTLY...
IF THE BROWSER RELOADS THE PAGE AGAIN, HAPPENS THE ERROR AGAIN...

I'm using the phpisapi.dll with no extensions

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-11-08 17:21 UTC] fmoreira at imediata dot pt
after trying include_once the same error ocurrs

"Fatal error: Cannot redeclare imagens_carregar() in include/funcoes.php on line 18"

imagens_carregar() is the first function in the included file


 [2000-12-30 12:18 UTC] jmoore@php.net
Ill try to recreate this one and get to the bottom of it.

James
 [2001-01-28 15:55 UTC] jmoore@php.net
lets actually assign this this time and see if I remember to do it ;)
 [2001-01-28 16:06 UTC] jmoore@php.net
Can reproduce this on Win2k IIS 5.0, please upgrade to latest verison of PHP and report if it still doesnt work

James
 [2001-03-08 20:34 UTC] sniper@php.net
No feedback.

--Jani

 [2011-11-22 13:35 UTC] dinofly at planetemu dot net
Hi,

I am experiencing the same issue on IIS 6 and PHP 5.2.5.

This is not limited to the "include" or "include_once", as i was able to reproduce it with this simple script :

<?php
define('MY_CONSTANT', 1);
exit;
?>

This produces the following error :
Notice: Constant MY_CONSTANT already defined in [...]\index.php on line 2

There is no auto_prepend nor auto_append file configured.

Since it occurs on a client's platform, i am afraid that i can't change anything on this server nor show you the whole phpinfo as it is confidential, but here is the beginning :

PHP Version 5.2.5

System 	Windows NT EUROSUGAR 5.2 build 3790
Build Date 	Nov 8 2007 23:18:08
Configure Command 	cscript /nologo configure.js "--enable-snapshot-build" "--with-gd=shared"
Server API 	ISAPI
Virtual Directory Support 	enabled
Configuration File (php.ini) Path 	C:\WINDOWS
Loaded Configuration File 	C:\WINDOWS\php.ini
PHP API 	20041225
PHP Extension 	20060613
Zend Extension 	220060519
Debug Build 	no
Thread Safety 	enabled
Zend Memory Manager 	enabled
IPv6 Support 	enabled
Registered PHP Streams 	php, file, data, http, ftp, compress.zlib
Registered Stream Socket Transports 	tcp, udp
Registered Stream Filters 	convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, zlib.* 


Hope this helps...
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 12:01:27 2024 UTC