PHP 5.2.5 (cli) (built: Oct 31 2008 08:02:23)
MySQL 4.1.22
We had no problems running 2.2.8 til we noticed some supervisors missing Nov 8th from their timesheets. In reading the forums, we saw this was fixed with a upgrade due to DST.
The upgrade installation to 2.2.15 went without issue, but when you now enter My Timesheet and try to punch someone in, all you get is a white page after submitting the punch. If you then close the edit punch page and refresh the main timesheet, the punch shows, but it fails to calculate Total Time.
We turned on error checking and are showing a PHP error, but not sure how to resolve it. You can find the error from /interface/punch/EditPunch.php at the very end below.
Lastly, to see if it was a db vs script issue, we rolled back the 2.2.8 code leaving the db as is and the punches worked without issue. There is just a red warning stating the code is out of date in comparison to the db.
We have checked md5checksums and re-installed the code a number of times, but keep having the issue.
Thanks in advance for any help you can give.
Code: Select all
(mysqlt): SET SESSION sql_mode='ansi' (mysqlt): SET TRANSACTION ISOLATION LEVEL READ COMMITTED (mysqlt): SET SESSION time_zone='America/New_York' (mysqlt): select session_id,user_id,ip_address,created_date,updated_date from authentication WHERE session_id = '9521858e77cdfbd4d3bf6a922f3c87b3' AND ip_address = '72.188.242.144' AND updated_date >= 1226352501 (mysqlt): update authentication set updated_date = 1226366901 where session_id = '9521858e77cdfbd4d3bf6a922f3c87b3' (mysqlt): SET SESSION time_zone='US/Eastern' (mysqlt): select * from station where company_id = '1' AND station_id = 'fe1711408480b0c97f2b355202f0b6f5' AND deleted = 0 (mysqlt): select * from cron WHERE deleted = 0 ORDER BY last_run_date DESC LIMIT 1 (mysqlt): SET AUTOCOMMIT=0 (mysqlt): BEGIN (mysqlt): select a.* from pay_period_schedule as a, pay_period_schedule_user as b where a.id = b.pay_period_schedule_id AND b.user_id = '60' AND a.deleted=0 (mysqlt): select a.* from punch as a, punch_control as b, user_date as c where a.punch_control_id = b.id AND b.user_date_id = c.id AND c.user_id = '60' AND a.time_stamp >= '2008-11-04 07:59:59' AND a.time_stamp <= '2008-11-04 11:59:59' AND a.id != 0 AND ( a.deleted = 0 AND b.deleted=0 AND c.deleted=0) ORDER BY a.time_stamp desc, a.status_id asc LIMIT 1 (mysqlt): select * from user_date where user_id = '60' AND date_stamp = '2008-11-04' AND deleted = 0 ORDER BY id ASC (mysqlt): update punch_control_id_seq set id=LAST_INSERT_ID(id+1); /home/jemjell/tmp/timetrex//9e/adodb_9e11ae78a7ad1940220bfa8c58290456.cache reloaded, ttl=78397 [ select user_date_id,id,branch_id,department_id,note,job_id,job_item_id,quantity,bad_quantity,created_date,created_by,updated_date,updated_by from punch_control where id = -1 ]
(mysqlt): INSERT INTO punch_control ( USER_DATE_ID, ID, BRANCH_ID, DEPARTMENT_ID, NOTE, JOB_ID, JOB_ITEM_ID, QUANTITY, BAD_QUANTITY, CREATED_DATE, CREATED_BY, UPDATED_DATE, UPDATED_BY ) VALUES ( 81661, 31206, 5, 3, '', 0, 0, 0, 0, 1226366901, 1, 1226366901, 1 ) (mysqlt): select * from punch_control where id = '31206' AND deleted = 0 /home/jemjell/tmp/timetrex//68/adodb_685d759b955c1e558d5ddd5c89fcf2aa.cache reloaded, ttl=78397 [ select * from round_interval_policy where id = -1 ]
(mysqlt): select c.* from policy_group_user as a, policy_group as ab, policy_group_round_interval_policy as b, round_interval_policy as c, round_interval_policy as d where a.policy_group_id = ab.id AND a.policy_group_id = b.policy_group_id AND b.round_interval_policy_id = c.id AND b.round_interval_policy_id = d.id AND a.user_id = '60' AND c.punch_type_id in ( 10,20,40) AND ( ab.deleted = 0 AND c.deleted = 0 AND d.deleted = 0 ) order by c.punch_type_id desc LIMIT 1 /home/jemjell/tmp/timetrex//f0/adodb_f0cbcfea62cc169a955a3fa8a6974667.cache reloaded, ttl=78397 [ select * from punch where id = -1 ]
(mysqlt): select * from punch as a where punch_control_id = '31206' AND deleted = 0 order by time_stamp desc (mysqlt): select a.* from punch as a, punch_control as b where a.punch_control_id = b.id AND b.user_date_id = '81661' AND ( a.deleted = 0 AND b.deleted=0 ) ORDER BY a.time_stamp asc, a.status_id desc, a.punch_control_id asc /home/jemjell/tmp/timetrex//f0/adodb_f0cbcfea62cc169a955a3fa8a6974667.cache reloaded, ttl=78397 [ select * from punch where id = -1 ]
(mysqlt): select * from punch as a where punch_control_id = '31206' AND deleted = 0 order by time_stamp desc (mysqlt): select a.* from punch as a, punch_control as b where a.punch_control_id = b.id AND b.user_date_id = '81661' AND ( a.deleted = 0 AND b.deleted=0 ) ORDER BY a.time_stamp asc, a.status_id desc, a.punch_control_id asc (mysqlt): update punch_id_seq set id=LAST_INSERT_ID(id+1); /home/jemjell/tmp/timetrex//63/adodb_6361dee3dd53bdd9445d4c5673654500.cache reloaded, ttl=78397 [ select id,punch_control_id,type_id,status_id,time_stamp,actual_time_stamp,original_time_stamp,created_date,created_by,updated_date,updated_by from punch where id = -1 ]
(mysqlt): INSERT INTO punch ( ID, PUNCH_CONTROL_ID, TYPE_ID, STATUS_ID, TIME_STAMP, ACTUAL_TIME_STAMP, ORIGINAL_TIME_STAMP, CREATED_DATE, CREATED_BY, UPDATED_DATE, UPDATED_BY ) VALUES ( 61821, 31206, 10, 10, '2008-11-04 12:00:00', '2008-11-04 12:00:00', '2008-11-04 12:00:00', 1226366901, 1, 1226366901, 1 ) (mysqlt): update system_log_id_seq set id=LAST_INSERT_ID(id+1); /home/jemjell/tmp/timetrex//1d/adodb_1d47fb2a234f2e813a80e127d14e8b2e.cache reloaded, ttl=78347 [ select object_id,action_id,table_name,user_id,description,date,id from system_log where id = -1 ]
(mysqlt): INSERT INTO system_log ( OBJECT_ID, ACTION_ID, TABLE_NAME, USER_ID, DESCRIPTION, DATE, ID ) VALUES ( 61821, 10, 'punch', 1, 'Punch - Employee: Adam Barry Timestamp: 11-04-2008 12:00 PM', 1226366901, 266520 ) /home/jemjell/tmp/timetrex//f0/adodb_f0cbcfea62cc169a955a3fa8a6974667.cache reloaded, ttl=78397 [ select * from punch where id = -1 ]
(mysqlt): select * from punch as a where punch_control_id = '31206' AND deleted = 0 order by time_stamp desc (mysqlt): select id,user_date_id,branch_id,department_id,job_id,job_item_id,quantity,bad_quantity,total_time,actual_total_time,meal_policy_id,overlap,created_date,created_by,updated_date,updated_by,deleted_date,deleted_by,deleted,other_id1,other_id2,other_id3,other_id4,other_id5,note from punch_control where id = 31206 (mysqlt): select * from user_date_total where user_date_id = '81661' AND punch_control_id = '31206' AND deleted = 0 (mysqlt): select * from punch_control where id = '31206' AND deleted = 0 (mysqlt): select a.* from user_date_total as a where a.user_date_id = '81661' AND a.status_id = '20' AND a.type_id = '10' AND a.punch_control_id = 31206 AND a.override = 1 AND a.deleted = 0 (mysqlt): select a.* from user_date_total as a where a.user_date_id = '81661' AND a.status_id = '20' AND a.type_id = '10' AND a.punch_control_id = 31206 AND a.override = 1 AND a.deleted = 0 (mysqlt): update user_date_total_id_seq set id=LAST_INSERT_ID(id+1); /home/jemjell/tmp/timetrex//0a/adodb_0a74bd9a0a90e46d58f11c0b64dcf0f4.cache reloaded, ttl=78397 [ select user_date_id,punch_control_id,status_id,type_id,branch_id,department_id,job_id,job_item_id,quantity,bad_quantity,total_time,actual_total_time,over_time_policy_id,absence_policy_id,premium_policy_id,meal_policy_id,created_date,created_by,updated_date,updated_by,id from user_date_total where id = -1 ]
(mysqlt): INSERT INTO user_date_total ( USER_DATE_ID, PUNCH_CONTROL_ID, STATUS_ID, TYPE_ID, BRANCH_ID, DEPARTMENT_ID, JOB_ID, JOB_ITEM_ID, QUANTITY, BAD_QUANTITY, TOTAL_TIME, ACTUAL_TOTAL_TIME, OVER_TIME_POLICY_ID, ABSENCE_POLICY_ID, PREMIUM_POLICY_ID, MEAL_POLICY_ID, CREATED_DATE, CREATED_BY, UPDATED_DATE, UPDATED_BY, ID ) VALUES ( 81661, 31206, 20, 10, 5, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1226366901, 1, 1226366901, 1, 485673 ) (mysqlt): DELETE FROM user_date_total WHERE id in ( select id from ( select a.id from user_date_total as a LEFT JOIN punch_control as b ON a.punch_control_id = b.id where a.user_date_id = '81661' AND ( ( a.override = 0 AND a.status_id in (10,30) ) OR ( b.id IS NOT NULL AND a.user_date_id != b.user_date_id ) ) AND ( a.deleted = 0 ) ) as tmp ) 1093: You can't specify target table 'user_date_total' for update in FROM clause
ADOConnection._Execute(DELETE FROM user_date_total
WHERE id in (
select id from (
select a.id
from user_date_tot...) % line 842, file: adodb.inc.php
ADOConnection.Execute(DELETE FROM user_date_total
WHERE id in (
select id from (
select a.id
from user_date_tot..., Array[4]) % line 849, file: UserDateTotalFactory.class.php
UserDateTotalFactory.deleteSystemTotalTime() % line 2826, file: UserDateTotalFactory.class.php
UserDateTotalFactory.calcSystemTotalTime() % line 3341, file: UserDateTotalFactory.class.php
UserDateTotalFactory.postSave() % line 854, file: Factory.class.php
Fatal error: Uncaught exception 'ADODB_Exception' with message 'mysqlt error: [1093: You can't specify target table 'user_date_total' for update in FROM clause] in adodb_throw(DELETE FROM user_date_total WHERE id in ( select id from ( select a.id from user_date_total as a LEFT JOIN punch_control as b ON a.punch_control_id = b.id where a.user_date_id = '81661' AND ( ( a.override = 0 AND a.status_id in (10,30) ) OR ( b.id IS NOT NULL AND a.user_date_id != b.user_date_id ) ) AND ( a.deleted = 0 ) ) as tmp ), ) ' in /home/jemjell/public_html/timesheets/classes/adodb/adodb-exceptions.inc.php:78 Stack trace: #0 /home/jemjell/public_html/timesheets/classes/adodb/adodb.inc.php(221): adodb_throw('mysqlt', 'adodb_throw', 1093, 'You can't speci...', 'DELETE FROM use...', false, Object(ADODB_mysqlt)) #1 /home/jemjell/public_html/timesheets/classes/adodb/adodb.i in /home/jemjell/public_html/timesheets/classes/adodb/adodb-exceptions.inc.php on line 78