php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1758 Class problem
Submitted: 1999-07-20 13:23 UTC Modified: 1999-08-07 11:39 UTC
From: carmelo at melting-soft dot com Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0 Beta 1 OS: linux SUSE 5.x apache php mysql
Private report: No CVE-ID: None
 [1999-07-20 13:23 UTC] carmelo at melting-soft dot com
first I used this script :

if (!$config) {
  $theroot="/usr/local/etc/httpd/sites/idm-conseil.com"; 
  $euro=6.55957; //conversion euro vers francs
  include "phlib/db_mysql.inc";
  include "phlib/db_usql.inc";
  include "phlib/table.inc";
  include "phlib/tmpl_table.inc";
  include "epa/listbox.inc";
  include "epa/checkboxes.inc";
  $config=1;

Class DB_DH extends DB_USql {
  var $Host     = "";         
  var $Database = "directhotel";      
  var $User     = "root";            
  var $Password = "";

}

} // fin if (!$config)

the class DB_DH register but the variable are blank when I instantiate an object.

then I modified to this one

  $theroot="/usr/local/etc/httpd/sites/idm-conseil.com"; 
  $euro=6.55957; //conversion euro vers francs
  include "phlib/db_mysql.inc";
  include "phlib/db_usql.inc";
  include "phlib/table.inc";
  include "phlib/tmpl_table.inc";
  include "epa/listbox.inc";
  include "epa/checkboxes.inc";

Class DB_DH extends DB_USql {
  var $Host     = "";         
  var $Database = "directhotel";      
  var $User     = "root";            
  var $Password = "";
}

and I only have a message saying that I had no data.

then I separated the class statement in one php include :

file local.inc contains :
Class DB_DH extends DB_USql {
  var $Host     = "";         
  var $Database = "directhotel";      
  var $User     = "root";            
  var $Password = "";
}

file config.inc contains:
  $theroot="/usr/local/etc/httpd/sites/idm-conseil.com"; 
  $euro=6.55957; //conversion euro vers francs
  include "phlib/db_mysql.inc";
  include "phlib/db_usql.inc";
  include "phlib/table.inc";
  include "phlib/tmpl_table.inc";
  include "epa/listbox.inc";
  include "epa/checkboxes.inc";
  include "local.inc";

and it works fine. but this is only a round away.

bye 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-07-27 16:54 UTC] zeev at cvs dot php dot net
This should be fixed in the latest CVS.
 [1999-08-07 11:39 UTC] zeev at cvs dot php dot net
No user response - should be fixed in the latest CVS - closed.
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC