Unfortunately, I’m working on Intranet sites and cannot provide access to the sites in question.
I created a Scheduler calendar on my localhost Apache server 2.4 using PHP 5.6.28 and MySQL 5.6 and the MySQLi connector. It works great. When I transfer it to our Windows Server 2012 with IIS 8.5 and PHP 5.6.19 (everything else matches localhost), it stops saving. I get the generic XML action=error, but no details. When I search the PHP, IIS, and mySQL logs, I cannot find any errors, but the data will not update.
I used a mysqldump file to transfer the entire database to my IIS server. The existing entries show on the calendar just fine. So, I know I am connecting with the database. It just won’t insert or update any new data submissions.
Both processes seem to function identically, except that I get a “<action type=‘error’ sid=‘1500499424480’ tid=‘1500499424480’ ></action>” returned from the IIS server:
Localhost
500493948750_!nativeeditor: inserted
1500493948750_comments: Test2
1500493948750_emp_name: Todd Giammona
1500493948750_emp_title: Manager
1500493948750_end_date: 2017-07-19 12:00
1500493948750_event_length:
1500493948750_event_pid:
1500493948750_id: 1500493948750
1500493948750_rec_pattern:
1500493948750_rec_type:
1500493948750_start_date: 2017-07-19 11:00
1500493948750_status: Training
1500493948750_text: Manager – Training
ids: 1500493948750
IIS Server
1500488078879_!nativeeditor_status: inserted
1500488078879_comments: Test2
1500488078879_emp_name: Todd Giammona
1500488078879_emp_title: Manager
1500488078879_end_date: 2017-07-19 12:00
1500488078879_event_length:
1500488078879_event_pid:
1500488078879_id: 1500488078879
1500488078879_rec_pattern:
1500488078879_rec_type:
1500488078879_start_date: 2017-07-19 11:00
1500488078879_status: Ed Leave
1500488078879_text: Manager – Ed Leave
ids: 1500488078879
dhtmlxScheduler_connector.php
require ("../js/scheduler/connector/scheduler_connector.php"); // connector file
require ("../js/scheduler/connector/db_mysqli.php");
$mySQLi = mysqli_connect("localhost", '<admin-username>', '<admin-pwd>', "medlegal-sched"); // db connection
// connector object; parameters: db connection and the type of the used db
$Conn = new SchedulerConnector($mySQLi, "MySQLi");
$Conn->render_table("`medlegal-employee-events`", "id", "start_date,end_date,text,rec_type,event_length,event_pid,emp_title,emp_name,status,comments");
Javascript
// locale settings to adjust labels and fields for our needs
scheduler.locale.labels.section_description = 'Employee Title';
scheduler.locale.labels.section_text = 'Text';
scheduler.locale.labels.section_checkbox = 'Checkbox';
scheduler.locale.labels.section_radiobutton = 'Radiobutton';
scheduler.locale.labels.section_select = 'Select';
scheduler.locale.labels.section_template = 'Template';
scheduler.locale.labels.week_agenda_tab = "Week A.";
// Scheduler config options for presenting the calendar the way we want
scheduler.config.occurrence_timestamp_in_utc = true;
scheduler.config.include_end_by = true;
scheduler.config.repeat_date = "%m/%d/%Y";
scheduler.config.repeat_precise = true;
scheduler.config.max_month_events = 5;
scheduler.config.multi_day = true;
scheduler.config.mark_now = true;
scheduler.config.full_day = true;
scheduler.config.xml_date="%Y-%m-%d %H:%i";
scheduler.config.hour_date = "%g:%i%a";
scheduler.config.form_date = "%m/%d/%Y %H:%i%a";
scheduler.config.header_date = "%m/%d/%Y";
scheduler.config.form_all_day = "%m/%d/%Y";
scheduler.config.event_duration = 60;
scheduler.config.auto_end_date = true;
scheduler.config.first_hour = 7;
scheduler.config.last_hour = 19;
scheduler.config.start_on_monday = true;
scheduler.config.resize_month_events = user_access > 3 ? true : false;
scheduler.config.prevent_cache = true;
scheduler.attachEvent("onEventSave",function(id,data){
// use the text field to set the title in the calendar view
data.text = data['emp_title'] + ' – ' + data['status'];
return true;
});
// Modify the time scale, so we have taller time slots (displays more info per entry)
var step = 15;
var formatFunc = scheduler.date.date_to_str("%H:%i");
scheduler.config.hour_size_px=(60/step)*22;
scheduler.templates.hour_scale = function(date){
html="";
for (var i=0; i<60/step; i++){
html += "<div style='height:22px;line-height:22px;'>" + formatFunc(date) + "</div>";
date = scheduler.date.add(date,step,"minute");
}
return html;
}
scheduler.init('scheduler_here', new Date(), "month");
scheduler.load(INC_ROOT + "dhtmlxScheduler_connector.php");
var emp_dp = new dataProcessor(INC_ROOT + "dhtmlxScheduler_connector_emp.php");
emp_dp.init(scheduler);
emp_dp.attachEvent("onBeforeUpdate", function(id, state, data){
console.log('Ready to update');
// any custom logic here
return true;
});
emp_dp.attachEvent("onAfterUpdate", function(id, action, tid, response){
if (action=='error'){
webix.message({'type':'error','text':'An unknown error prevented your update from saving correctly.'});
}
// any custom logic here
return true;
});
Hope somebody can help shed some light on this!
Thanks!
localhost-medlegal-sched-export-0719.sql.zip (1.54 KB)