Hello Mike,
I have some trouble trying ti generate a PDF on Centos 6.6 with a php server.
I set up this prince version prince-10r7-centos6-x86_64.tar.gz and your last version of php wrapper.
Whenever I start to run my code the process seems to be stuck in an infinite loop and I can't get any $result = true from the method convert_file_to_file. Also setting the log method don't write in the log file.
Here my code sample
I went through the php wrapper's code and the issue seems to be coming from the convert_internal_file_to_file function.
After running the command with proc_open, readmessage() I have some messages in the pipes[2]. PLease see attached the logs. But it did not go to the end of the process and I neither failure nor success...
I had to write this code to be able to log something.
Is there something wrong witch the code?
I ran the command I found in $pathAndArgs in the shell and it's working without any errors. Could there be issues with user permissions? (also tried but not succesful)
Thanks in advance for your time Mike,
David
I have some trouble trying ti generate a PDF on Centos 6.6 with a php server.
I set up this prince version prince-10r7-centos6-x86_64.tar.gz and your last version of php wrapper.
Whenever I start to run my code the process seems to be stuck in an infinite loop and I can't get any $result = true from the method convert_file_to_file. Also setting the log method don't write in the log file.
Here my code sample
$file = "/somepath/randomid.html'; #We have to have a tmp files, multiples request could be done at the same time
file_put_contents($file, $html);
$errors = array();
$pdfFileName="some name";
$prince = new Prince($princePath);
if(!$prince) die("Prince instantiation failed");
$prince->setLog("/u01/app/apache/htdocs/prince.log"); # I don't get any logs written in this file
$prince->setInputType('html');
$prince->setHTML(true);
$prince->addStyleSheet('somecssfile.css');
$returnVar = $prince->convert_file_to_file($file, $pdfFileName, $errors);
I went through the php wrapper's code and the issue seems to be coming from the convert_internal_file_to_file function.
After running the command with proc_open, readmessage() I have some messages in the pipes[2]. PLease see attached the logs. But it did not go to the end of the process and I neither failure nor success...
I had to write this code to be able to log something.
$log= "line $line\n";
file_put_contents('/u01/app/apache/htdocs/prince.log', $log, FILE_APPEND)
Is there something wrong witch the code?
I ran the command I found in $pathAndArgs in the shell and it's working without any errors. Could there be issues with user permissions? (also tried but not succesful)
Thanks in advance for your time Mike,
David