Been fighting with this: includes and admin username
Status: Beta
Brought to you by:
linusx
I love the look of this and think it's really good but I'm just about beat on the "getting it running" aspect. I've been editing php files for the last two hours and my fingers are now sore.
The users database does not include an admin username (contrary to the INSTALL document) and adding more users doesn't seem to actually make a difference.
Has anyone got this up and running and would they fancy giving out some hints?
M
matt@nimug.org
MySQL version 3.23.39
PHP Version 4.1.2
Darwin fisheye 6.0 Darwin Kernel Version 5.2: Mon Jun 17 09:55:14 PDT 2002; root:xnu-201-14.roots/xnu-201-14.obj/RELEASE_PPC Power Macintosh powerpc
Logged In: YES
user_id=503163
It appears this release has a few bugs. I've just started
playing with it, and I did manage to get past the login
problems by modifying scripts/login.php
Change:
$password1 = trim($HTTP_POST_VARS["password1"]);
To:
$password1 = trim($HTTP_POST_VARS["password"]);
Logged In: NO
First off here is a list of problems I have run into.
1.) (inc) paths are not correct or were not correct in any of my .php
files
************************************************************
Fix for (inc) path problems.
Manually edit all .php files with a term editor if need be. You will see
the following entries in almost all of the .php files in the helpdesk
directory and subdirectories.
include_once("/secure.inc.php");
include_once("/header.inc.php");
include_once("/footer.inc.php");
You will have to edit the .php files in the subdirectories of the main
helpdesk folder also. The subdirectories are listed as follows in my
version of Mantis Helpdesk.
(inc), (scripts), (scripts/admin), (admin), (tickets), (htdocs), (bin),
(conf), (images).
Anyway, the fix is to edit the paths in each .php file to the correct
path, which is the (inc) subdirectory.
Example:
include_once("inc/secure.inc.php");
include_once("inc/header.inc.php");
You will notice that I had to add the path variable (inc) to the
beginning of the files that need to be included for the script to work. If
your in a subdirectory of the Helpdesk folder the path will look like
this.
include_once("../inc/secure.inc.php");
include_once("../inc/header.inc.php");
This way the system knows to dig back one directory to get to the
main (inc) directory for those files. MAKE SURE YOU CHECK THE
BOTTOM OF EVERY FILE for ( include_once("footer.inc.php"); ). If you
don't you will still get errors.
************************************************************
2.) All My Tickets, Open Tickets, and My Tickets would not show up
correctly and caused the error ( can not find helpdesk.hd_ )
To fix this issue I had to do the following in Version 1.0.
************************************************************
In the subdirectory (tickets) in the main Helpdesk folder you will find
the following files.
(add_requestor.php) (customer.php) (index.php) (my.php)
(new.php) (open.php) (printer.php) (view_ticket.php)
For one make sure if your editing these files that you check your
include paths while your at it.
NEXT...
Open each file with a term editor if need be and you will first check
your (inc) paths then right under that you should see the following....
$result = $m->query("SELECT id, assigned, requestor,
requesting_company, email, short_desc, long_desc, status,
DATE_FORMAT(entered, '%c/%e/%Y %l:%i %p') as entered,
update_by,
DATE_FORMAT(last_update, '%c/%e/%Y %l:%i %p') as last_update,
priority FROM hd_ <<<<<<------------- THIS WAS MY PROBLEM!!!
At the very end of the line when it defines what database TABLE to get
the information from it only had (hd_) which in turn created the error
I was getting when trying to edit, lookup All Tickets, etc.
the fix is this....
Add the word (issues) to the end of the line like this....
$result = $m->query("SELECT id, assigned, requestor,
requesting_company, email, short_desc, long_desc, status,
DATE_FORMAT(entered, '%c/%e/%Y %l:%i %p') as entered,
update_by,
DATE_FORMAT(last_update, '%c/%e/%Y %l:%i %p') as last_update,
priority FROM hd_issues <<<<<<<-------THIS IS THE FIXED ONE.
Notice it went from hd_ to hd_issues.
All done ..... you should have almost 100% of Mantis Helpdesk running
now.
************************************************************
3.) Possible fix for your issue with ADMIN USER NAME.
************************************************************
First thing in order here is to make sure you created the database
helpdesk in MySQL......if not use this.
mysql -u USERNAME -p
password: Enter your pass here
mysql> create database helpdesk; (hit enter)
You should recieve a message like the following providing mysql is
running correctly on your system.
Query OK, 1 row affected (0.23 sec)
mysql> \q <----- type \q to quit mysql
NEXT STEP........
Make sure your in your main Helpdesk directory....you will find a file
called (mhelpdesk.sql). This is the main file to create the correct
tables in your new helpdesk database. Type or copy and paste the
following to enter the tables into your database as long as your
database is called helpdesk.
FIRST STEP.......
mysql -u USERNAME -p helpdesk < mhelpdesk.sql
password: PASSWORD HERE (hit enter after your password)
it will enter your tables into the helpdesk database and return you
back to a prompt.
prompt#
This shoud complete your install of Mantis Helpdesk and inital user
entries because the user entries are at the bottom of the
mhelpdesk.sql file as follows....
# Inserts for Users
# PLEASE LEAVE THE USER NO ONE
INSERT INTO hd_users VALUES (1, 'noone', '', 'No', 'One',
'noone@nowhere.org', 0);
I
NSERT INTO hd_users VALUES (2, 'admin',
'5f4dcc3b5aa765d61d8327deb882cf99', 'Jesus', 'Christ',
'jesus@heaven.net', 1);
IF YOUR TRYING TO MANUALL EDIT THE USERS FROM WITHIN MYSQL
OR MYSQLADMIN.......
You need to state PASSWORD for you password or it will not encrypt
the file and mantis helpdesk will be unable to read the user pass and
deny you.
**** REMEMBER ******
Default login for ADMIN is: username: admin password: password
and yes password is the password :)
.....all you have to do is edit the files if you have not done so already
and or read all of this message from the start if you get other errors
when you get logged in to admin. :)
************************************************************
Okay, I am done enjoy mantis and good luck....I am still working on
the Print fucntion and when I find out what it is I will write the fix. :)
Regards Sean
sean@inhomeservices.net