php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5806 "Parse error" reporting in php-4.0.1pl2 which was working fine in php-3.0.9
Submitted: 2000-07-27 07:20 UTC Modified: 2000-07-27 08:41 UTC
From: ssh at baba9 dot com Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0.1pl2 OS: Linux and Free-bsd
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: ssh at baba9 dot com
New email:
PHP Version: OS:

 

 [2000-07-27 07:20 UTC] ssh at baba9 dot com
<?
include( "db_mysql.inc" );

class DB_Ads extends DB_Sql {
	var $Host = $GLOBALS["CF"]["MYSQL_SERVER"];
	var $User = $GLOBALS["CF"]["MYSQL_USER_NAME"];
	var $Password = $GLOBALS["CF"]["MYSQL_PASSWORD"];
	var $Database = "phpads";

}

?>

the "db_mysql.inc" contains the class "DB_Sql".
This above script doesn't give any problem in php-3.0.9 where as in php-4.0.1pl2 it say's "Parse error: parse error in test.php on line 5" ie It is not accepting the following line
"var $Host = $GLOBALS["CF"]["MYSQL_SERVER"];"

Can any body suggest what could be the problem...

regards.
siva




















Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-27 08:41 UTC] hholzgra@php.net
php 4 does only allow constants for class member initialization,
for everything else you have to use the constructor

this is one of the published incompatibilites 
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 15:01:28 2024 UTC