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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
11 + 13 = ?
Subscribe to this entry?

 
 [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-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 08:01:28 2024 UTC