dhtmlConnector and fludhing the buffer

Hello,

Environment:
dhtmlConnector(PHP version)+dhtmlSchedule

I’m hitting a weird problem. and I would need some help to see if this is a bug or not, I spent many hours on this. This issue might be reproducible with other dhtmlx products.

Steps to reproduce:

  1. Configure everything to work just fine. I have:
    scheduler.init(‘scheduler_here’,new Date(2012,2,2),“week”);
    scheduler.setLoadMode(“week”)
    Make sure that you have lots of data in for that week.

  2. Change the scheduler_here to:
    scheduler.init(‘scheduler_here’,new Date(2010,2,2),“week”);

  3. Go to the web interface and display the schedule.

  4. When displaying the schedule you will get an empty pop-up.

  5. Create an event, the page returned from events.php is empty as well, you will be able to see it.

  6. Refresh the page, the event will disappear, check the DB and note that the event is there.

  7. Create more events, is my case because I have small events I had to create 23 of them.

  8. If I change, in base_connector.php,

protected function end_run(){ $time=microtime(true)-$this->exec_time; LogMaster::log("Done in {$time}s"); flush(); die(); }

to

protected function end_run(){ $time=microtime(true)-$this->exec_time; LogMaster::log("Done in {$time}s"); flush(); // die(); }

so I comment out die everything works fine.

  1. With die commented out while using Firebug I noted that with 22 items the XML would be 7.5KB while with 23 items the generated XML would be 7.8.

I used IE8 and Firefox 10.0.6ESR. Is this something that you guys were aware of? Do you agree that there is a bug in the connector or needs a workaround to support small XML as well? Any plans to support this and fix it?

Thank you

Normally die must not cause any problems because flush() before it must output all data on client side. Maybe it somehow related to your php configuration (something data buffering related)

Empty alert means that invalid xml was received and it was an empty response.

On other hand removing die must not break any functionality, normally it was added to be sure that some other output will not break generated xml data