Forum


Replies: 7   Views: 3703
Output files are not being saved anywhere
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 tarzip  · 15-08-2013 - 02:23

Hi



I am running phpdocx corporate on windows as well as on linux.



php config is exact same. openoffice/libreoffice server is running on both systems



php and java is in system path.



check.php also returns all green on both systems.



I used example from http://www.phpdocx.com/documentation/tutorial#plugin



 



require_once 'path_to_phpdocx/classes/CreateDocx.inc';



$docx = new CreateDocx();



$docx->enableCompatibilityMode();



$text = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, ' .

    'sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut ' .

    'enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut' .

    'aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit ' .

    'in voluptate velit esse cillum dolore eu fugiat nulla pariatur. ' .

    'Excepteur sint occaecat cupidatat non proident, sunt in culpa qui ' .

    'officia deserunt mollit anim id est laborum.';



$paramsText = array(

    'b' => 'on',

    'font' => 'Arial'

);



$docx->addText($text, $paramsText);



$docx->createDocx('example_text');

$docx->transformDocx('example_text.docx', 'example_text.html');



but it is not saving files.



I am passing the contents of output files to a variable which is used to display in ckeditor. As files are not being saved so php fails at file_get_contents() as it can't find the output html file.



 



I have used 'method'=>'direct' as well as 'method' => 'script'



I can see with xdebug that it is going through



passthru('php ' . dirname(__FILE__) . '/../lib/convert.php -s ' . $docSource . ' -t ' . $tempDoc . ' -d ' . $docDestination . ' -o ' . $options['odfconverter']);  



when method is script



and going through



passthru('java -jar ' . dirname(__FILE__) . '/../lib/openoffice/jodconverter-2.2.2/lib/jodconverter-cli-2.2.2.jar ' . $tempDoc . ' ' . $docDestination);



when method is direct



 



What am I doing wrong?