Page 1 of 1

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

Posted: Wed Jul 01, 2020 10:37 am
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 23144 times
TIA

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

Posted: Wed Jul 01, 2020 10:52 am
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" 

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

Posted: Wed Jul 01, 2020 11:53 pm
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?

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

Posted: Thu Jul 02, 2020 7:16 pm
by mikeb
It does not accept multiple names.

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

Posted: Wed Dec 30, 2020 8:40 am
by rafat
Out of curiosity what is the benefit of specifying the host name? I

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

Posted: Wed Dec 30, 2020 8:54 am
by shaunw
Its required so TimeTrex knows how to generate a link back to itself properly.

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

Posted: Wed Dec 30, 2020 9:51 am
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.

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

Posted: Wed Dec 30, 2020 10:25 am
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.

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

Posted: Wed Dec 30, 2020 11:05 am
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

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

Posted: Wed Jun 02, 2021 8:07 am
by moinqureshi
Hi,

I didnot found any hostname in php.ini file.

cd /etc/php/7.2/apache2/

ubuntu 18.04 LTS
Please guide, I want to remove this error.

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

Posted: Wed Jun 02, 2021 2:16 pm
by shaunw
moinqureshi wrote: Wed Jun 02, 2021 8:07 am I didnot found any hostname in php.ini file.

cd /etc/php/7.2/apache2/

ubuntu 18.04 LTS
Please guide, I want to remove this error.
Its the timetrex.ini.php file that has that setting rather than the php.ini file.

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

Posted: Fri Jun 04, 2021 6:53 am
by moinqureshi
Where i find this file timetrex.ini.php ? complete folder location

LTS 18.04 , Installed via .deb file.

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

Posted: Fri Jun 04, 2021 8:04 am
by shaunw
Try: /var/www/timetrex/timetrex.ini.php

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

Posted: Fri Jun 04, 2021 8:28 am
by moinqureshi
I have timetrex folder only in /var/cache/timetrex.

I have /var/www/html instead of /var/www/timetrex.

Image attached!

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

Posted: Fri Jun 04, 2021 1:57 pm
by shaunw
If you aren't seeing it there, try this instead:

Code: Select all

/usr/share/timetrex/html/timetrex.ini.php

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

Posted: Mon Jun 07, 2021 4:14 am
by moinqureshi
Thanks.

Its works!

two question:

hostname = 10.19.1.200

I set hostname to local ip, but when i iopen this IP, always Apache page is open. When I open 10.119.1.200/timetrex, then Timetrex login page is open. How i can change to my IP only? Also i want to customize logins. I want to add my company facebook on login page, Also i want to change favicon. Thanks

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

Posted: Mon Jun 07, 2021 8:12 am
by shaunw
I set hostname to local ip, but when i iopen this IP, always Apache page is open. When I open 10.119.1.200/timetrex, then Timetrex login page is open. How i can change to my IP only?
You will need to change your Apache config or use a .htaccess redirect for that, which is outside the scope of TimeTrex.