In an attempt to make a database connection class I have taken these initial steps without success:
1. change admin.php
nano /var/www/clients/client1/web4/web/support/scp/admin.php
after
case 'staff':
include_once(INCLUDE_DIR.'class.staff.php');
added
// added by Rolf Pfotenhauer 1/2/2011
include_once(INCLUDE_DIR.'class.dbconfig.php');
after
switch($do){
case 'update':
added
$dbconfig = new dbconfig($_POST);
2. create class class.dbconfig.php
copied
cp /var/www/clients/client1/web4/web/support/include/class.staff.php
/var/www/clients/client1/web4/web/support/include/class.dbconfig.php
3. changed class definition to
class dbconfig {
and also
function dbconfig($var){
4. change staff.inc.php
in file
nano /var/www/clients/client1/web4/web/support/include/staff/staff.inc.php
after
// Used for NEW staff and for updating staff
$rep=null;
$newuser=true;
added
if (!class_exists('dbconfig')) {
echo "Unable to connect to class: dbconfig";
exit;
}
5. open osTicket
go to Staff
click add new user
I get my message "Unable to connect to class: dbconfig"
meaning that it does not know about the class 'dbconfig'.
There must be something else that I have forgotten to make this work.
Can anyone help?