After I click the button, the cursor changes to busy, the status bar in my browser shows that it is connecting to the server and waiting on a response, but nothing happens. No file dialog is displayed, no new tabs, no new windows…nothing. I unzipped the PHP zip and call it with an absolute path as shown above. I know the PHP file is being called because I put this in it:
system("ls > file");
and there is a file called “file” with the contents of an ls in the same directory as generate.php.
Sorry for all of the posts, but I keep finding more information that may be helpful to the debug effort.
I added export to PDF functionality and it works perfectly. I did everything exactly the same. All of the code is literally side-by-side and the only differences are button IDs in the jQuery statements and the function calls to create the excel document and PDF document. The folder hierarchy was created exactly the same way.
Hi,
when you call export script it creates debug__xxxx_xx_xx.xml file with some information. Please, attach one of this files. By the way, debug mode may be turned off in generate.php:
The temp files it keeps trying to make called phpxltmp* are zero size, which seems to be the problem. It’s like it can’t write to the file or something, but the permissions should be set such that it can.
I found out some more information about where it is dying. I was correct when I assumed the zero length temp file had something to do with it. I searched for the name of the temp file as follows:
So I went to lib/PHPExcel/Write/Excel2007.php and started adding debug statements. I put the following statement in many places in order to see where execution stopped:
errno:2048
errstr:date(): It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Denver' for 'MDT/-6.0/DST' instead
errfile:<path to file>/common/toexcel/generate.php
errline:17
Your error handler is not very good, so I spruced it up a little by doing this:
[code]function PDFErrorHandler ($errno, $errstr, $errfile, $errline) {
global $xmlString;
Finally, I think I figured it out. You should put a big warning on your website that PHP must be compiled with --enable-zip, otherwise this will not work.
The ZipArchive class can’t be found on my system. I don’t know for sure that this is the only problem because I’m stuck, but it’s certainly part of it. Once I am able to move past this, I’ll post an update.
Sorry for all the posts. I just wanted to be thorough so you could see what I had already tried. I also like to document things in case someone else searches for a solution to the same issue.
Google fodder: “dhtmlxgrid export to Excel needs ZipArchive class support by building PHP with --enable-zip”
Oh, sorry, one other thing. Why didn’t the error log show that the class was unknown? It looks like the error output was setup with E_ALL, so that makes me think it would have complained to stdout. This would have been much easier if the log showed the error
Hi,
error_reporting outputs information about sent xml config. But it hides info about error. We will think about more efficient debugging. Thanks for your feedback.
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan