ID:               33357
 Updated by:       [EMAIL PROTECTED]
 Reported By:      elite at programmer dot net
-Status:           Open
+Status:           Feedback
 Bug Type:         Zend Engine 2 problem
 Operating System: Windows 2003 SP1
 PHP Version:      5.0.4
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip




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

[2005-06-15 23:04:10] elite at programmer dot net

Description:
------------
When using require_once("file.php") to include "file.php" in multiple
files, files which are included in each another on several levels,
require_once("file.php") randomly fails to include the file at all.
Most of the time it includes it, but sometimes it will just fail and
the system will come to a halt since that file is vital.

Changing to require("file.php") works, but obviously this would include
the file several times.

Reproduce code:
---------------
inc.php

$dsn = 'mssql://user:[EMAIL PROTECTED]/database';
$db = DB::connect($dsn);
if( PEAR::isError( $db ) )
{
   die "Database connect failed";
}

file1.php:

require_once("inc.php");

file2.php
require_once("file1.php");
require_once("inc.php");

Expected result:
----------------
inc.php included once every timed

Actual result:
--------------
inc.php sometimes is not included at all, since the database connection
in inc.php is not initialized and $db is NULL


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


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

Reply via email to