Another minor issue that I’ve so far noticed is:
Reports, all of the pages will not work and it appears it’s because it has to communicate with the database. This communication is lost because the mysql_query statements within this pages look to be sending to a variable $conn that doesn’t exist for those pages. Also, as it needs to communicate with the database, the base configuration files are not existing either. My best suggestion would be to make a configuration file that stores the references needed within a file called something like base.inc.php that includes the base required files of commons/init.php commons/init.database.php. For the $conn variable, suggest an include statement of the base.inc.php so that the $conn system can be accessed even though it’s not directly defined in the file. So, basically, all main files should have an include BASEPATH . ‘commons/base.inc.php’; statement in them. This would also work for all other file that request this same information.
Found out that Pending MACs.php file the reference to class HostManager works if called like this:
$hostMan = new HostManager(); Rather than
$hostMan = $FOGCore->getClass(‘HostManager’);
Fixed and working on my side.
My base.inc.php file is:
<?php
/* This file just stores the heading information for including *
- In the FOG System. This should minimize code lines. *
-
*/
if (!defined(‘BASEBATH’))
require_once(‘system.php’);
require_once(BASEPATH . ‘/commons/config.php’);
require_once(BASEPATH . ‘/commons/init.php’);
require_once(BASEPATH . ‘/commons/init.database.php’);
$conn = @mysql_connect( DATABASE_HOST, DATABASE_USERNAME, DATABASE_PASSWORD);
?>
and is located in commons.
Then added the line to the files needed. Though I guess in the management/index.php all you should need is the reference :
include ‘…/commons/base.inc.php’;
In the reports *.php files.
include BASEPATH . ‘/commons/base.inc.php’;