DHTMLXGantt - Logging not working.


#1

I can’t seem to get logging working. When I add the below line the interface just shows an error in the top right corner and keeps working.
$gantt->enable_log(“logfile.txt”);

Is there anything I’m missing?

The file is writable by IIS.


#2

is the log “logfile.txt” creating on your server successfully?


#3

If you have an error in your gantt:
docs.dhtmlx.com/gantt/faq.html# … ttopcorner
it might not be related with the data loading or the connector. it might be a problem on a client-side.
Could you please, inform about the text of that error in your application.


#4

Thanks Guys,

Firstly, no the file doesn’t auto create.

The Gantt itself shows ‘Invalid Data’ in the top right corner but nothing else of use.

Regards,

Chris.


#5

The Gantt itself shows ‘Invalid Data’ in the top right corner but nothing else of use.
‘Invalid Data’ usually means an empty server response from gantt.load(url), you can check if it’s so in chrome network panel.
There is many things that could cause it. If you find the problematic request in network panel, the response status might give a clue, e.g. maybe it has 40x or 50x errors. Also, do you have error reporting enabled in php settings? php.net/manual/en/function.error-reporting.php
If it’s disabled - please enable it and check if server response contains some error message

Also, in the parallel post:
forum.dhtmlx.com/viewtopic.php?f=19&t=58668
you’ve mentioned that you have no problems with the data loading, but have problems with the data updating.
Could you please, clarify in details your current problem.


#6

Hi Sematik,

I’ve enabled logging in the PHP code and checked the network panel in Chrome.
I’m getting the below errors when I have the gantt->enable logging command in my code. No issues with it commented out except that data doesn’t load back to my database (changes or additions). This is why I wanted to enable the logging!

Its a 500 error.

dhtmlxgantt.js:10565 GET 127.0.0.1/data.php 500 (Internal Server Error)
_call @ dhtmlxgantt.js:10565
get @ dhtmlxgantt.js:10483
gantt.load @ dhtmlxgantt.js:4868
(anonymous) @ (index):171

VM886:1 Uncaught SyntaxError: Unexpected end of JSON input
at JSON.parse ()
at Object.parse (dhtmlxgantt.js:5119)
at Object.gantt.on_load (dhtmlxgantt.js:4928)
at Object. (dhtmlxgantt.js:4869)
at dhtmlxgantt.js:10532


#7

I’ve enabled logging in the PHP code and checked the network panel in Chrome.
Could you please, share your response.

If the error appears after enabling the logging most probably you have no access on your server for the log file creating.


#8

Hi Sematik,

The details are above. I’ve also created an example of the error below.
partbandc.com:6781/index2.php


#9

Tested and double confirmed that I can in fact write a file in PHP to the same location as the DHTLMXGantt file. Very strange…


#10

Your provided link requires the authentication.
Could you please, open ticket at support.dhtmlx.com and provide a required info to reconstruct the problem


#11

Would love to but am using the free tier product - at least at the moment.
Thanks anyway!


#12

BTW, I got the earlier link working with Anonymous Auth if still useful.


#13

Your data2.php request returns the empty json and the 500 error.
While your data.php returns a valid json.