WARNING: Hostname specified in TimeTrex config file does not match the accessed URL. Please contact your TimeTrex ....

General support regarding TimeTrex, such as
configuring policies/taxes or processing payroll.
Post Reply
fibrepunk
Posts: 2
Joined: Wed Jul 01, 2020 10:32 am

WARNING: Hostname specified in TimeTrex config file does not match the accessed URL. Please contact your TimeTrex ....

Post by fibrepunk »

After auto update from last night, I got the following error. Anyone else experiencing this issue? Here is the screenshot of the error.

Screenshot:
Error msg.
Error msg.
2020-07-01_10-30-52_hostname_url.jpg (54.11 KiB) Viewed 1777 times
TIA

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

Re: WARNING: Hostname specified in TimeTrex config file does not match the accessed URL. Please contact your TimeTrex ..

Post by shaunw »

In your TimeTrex.ini.php file, there is a "hostname" setting under the [other] section, that does not match the hostname in the URL that you are using to access TimeTrex with, therefore TimeTrex isn't able to perform some operations properly.

For example if you access TimeTrex in your web browser with: "http://www.mycompany.com/timetrex", you should have the following in your TimeTrex.ini.php file:

Code: Select all

hostname = "www.mycompany.com" 

fibrepunk
Posts: 2
Joined: Wed Jul 01, 2020 10:32 am

Re: WARNING: Hostname specified in TimeTrex config file does not match the accessed URL. Please contact your TimeTrex ..

Post by fibrepunk »

Thank you, after editing the file, that fixed it. I also wonder, can the hostname accept multiple names? If so, do you have an example?

mikeb
Posts: 609
Joined: Thu Jul 27, 2006 11:58 am

Re: WARNING: Hostname specified in TimeTrex config file does not match the accessed URL. Please contact your TimeTrex ..

Post by mikeb »

It does not accept multiple names.
TimeTrex Community Edition is developed and supported by volunteers.
Help motivate us to continue by showing your appreciation!

rafat
Posts: 5
Joined: Mon Dec 28, 2020 10:36 am

Re: WARNING: Hostname specified in TimeTrex config file does not match the accessed URL. Please contact your TimeTrex ..

Post by rafat »

Out of curiosity what is the benefit of specifying the host name? I

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

Re: WARNING: Hostname specified in TimeTrex config file does not match the accessed URL. Please contact your TimeTrex ..

Post by shaunw »

Its required so TimeTrex knows how to generate a link back to itself properly.

rafat
Posts: 5
Joined: Mon Dec 28, 2020 10:36 am

Re: WARNING: Hostname specified in TimeTrex config file does not match the accessed URL. Please contact your TimeTrex ..

Post by rafat »

Fair enough .. although I dont understand this very well.
My installation has a server with two adapters one that goes to the internet as www.example.com and the one I use locally as 192.x.x.x to administer the system. So which one in your opinion I should set as the hostname in the .ini file.
Thanks.

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

Re: WARNING: Hostname specified in TimeTrex config file does not match the accessed URL. Please contact your TimeTrex ..

Post by shaunw »

I would recommend using whichever is used most often for now. However the warning that you are seeing will still always appear for people accessing it a different way. Therefore the proper approach is have a single domain that works both externally and internally on your network.

rafat
Posts: 5
Joined: Mon Dec 28, 2020 10:36 am

Re: WARNING: Hostname specified in TimeTrex config file does not match the accessed URL. Please contact your TimeTrex ..

Post by rafat »

Thanks for the recommendations.
For the time being I commented the hostname directive in the .ini file and the messages do not appear in either side.
I will have to look for the single domain that can be accessed by both sides of the aisle.
Regards.
Rafat

Post Reply