ID:               26760
 Updated by:       [EMAIL PROTECTED]
 Reported By:      eero at volotinen dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Unknown/Other Function
 Operating System: linux 2.6
 PHP Version:      5CVS-2004-01-01 (dev)
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

As Derick said.


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

[2004-01-02 05:56:39] [EMAIL PROTECTED]

I don't think that anything is broken here. You just can't have a
conditional class definition (just like you can't instantiate a class
before it's declared anymore). 

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

[2004-01-02 05:26:04] [EMAIL PROTECTED]

Changing title.

I suspect marcus's fix broke this.
http://news.php.net/article.php?group=php.zend-engine.cvs&article=2159

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

[2004-01-02 05:07:53] eero at volotinen dot com

Used this test script:

<?php
if(!defined("SQL_LAYER"))
{

define("SQL_LAYER","mysql");

class sql_db
{
 var $test;
}
} // end if..
?>

Php reports error at line 7 which starts :

class sql_db ..

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

[2004-01-02 05:00:30] [EMAIL PROTECTED]

can you test the simple script below.. - line 27 appears to be the
class definition line. 

test it with php -l test.php
(eg. syntax test it.)

.. if this works, go back to the mysql.php file, and remove chunks.
(eg. methods) and syntax test it - narrowing down the problem.




<?php
if(!defined("SQL_LAYER"))
{

define("SQL_LAYER","mysql");

class sql_db
{
 var $test;
}
} // end if..


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

[2004-01-02 04:53:03] eero at volotinen dot com

[02-Jan-2004 09:19:12] PHP Parse error:  parse error in
/home/apache/www/forum/phpBB2/db/mysql.php on line 27

[02-Jan-2004 09:19:12] PHP Fatal error:  Class 'sql_db' not found in
/home/apache/www/forum/phpBB2/includes/db.php on line 60

Both files can be found from :
http://www.linux.ncp.fi/~eero/php_error/

I think problem was started on a few days builds.

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

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/26760

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

Reply via email to