administrator permission

General support regarding TimeTrex, such as
configuring policies/taxes or processing payroll.
khashayar
Posts: 3
Joined: Sun Mar 02, 2008 8:12 pm
Contact:

administrator permission

Post by khashayar » Fri May 23, 2008 1:24 am

Hi,

I was the administrator but accidentally changed my permission to Payroll Administrator. Now I can't change back the permission group to administrator and we dont have another administrator account.

What do I do?

Please help.

shaunw
Posts: 7546
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw » Fri May 23, 2008 9:37 am

It depends on how you installed TimeTrex, but you will need to run the following command from the TimeTrex directory:

php tools/set_admin_permissions.php <username>

Where <username> is the user name of the employee you want to have full administrator permissions.

shah
Posts: 2
Joined: Sat Jul 12, 2008 3:24 am
Contact:

Post by shah » Sat Jul 12, 2008 7:56 am

php tools/set_admin_permissions.php <username>
I had tried to run the given command but it still didn't work.

C:\Program Files\TimeTrex>php tools/set_admin_permissions.php shah
'php' is not recognized as an internal or external command,
operable program or batch file.


C:\Program Files\TimeTrex\php>php tools/set_admin_permissions.php shah
Could not open input file: tools/set_admin_permissions.php

Hopefully, please give an advice on this if I am doing wrong.

shaunw
Posts: 7546
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw » Mon Jul 14, 2008 9:52 am

Try the following command:

Code: Select all

C:\Program Files\TimeTrex\php\php C:\Program Files\TimeTrex\timetrex\tools\set_admin_permissions.php shah

mountdigit
Posts: 8
Joined: Wed Jul 22, 2009 3:14 am

Post by mountdigit » Fri Jul 24, 2009 3:14 am

how do you get back the admin permission when you have installed manually...

jaypee
Posts: 25
Joined: Wed Jul 15, 2009 11:45 pm

Post by jaypee » Thu Aug 13, 2009 11:14 pm

hi. i also accidentally change my administrator permission..
my set_admin_permissions.php is in this path..
C:\xampp\htdocs\TimeTrex\timetrex\tools\set_admin_permissions.php
, but when im running the command with the username
C:\xampp\htdocs\TimeTrex\timetrex\tools\set_admin_permissions.php admin
it says it cant find the file..
please help..

mountdigit
Posts: 8
Joined: Wed Jul 22, 2009 3:14 am

Post by mountdigit » Fri Aug 14, 2009 2:08 am

it will not work perfectly if you have installed timetrex manually. the other way to work it out is to got to the timetrex database from phpmyadmin...

1. go to users table click on browse and note down the id for your admin user.
2. then go to permission control table click browse and note down the id for administrator.
3. once you have done this go to permission user table click browse look for the id admin user id that you noted on step 1. click on edit and change the permission control id to the one you noted in step 2.

Thats it... try login in as admin user it should work.

jaypee
Posts: 25
Joined: Wed Jul 15, 2009 11:45 pm

Post by jaypee » Fri Aug 14, 2009 2:32 am

mountdigit wrote:it will not work perfectly if you have installed timetrex manually. the other way to work it out is to got to the timetrex database from phpmyadmin...

1. go to users table click on browse and note down the id for your admin user.
2. then go to permission control table click browse and note down the id for administrator.
3. once you have done this go to permission user table click browse look for the id admin user id that you noted on step 1. click on edit and change the permission control id to the one you noted in step 2.

Thats it... try login in as admin user it should work.
thanks for the quick reply really appreciated, im not realy good in php.. ill take a look first on phpmyadmin..sorry.. any tips on how to access phpmyadmin.. Ü

jaypee
Posts: 25
Joined: Wed Jul 15, 2009 11:45 pm

Post by jaypee » Fri Aug 14, 2009 2:34 am

downloading phpmyadmin...

mountdigit
Posts: 8
Joined: Wed Jul 22, 2009 3:14 am

Post by mountdigit » Fri Aug 14, 2009 2:38 am

if you have installed xaamp it should have already come with phpmyadmin

normally its at http://localhost/phpmyadmin

or if you click on xaamp task bar icon there should be a link to access phpmyadmin

look from the xaamp help for more information.

jaypee
Posts: 25
Joined: Wed Jul 15, 2009 11:45 pm

Post by jaypee » Fri Aug 14, 2009 2:58 am

thanks! phpmyadmin is now running.. i used the timerex username and admin password..

i accessed the user table but theres only permission table and permission_id_seq table...

mountdigit
Posts: 8
Joined: Wed Jul 22, 2009 3:14 am

Post by mountdigit » Fri Aug 14, 2009 4:13 am

did you mean you could not find those tables... did you install timetrex manually?

please look carefully these tables should be there...

users
permission_user
permission_control
permission_user

Please be noted that these are table names you need to browse... id are the fields on those tables you need to note down and alter

jaypee
Posts: 25
Joined: Wed Jul 15, 2009 11:45 pm

Post by jaypee » Fri Aug 14, 2009 5:20 am

i was not the one who initially installed timetrex here, and i think it was updated.. my timetrex version is 2.2.22 based on the installer i located on the desktop.. and yes i can only see two tables with a name starting with permission..

permission
permission_id_seq

... hope theres still a solution..thanks in advance..

jaypee
Posts: 25
Joined: Wed Jul 15, 2009 11:45 pm

Post by jaypee » Fri Aug 14, 2009 6:10 am

additonal info, i also saw on the user table another user id named administrator that i was not using.. how can i use the password indicated there? its a long string of characters.. may i can log on using that user id and change the permission on my admin account..

shaunw
Posts: 7546
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw » Fri Aug 14, 2009 11:00 am

Modifying the database directly is not recommended and usually results in disaster.

Instead, I recommend searching your XAMPP directory for php.exe, I would guess its in this directory:

c:\xampp\php\bin\php.exe

If that is in fact where it is, try this command instead:

Code: Select all

c:\xampp\php\bin\php.exe C:\xampp\htdocs\TimeTrex\timetrex\tools\set_admin_permissions.php admin

jaypee
Posts: 25
Joined: Wed Jul 15, 2009 11:45 pm

Post by jaypee » Fri Aug 14, 2009 9:49 pm

i located my php.exe here..

C:\xampp\htdocs\TimeTrex\php\php.exe

my set_admin_permissions.php

C:\xampp\htdocs\TimeTrex\timetrex\tools\set_admin_permissions.php admin
C:\xampp\htdocs\TimeTrex\php\php.exe C:\xampp\htdocs\TimeTrex\timetrex\tools\set_admin_permissions.php admin
still cannot find file..

jaypee
Posts: 25
Joined: Wed Jul 15, 2009 11:45 pm

Post by jaypee » Sat Aug 15, 2009 1:02 am

tables available...

* Browse absence_policy
* Browse absence_policy_id_seq
* Browse accrual
* Browse accrual_balance
* Browse accrual_policy
* Browse accrual_policy_milestone
* Browse authentication
* Browse authorizations
* Browse bank_account
* Browse branch
* Browse bread_crumb
* Browse company
* Browse company_deduction
* Browse company_deduction_pay_stub_entry_account
* Browse company_id_seq
* Browse company_user_count
* Browse company_user_count_id_seq
* Browse cron
* Browse cron_id_seq
* Browse currency
* Browse currency_id_seq
* Browse department
* Browse department_branch
* Browse department_branch_user
* Browse department_id_seq
* Browse exception
* Browse exception_policy
* Browse exception_policy_control
* Browse help
* Browse help_group
* Browse help_group_control
* Browse hierarchy_control
* Browse hierarchy_object_type
* Browse hierarchy_share
* Browse hierarchy_tree
* Browse holidays
* Browse holidays_id_seq
* Browse holiday_policy
* Browse holiday_policy_id_seq
* Browse holiday_policy_recurring_holiday
* Browse income_tax_rate
* Browse income_tax_rate_us
* Browse meal_policy
* Browse message
* Browse message_id_seq
* Browse other_field
* Browse over_time_policy
* Browse pay_period
* Browse pay_period_id_seq
* Browse pay_period_schedule
* Browse pay_period_schedule_id_seq
* Browse pay_period_schedule_user
* Browse pay_period_schedule_user_id_seq
* Browse pay_period_time_sheet_verify
* Browse pay_period_time_sheet_verify_id_seq
* Browse pay_stub
* Browse pay_stub_amendment
* Browse pay_stub_entry
* Browse pay_stub_entry_account
* Browse pay_stub_entry_account_id_seq
* Browse pay_stub_entry_account_link
* Browse pay_stub_entry_account_link_id_seq
* Browse pay_stub_entry_id_seq
* Browse pay_stub_id_seq
* Browse permission
* Browse permission_id_seq
* Browse policy_group
* Browse policy_group_accrual_policy
* Browse policy_group_over_time_policy
* Browse policy_group_premium_policy
* Browse policy_group_round_interval_policy
* Browse policy_group_user
* Browse premium_policy
* Browse punch
* Browse punch_control
* Browse punch_control_id_seq
* Browse punch_id_seq
* Browse recurring_holiday
* Browse recurring_ps_amendment
* Browse recurring_ps_amendment_user
* Browse recurring_schedule_control
* Browse recurring_schedule_control_id_seq
* Browse recurring_schedule_template
* Browse recurring_schedule_template_control
* Browse recurring_schedule_template_control_id_seq
* Browse recurring_schedule_template_id_seq
* Browse recurring_schedule_user
* Browse recurring_schedule_user_id_seq
* Browse request
* Browse request_id_seq
* Browse roe
* Browse round_interval_policy
* Browse schedule
* Browse schedule_id_seq
* Browse schedule_policy
* Browse schedule_policy_id_seq
* Browse station
* Browse station_id_seq
* Browse station_user
* Browse station_user_id_seq
* Browse system_log
* Browse system_log_id_seq
* Browse system_setting
* Browse system_setting_id_seq
* Browse users
* Browse users_id_seq
* Browse user_date
* Browse user_date_id_seq
* Browse user_date_total
* Browse user_date_total_id_seq
* Browse user_deduction
* Browse user_default
* Browse user_default_company_deduction
* Browse user_default_id_seq
* Browse user_generic_data
* Browse user_generic_data_id_seq
* Browse user_generic_status
* Browse user_generic_status_batch_id_seq
* Browse user_generic_status_id_seq
* Browse user_group
* Browse user_group_id_seq
* Browse user_group_tree
* Browse user_pay_period_total
* Browse user_preference
* Browse user_preference_id_seq
* Browse user_tax
* Browse user_title
* Browse user_wage
* Browse user_wage_id_seq

jaypee
Posts: 25
Joined: Wed Jul 15, 2009 11:45 pm

Post by jaypee » Sat Aug 15, 2009 2:44 am

i tried this code.. i remove the exe on php.exe.. no error received but my admin account still dont have permission..

C:\xampp\htdocs\TimeTrex\php\php C:\xampp\htdocs\TimeTrex\timetrex\tools\set_admin_permissions.php admin

shaunw
Posts: 7546
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw » Mon Aug 17, 2009 9:15 am

What is the EXACT error you are receiving?

Those paths are quite strange, if you installed TimeTrex manually php.exe should not be inside the TimeTrex directory.

What do you see if you run just this command:

Code: Select all

dir C:\xampp\htdocs\TimeTrex\php\php.exe
Now what about this command:

Code: Select all

C:\xampp\htdocs\TimeTrex\php\php.exe -i

jaypee
Posts: 25
Joined: Wed Jul 15, 2009 11:45 pm

Post by jaypee » Mon Aug 17, 2009 9:48 pm

deleted
Last edited by jaypee on Wed Aug 19, 2009 5:39 am, edited 1 time in total.

jaypee
Posts: 25
Joined: Wed Jul 15, 2009 11:45 pm

Post by jaypee » Mon Aug 17, 2009 11:28 pm

this is the error i get...

Image

jaypee
Posts: 25
Joined: Wed Jul 15, 2009 11:45 pm

Post by jaypee » Tue Aug 18, 2009 4:18 am

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\administrator>C:\xampp\php\php C:\xampp\htdocs\TimeTre
x\timetrex\tools\set_admin_permissions.php admin
PHP Warning: pg_connect(): Unable to connect to PostgreSQL server: could not co
nnect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" and accepting
TCP/IP connections on port 5433? in C:\xampp\htdocs\TimeTrex\timetrex\cl
asses\adodb\drivers\adodb-postgres64.inc.php on line 688

C:\Documents and Settings\administrator>

jaypee
Posts: 25
Joined: Wed Jul 15, 2009 11:45 pm

Post by jaypee » Tue Aug 18, 2009 4:45 am

please give some advice... thanks in advance

shaunw
Posts: 7546
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw » Tue Aug 18, 2009 8:44 am

I'm not quite sure whats going on Jaypee, originally you said you had TimeTrex installed but accidentally changed the administrator permissions so you didn't have full access to TimeTrex anymore. Now it appears you are reinstalling TimeTrex again...

To top it off it appears that you are using the TimeTrex automated installer and installing TimeTrex inside an existing XAMPP installation, which doesn't make any sense whatsoever and is a recipe for disaster, as two PHP instances and web servers installed on the same system will likely conflict with one another.

I would recommend uninstalling XAMPP, uninstalling TimeTrex, making sure all the related directories are deleted and reinstalling JUST TimeTrex with the automated installer from scratch.

Of course unless you have a backup of your TimeTrex database you will lose all data in this process, but short of purchasing a support package there isn't much hope of getting a properly operating instance of TimeTrex out of what you currently have.

jaypee
Posts: 25
Joined: Wed Jul 15, 2009 11:45 pm

Post by jaypee » Tue Aug 18, 2009 9:22 am

yes i have timetrex installed here and already using it, and what i have said i accidentally changed the admin permission.. im trying to install again timetrex because we are currently depending on it to get our employees in/out.. and i dont have any alternative to get the employees attendance.. so to have a quick solution i tried to install a fresh one of course backing up the timetrex folder. so if i can successfully install it with a new database i can have full access again to the system and get the incoming employees in/out and add new users. so it will be safe for the next cutoff.. while troubleshooting the old timetrex where all the previous records are..
i spent my whole day today figuring out how to get back the admin permission.. because i have to print the month first pay period and add new users..

if i cant insert a new admin user directly in the database, and tables needed to edit the permission is not available, and the set_admin.permission have no effect.. i have no choice but to install a new one to get going..

Locked