Time Tracker install in HOSTING ENVIRONMENTS
Re: Time Tracker install in HOSTING ENVIRONMENTS
Looks like you are not using the latest Time Tracker code, as line 347 does not exist in the most recent /WEB-INF/lib/common.lib.php
But basically the problem looks like your server logs errors to the output before a redirect to login.php page occurs. In this case redirect is not happening and you end up with a blank page in browser.
You'll need to identify what this error is and fix it (something must be happening before "PHP Warning: Cannot modify header information - headers already sent").
But basically the problem looks like your server logs errors to the output before a redirect to login.php page occurs. In this case redirect is not happening and you end up with a blank page in browser.
You'll need to identify what this error is and fix it (something must be happening before "PHP Warning: Cannot modify header information - headers already sent").
Re: Time Tracker install in HOSTING ENVIRONMENTS
I've installed timetracker on my host (dreamhost) according to the directions. However, when I go to my site I get a blank page and the url looks like this: https://time.mysite.com/time.php?date=2016-03-04
I had to create the mysql db from my host's site, but I can see in phpmyadmin that the dbinstall function added all the tables, so I believe the db side is working correctly.
The only errors logged are as follows:
I am stumped. For reference, I'm on php 5.6 FastCGI. other options available include 5.6 CGI, 7.0 CGI, and 7.0 FastCGI.
templates_c is set to 777
I had to create the mysql db from my host's site, but I can see in phpmyadmin that the dbinstall function added all the tables, so I believe the db side is working correctly.
The only errors logged are as follows:
I downloaded the most recent stable release (version 1.9.12.3383), extracted the .zip files, and put them on the webhost. It does not appear the plugin or missing.html exist in the original files, so I have no idea why its referring to these items in the error log.[Fri Mar 04 10:07:20 2016] [error] [client 12.252.41.166] File does not exist: /home/anuko/time.mysite.com/plugin
[Fri Mar 04 10:07:20 2016] [error] [client 12.252.41.166] File does not exist: /home/anuko/time.mysite.com/missing.html
I am stumped. For reference, I'm on php 5.6 FastCGI. other options available include 5.6 CGI, 7.0 CGI, and 7.0 FastCGI.
templates_c is set to 777
Last edited by tlynnec on Tue Mar 08, 2016 5:45 pm, edited 1 time in total.
Re: Time Tracker install in HOSTING ENVIRONMENTS
Your log error probably have nothing to do with the problem - is this your IP 12.252.41.166 or someone is probing your web server?tlynnec wrote:I've installed timetracker on my host (dreamhost) according to the directions. However, when I go to my site I get a blank page and the url looks like this: https://time.waterutilitymanagementserv ... 2016-03-04
I had to create the mysql db from my host's site, but I can see in phpmyadmin that the dbinstall function added all the tables, so I believe the db side is working correctly.
The only errors logged are as follows:I downloaded the most recent stable release (version 1.9.12.3383), extracted the .zip files, and put them on the webhost. It does not appear the plugin or missing.html exist in the original files, so I have no idea why its referring to these items in the error log.[Fri Mar 04 10:07:20 2016] [error] [client 12.252.41.166] File does not exist: /home/anuko/time.waterutilitymanagementservices.com/plugin
[Fri Mar 04 10:07:20 2016] [error] [client 12.252.41.166] File does not exist: /home/anuko/time.waterutilitymanagementservices.com/missing.html
I am stumped. For reference, I'm on php 5.6 FastCGI. other options available include 5.6 CGI, 7.0 CGI, and 7.0 FastCGI.
templates_c is set to 777
Access from here works fine: https://time.waterutilitymanagementserv ... /login.php - the page is displayed, but then is blank after attempting to login. Check your error log again. Hopefully there is more there to see.
If you open a support incident and provide access to your server Anuko can troubleshoot and fix the problem.
Re: Time Tracker install in HOSTING ENVIRONMENTS
the 12 is my ip, so no worrries there. only new errors logged are
I'm guessing that was you?[Fri Mar 04 11:21:44 2016] [error] [client 46.46.87.78] File does not exist: /home/anuko/time.mysite.com/anything
[Fri Mar 04 11:21:44 2016] [error] [client 46.46.87.78] File does not exist: /home/anuko/time.mysite.com/missing.html
Last edited by tlynnec on Tue Mar 08, 2016 5:52 pm, edited 1 time in total.
Re: Time Tracker install in HOSTING ENVIRONMENTS
another thought: I had to pre-create the mysql db through my host and, since timetracker was not available as a db name, I had to give it a different name. That name is correctly inserted in the config file and the tables exist in it. However, does Timetracker require that the db be named timetracker? if so, is there somewhere where i need to change all the default references so that it will refer to the correct db name?
Re: Time Tracker install in HOSTING ENVIRONMENTS
Database name can be anything you like. But you have to grant permissions to use it to the account specified in config.php.tlynnec wrote:another thought: I had to pre-create the mysql db through my host and, since timetracker was not available as a db name, I had to give it a different name. That name is correctly inserted in the config file and the tables exist in it. However, does Timetracker require that the db be named timetracker? if so, is there somewhere where i need to change all the default references so that it will refer to the correct db name?
Re: Time Tracker install in HOSTING ENVIRONMENTS
ok, well then that *shouldn't* be my issue. As far as I can tell, the correct permissions are set in config.php: dbname changed to my db's correct name in the define('DSN'... line and the correct passwords etc are there. I'm also not getting any "cannot connect to database" type errors. I don't see anywhere else that it needs to be changed?
I saw another post in the forum (unanswered) about someone who had the same issue when switching the php 5.6, which i'm on. are there any know issues with running on 5.6? should i try switching to php 7?
I saw another post in the forum (unanswered) about someone who had the same issue when switching the php 5.6, which i'm on. are there any know issues with running on 5.6? should i try switching to php 7?
Re: Time Tracker install in HOSTING ENVIRONMENTS
It's difficult to guess what may be going on with your system without access to it.tlynnec wrote:ok, well then that *shouldn't* be my issue. As far as I can tell, the correct permissions are set in config.php: dbname changed to my db's correct name in the define('DSN'... line and the correct passwords etc are there. I'm also not getting any "cannot connect to database" type errors. I don't see anywhere else that it needs to be changed?
I saw another post in the forum (unanswered) about someone who had the same issue when switching the php 5.6, which i'm on. are there any know issues with running on 5.6? should i try switching to php 7?
What we see from here is that login.php page displays properly, but a redirect after login is not happening, why? May be because some file leaks a white space to output before a redirect? Are you sure all source files are intact?
Now the second issue, which may be a separate one, is that time.php displays blank as well.
Without access I can only suggest debugging locally by inserting, for example, a die("some message here"); statement in different locations of source files and observe the output if "some message here" shows up properly. For example, you can start hacking around with time.php, going from the beginning. If it does not work even in the beginning of the file, perhaps the problem is in one of the included files, such as initialize.php.
The point is that going in this way you can hopefully determine where the problem occurs exactly, which will give you more info about it.
And check if you have all files intact from the recent distribution.
With regards to PHP 5.6 - we are not aware of any issues at the moment.
It may be faster to address the issue via a support incident.
Re: Time Tracker install in HOSTING ENVIRONMENTS
Issue solved. Excellent paid support. Thanks.
Re: Time Tracker install in HOSTING ENVIRONMENTS
Just to clarify for others who may be seeing the same issue. Redirect was not happening because of trailing white space after the terminating PHP tag in a customized WEB-INF/config.php. The issue was fixed be removing the white space.tlynnec wrote:Issue solved. Excellent paid support. Thanks.
Also, we have removed the terminating PHP tag from WEB-INF/config.php.dist completely in Time Tracker 1.9.13.3397 to hopefully avoid this problem in future installations.
Re: Time Tracker install in HOSTING ENVIRONMENTS
A little more info that I just figured out: When editing the config file in notepad.exe, the encoding gets changed from UTF-8 to UTF-8-BOM, which results in a blank space at the end of the file, which breaks it. Opened the file in notepad++ instead and set the encoding back to UTF-8, and presto it works.admin wrote:Just to clarify for others who may be seeing the same issue. Redirect was not happening because of trailing white space after the terminating PHP tag in a customized WEB-INF/config.php. The issue was fixed be removing the white space.
Also, we have removed the terminating PHP tag from WEB-INF/config.php.dist completely in Time Tracker 1.9.13.3397 to hopefully avoid this problem in future installations.
Re: Time Tracker install in HOSTING ENVIRONMENTS
Hi all,
I've installed Time Tracker in a hosted environment with our host, Bluehost, and I *think* I've done so correctly, but I'm getting an error of:
"MDB2 Error: unknown error"
I am able to get to the screen to create the database, and then I get the error. I can even get to the login page:
http://www.admin.enduranceevolution.com/timetracker/
But upon trying to login I get the MDB2 Error: unknown error message.
Any thoughts?
I've installed Time Tracker in a hosted environment with our host, Bluehost, and I *think* I've done so correctly, but I'm getting an error of:
"MDB2 Error: unknown error"
I am able to get to the screen to create the database, and then I get the error. I can even get to the login page:
http://www.admin.enduranceevolution.com/timetracker/
But upon trying to login I get the MDB2 Error: unknown error message.
Any thoughts?
Re: Time Tracker install in HOSTING ENVIRONMENTS
Did you create a database using dbinstall.php (top step on the page). Was it successful? Does your db structure look like in mysql.sql file?joelga wrote:I've installed Time Tracker in a hosted environment with our host, Bluehost, and I *think* I've done so correctly, but I'm getting an error of:
"MDB2 Error: unknown error"
I am able to get to the screen to create the database, and then I get the error. I can even get to the login page:
http://www.admin.enduranceevolution.com/timetracker/
Do you see any additional details in your web server error log?
Re: Time Tracker install in HOSTING ENVIRONMENTS
Hi peter,
Yep, I did create the DB using the dbinstall.php file by going to the following address:
http://www.admin.enduranceevolution.com ... nstall.php (I've since renamed the dbinstall.php file)
I don't think the db creation was successful, because after starting the db install, that's when I first got that error message. I'm not a database guy and I really don't know much about SQL, so I'm not sure where/how to look into the mysql file :/ I'm not sure where to find the server error logs, either.
Yep, I did create the DB using the dbinstall.php file by going to the following address:
http://www.admin.enduranceevolution.com ... nstall.php (I've since renamed the dbinstall.php file)
I don't think the db creation was successful, because after starting the db install, that's when I first got that error message. I'm not a database guy and I really don't know much about SQL, so I'm not sure where/how to look into the mysql file :/ I'm not sure where to find the server error logs, either.
Re: Time Tracker install in HOSTING ENVIRONMENTS
You can save the content below in a file named environment_check.php and put it the installation directory. The access it in browser. If will troubleshoot for basic configuration errors.
Regular output is something like this:
Let us know what you see. I am getting "MDB2 Error: unknown error" when I misspell server name in DSN. For example, localhost2 instead of localhost will produce this output for me:
Hope it helps.
Code: Select all
<?php
// +----------------------------------------------------------------------+
// | Anuko Time Tracker
// +----------------------------------------------------------------------+
// | Copyright (c) Anuko International Ltd. (https://www.anuko.com)
// +----------------------------------------------------------------------+
// | LIBERAL FREEWARE LICENSE: This source code document may be used
// | by anyone for any purpose, and freely redistributed alone or in
// | combination with other software, provided that the license is obeyed.
// |
// | There are only two ways to violate the license:
// |
// | 1. To redistribute this code in source form, with the copyright
// | notice or license removed or altered. (Distributing in compiled
// | forms without embedded copyright notices is permitted).
// |
// | 2. To redistribute modified versions of this code in *any* form
// | that bears insufficient indications that the modifications are
// | not the work of the original author(s).
// |
// | This license applies to this document only, not any other software
// | that it may be combined with.
// |
// +----------------------------------------------------------------------+
// | Contributors:
// | https://www.anuko.com/time_tracker/credits.htm
// +----------------------------------------------------------------------+
require_once('WEB-INF/config.php');
require_once('WEB-INF/lib/common.lib.php');
require_once('initialize.php');
echo('<h2>Environment check</h2>');
// Require the configuration file with application settings.
if (file_exists(APP_DIR."/WEB-INF/config.php")) {
echo('WEB-INF/config.php file exists.<br>');
} else {
echo('<font color="red">Error: WEB-INF/config.php file does not exist.</font><br>');
}
// Check whether DSN is defined.
if (defined('DSN')) {
echo('DSN is defined as '.DSN.'<br>');
} else {
echo('<font color="red">Error: DSN value is not defined. Check your config.php file.</font><br>');
}
// Depending on DSN, require either mysqli or mysql extensions.
if (strrpos(DSN, 'mysqli://', -strlen(DSN)) !== FALSE) {
if (extension_loaded('mysqli')) {
echo('mysqli PHP extension is loaded.<br>');
} else {
echo('<font color="red">Error: mysqli PHP extension is required but is not loaded.</font><br>');
}
}
if (strrpos(DSN, 'mysql://', -strlen(DSN)) !== FALSE) {
if (extension_loaded('mysql')) {
echo('mysql PHP extension is loaded.<br>');
} else {
echo('<font color="red">Error: mysql PHP extension is required but is not loaded.</font><br>');
}
}
// Check mbstring extension.
if (extension_loaded('mbstring')) {
echo('mbstring PHP extension is loaded.<br>');
} else {
echo('<font color="red">Error: mbstring PHP extension is not loaded.</font><br>');
}
// Check gd extension.
if (extension_loaded('gd')) {
echo('gd PHP extension is loaded.<br>');
} else {
echo('<font color="red">Error: gd PHP extension is not loaded. It is required for charts plugin.</font><br>');
}
// Check ldap extension.
if (AUTH_MODULE == 'ldap') {
if (extension_loaded('ldap_')) {
echo('ldap PHP extension is loaded.<br>');
} else {
echo('<font color="red">Error: ldap PHP extension is not loaded. It is required for LDAP authentication.</font><br>');
}
}
// Check database access.
require_once('MDB2.php');
$conn = MDB2::connect(DSN);
if (!is_a($conn, 'MDB2_Error')) {
echo('Connection to database successful.<br>');
} else {
die('<font color="red">Error: connection to database failed. '.$conn->getMessage().'</font><br>');
}
$conn->setOption('debug', true);
$conn->setFetchMode(MDB2_FETCHMODE_ASSOC);
$sql = "show tables";
$res = $conn->query($sql);
if (is_a($res, 'MDB2_Error')) {
die('<font color="red">Error: show tables returned an error. '.$res->getMessage().'</font><br>');
}
$tblCnt = 0;
while ($val = $res->fetchRow()) {
$tblCnt++;
}
if ($tblCnt > 0) {
echo("There are $tblCnt tables in database.<br>");
} else {
echo('<font color="red">Error: there are no tables in database. Use dbinstall.php.</font><br>');
}
$conn->disconnect();
Code: Select all
Environment check
WEB-INF/config.php file exists.
DSN is defined as mysqli://user:secret@localhost/timetracker?charset=utf8
mysqli PHP extension is loaded.
mbstring PHP extension is loaded.
gd PHP extension is loaded.
Connection to database successful.
There are 19 tables in database.
Code: Select all
Environment check
WEB-INF/config.php file exists.
DSN is defined as mysqli://user:secret@localhost2/timetracker?charset=utf8
mysqli PHP extension is loaded.
mbstring PHP extension is loaded.
gd PHP extension is loaded.
Error: connection to database failed. MDB2 Error: unknown error