Forum


Replies: 1   Views: 2319
Execution stops when started without xdebug
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by Bl00d4ce  · 09-01-2018 - 08:04

Hi all,

I'm currently using the Trial Edition to check whether I can integrate phpdocx into my project and subsequently upgrade to a licensed version.

The following code works fine when the program is started with XDebug, and creates the file exactly as expected.

//...
console_log('HTML complete!')
$docx = new CreateDocx();
try {
    $docx->embedHTML($html_string);
    console_log('embedHTML called!');
}
catch (\Exception $e) {
    console_log('Exception caught!');
    console_log($e);
}
try {
    $docx->createDocx('testReport'.$user_id);
    console_log('Testfile created!');
}
catch (\Exception $e) {
    console_log('Exception caught!');
    console_log($e);
}
//...

However, when started without a debugger, script execution stops as soon as embedHTML is called, neither 'embedHTML called!' nor 'Exception caught' are shown in the console log.

Additional info: $html_string contains contains all data of a report varying from 30 to 200 pages and was used to create a .doc file until recently.

Thank you for any help on how to fix my problem! :)

Posted by admin  · 09-01-2018 - 08:51

Hello,

Sorry, but we don't know what could be wrong on your server. If it's not working when XDebug is not enabled, maybe PHP is not configured properly or some extension is missing. Please check your server logs.

We recommend you to test and run the included samples using PHP CLI mode and check if the output files are generated correctly. It also seems your project uses PHP namespaces but the trial package of phpdocx doesn't support them; you need to use an Advanced or Premium that supports PHP namespaces.

The trial package is encrypted and can't be debugged, but if you purchase a license you can see and change the source code to debug the library if needed. If you purchase a license and still have the same problems, please contact us again and one the members of the dev team will connect to your server to check it and find the source of the problem.

Regards.