Forum Bugs

Prince commandline 1 sec linux php 30 secs..

cgray
I have been racking my brain over the last several days trying to figure out why this is happening. If I run the following on the command line it only takes 1 second to generate the pdf file.

/home/cgray/prince/lib/prince/bin/prince
--server
-s "/home/cgray/dolphinedc_com/public/media/css/interviewsummary.css"
-s "/home/cgray/dolphinedc_com/public/media/css/global.css"
-s "/home/cgray/dolphinedc_com/public/media/css/style.css"
-i "html"
--log="/home/cgray/dolphinedc_com/interviewsummaries/2010010101/46080/Prince.log"
--encrypt
--key-bits 128
--user-password="cgray"
--owner-password="mosmos99"
"/home/cgray/dolphinedc_com/interviewsummaries/2010010101/46080/InterviewSummary.html"

When I run it through my php code on Slackware Linux it takes 30 seconds. Same command, same file, same server, different results.

Any thoughts/ideas would be greatly appreciated...
mikeday
Is the PHP code saving the PDF to a file, or using the passthru mechanism to return it to the browser? Perhaps try adding the --debug flag to the command-line, then paste the log file output here, hopefully the timestamps in the log will show where the time is going.
cgray
Well looks like what hit the debug log show only the 1-2 seconds... Any other thoughts why the prince.log and the pdf file do not show up for 30 seconds?

Fri Feb 22 04:15:04 2013: ---- begin
Fri Feb 22 04:15:04 2013: debug: loading license: /home/cgray69/prince/lib/prince/license/license.dat
Fri Feb 22 04:15:04 2013: loading style sheet: /home/cgray69/prince/lib/prince/style/fonts.css
Fri Feb 22 04:15:04 2013: debug: loaded resource: /home/cgray69/prince/lib/prince/style/fonts.css
Fri Feb 22 04:15:04 2013: debug: loaded resource: type: no
Fri Feb 22 04:15:04 2013: Loading document...
Fri Feb 22 04:15:04 2013: loading HTML input: /home/cgray69/dolphinedc_com/interviewsummaries/2010010101/46054/InterviewSummary.html
Fri Feb 22 04:15:04 2013: debug: loaded document: /home/cgray69/dolphinedc_com/interviewsummaries/2010010101/46054/InterviewSummary.html
Fri Feb 22 04:15:04 2013: debug: sniffed doctype: XHTML (no namespace)
Fri Feb 22 04:15:04 2013: loading style sheet: /home/cgray69/prince/lib/prince/style/xhtml.css
Fri Feb 22 04:15:04 2013: debug: loaded resource: /home/cgray69/prince/lib/prince/style/xhtml.css
Fri Feb 22 04:15:04 2013: debug: loaded resource: type: no
Fri Feb 22 04:15:04 2013: loading style sheet: /home/cgray69/prince/lib/prince/style/common.css
Fri Feb 22 04:15:04 2013: debug: loaded resource: /home/cgray69/prince/lib/prince/style/common.css
Fri Feb 22 04:15:04 2013: debug: loaded resource: type: no
Fri Feb 22 04:15:04 2013: loading style sheet: /home/cgray69/prince/lib/prince/style/hyph.css
Fri Feb 22 04:15:04 2013: debug: loaded resource: /home/cgray69/prince/lib/prince/style/hyph.css
Fri Feb 22 04:15:04 2013: debug: loaded resource: type: no
Fri Feb 22 04:15:04 2013: loading style sheet: /home/cgray69/prince/lib/prince/style/mathml.css
Fri Feb 22 04:15:04 2013: debug: loaded resource: /home/cgray69/prince/lib/prince/style/mathml.css
Fri Feb 22 04:15:04 2013: debug: loaded resource: type: no
Fri Feb 22 04:15:04 2013: loading style sheet: /home/cgray69/prince/lib/prince/style/svg.css
Fri Feb 22 04:15:04 2013: debug: loaded resource: /home/cgray69/prince/lib/prince/style/svg.css
Fri Feb 22 04:15:04 2013: debug: loaded resource: type: no
Fri Feb 22 04:15:04 2013: loading style sheet: /home/cgray69/dolphinedc_com/public/media/css/interviewsummary.css
Fri Feb 22 04:15:04 2013: debug: loaded resource: /home/cgray69/dolphinedc_com/public/media/css/interviewsummary.css
Fri Feb 22 04:15:04 2013: debug: loaded resource: type: no
Fri Feb 22 04:15:04 2013: loading style sheet: /home/cgray69/dolphinedc_com/public/media/css/global.css
Fri Feb 22 04:15:04 2013: debug: loaded resource: /home/cgray69/dolphinedc_com/public/media/css/global.css
Fri Feb 22 04:15:04 2013: debug: loaded resource: type: no
Fri Feb 22 04:15:04 2013: loading style sheet: /home/cgray69/dolphinedc_com/public/media/css/style.css
Fri Feb 22 04:15:04 2013: debug: loaded resource: /home/cgray69/dolphinedc_com/public/media/css/style.css
Fri Feb 22 04:15:04 2013: debug: loaded resource: type: no
Fri Feb 22 04:15:04 2013: loading style sheet: http://www.princexml.com/fonts/league/index.css
Fri Feb 22 04:15:05 2013: debug: loaded resource: http://www.princexml.com/fonts/league/index.css
Fri Feb 22 04:15:05 2013: debug: loaded resource: type: yes(resource_type("text/css", [], css, no))
Fri Feb 22 04:15:05 2013: debug: prepack
Fri Feb 22 04:15:05 2013: loading image: /home/cgray69/dolphinedc_com/public/media/css/images/Arrow_Right.png
Fri Feb 22 04:15:05 2013: debug: loaded resource: /home/cgray69/dolphinedc_com/public/media/css/images/Arrow_Right.png
Fri Feb 22 04:15:05 2013: debug: loaded resource: type: no
Fri Feb 22 04:15:05 2013: Converting document...
Fri Feb 22 04:15:05 2013: debug: pack
Fri Feb 22 04:15:05 2013: debug: font request: bold Calibri
Fri Feb 22 04:15:05 2013: debug: font scan: Calibri
Fri Feb 22 04:15:05 2013: debug: font scan: Calibri, 0 matches
Fri Feb 22 04:15:05 2013: debug: font scan: Times New Roman
Fri Feb 22 04:15:05 2013: debug: font scan: Times New Roman, 4 matches
Fri Feb 22 04:15:05 2013: debug: font scan: DejaVu Serif
Fri Feb 22 04:15:05 2013: debug: font scan: DejaVu Serif, 0 matches
Fri Feb 22 04:15:05 2013: debug: font scan: OpenSymbol
Fri Feb 22 04:15:05 2013: debug: font scan: OpenSymbol, 0 matches
Fri Feb 22 04:15:05 2013: debug: font scan: AR PL UMing CN
Fri Feb 22 04:15:05 2013: debug: font scan: AR PL UMing CN, 0 matches
Fri Feb 22 04:15:05 2013: debug: font scan: AR PL SungtiL GB
Fri Feb 22 04:15:05 2013: debug: font scan: AR PL SungtiL GB, 0 matches
Fri Feb 22 04:15:05 2013: debug: font scan: Lohit Hindi
Fri Feb 22 04:15:05 2013: debug: font scan: Lohit Hindi, 0 matches
Fri Feb 22 04:15:05 2013: debug: font scan: Ani
Fri Feb 22 04:15:05 2013: debug: font scan: Ani, 0 matches
Fri Feb 22 04:15:05 2013: debug: font scan: Mukti Narrow
Fri Feb 22 04:15:05 2013: debug: font scan: Mukti Narrow, 0 matches
Fri Feb 22 04:15:05 2013: debug: font scan: Lohit Punjabi
Fri Feb 22 04:15:05 2013: debug: font scan: Lohit Punjabi, 0 matches
Fri Feb 22 04:15:05 2013: debug: font scan: Lohit Gujarati
Fri Feb 22 04:15:05 2013: debug: font scan: Lohit Gujarati, 0 matches
Fri Feb 22 04:15:05 2013: debug: font scan: Lohit Tamil
Fri Feb 22 04:15:05 2013: debug: font scan: Lohit Tamil, 0 matches
Fri Feb 22 04:15:05 2013: debug: font scan: Lohit Telugu
Fri Feb 22 04:15:05 2013: debug: font scan: Lohit Telugu, 0 matches
Fri Feb 22 04:15:05 2013: debug: font scan: Lohit Kannada
Fri Feb 22 04:15:05 2013: debug: font scan: Lohit Kannada, 0 matches
Fri Feb 22 04:15:05 2013: debug: font scan: MalOtf
Fri Feb 22 04:15:05 2013: debug: font scan: MalOtf, 0 matches
Fri Feb 22 04:15:05 2013: debug: font scan: Lohit Oriya
Fri Feb 22 04:15:05 2013: debug: font scan: Lohit Oriya, 0 matches
Fri Feb 22 04:15:05 2013: used font: Times New Roman, Bold
Fri Feb 22 04:15:05 2013: debug: font request: Arial
Fri Feb 22 04:15:05 2013: debug: font scan: Arial
Fri Feb 22 04:15:05 2013: debug: font scan: Arial, 4 matches
Fri Feb 22 04:15:05 2013: used font: Arial, Regular
Fri Feb 22 04:15:05 2013: debug: font request: italic Arial
Fri Feb 22 04:15:05 2013: used font: Arial, Italic
Fri Feb 22 04:15:05 2013: debug: font request: Helvetica
Fri Feb 22 04:15:05 2013: debug: font scan: Helvetica
Fri Feb 22 04:15:05 2013: debug: font scan: Helvetica, 0 matches
Fri Feb 22 04:15:05 2013: used font: Times New Roman, Regular
Fri Feb 22 04:15:05 2013: debug: font request: bold Arial
Fri Feb 22 04:15:05 2013: used font: Arial, Bold
Fri Feb 22 04:15:05 2013: debug: font request: bold italic Calibri
Fri Feb 22 04:15:05 2013: used font: Times New Roman, Bold Italic
Fri Feb 22 04:15:06 2013: debug: writing output: /home/cgray69/dolphinedc_com/interviewsummaries/2010010101/46054/InterviewSummary.pdf
Fri Feb 22 04:15:06 2013: loading image: /home/cgray69/dolphinedc_com/public/media/css/images/Arrow_Right.png
Fri Feb 22 04:15:06 2013: debug: loaded resource: /home/cgray69/dolphinedc_com/public/media/css/images/Arrow_Right.png
Fri Feb 22 04:15:06 2013: debug: loaded resource: type: no
Fri Feb 22 04:15:06 2013: finished: success
Fri Feb 22 04:15:06 2013: ---- end
cgray
You can close this issue. This issue has nothing to do with Prince. I created a basic proc_open statement where the command has nothing to do with Prince and it still takes 30 seconds. Sounds like it is timing out for some reason.
mikeday
Okay that's interesting. So it does eventually run the command, but it delays for 30 seconds first? I have not seen that before. Please let us know if you find any answer to this, as it sounds very mysterious.
cgray
Well I am still having this issue. It appears from the debug log that the command only takes about 1-2 seconds to run but the proc_open does not return for 30 seconds. I output the datetime stamp right before and right after the proc_open command and it take 30 seconds. It also appears that the proc_open command does not execute the command for the first 28 seconds and then fires it off. Any help would b greatly appreciated.
mikeday
I would have to suspect something about the PHP version or settings. Are you able to try this on another machine, or a virtual machine, with a fresh PHP installation? Because it really shouldn't behave like this.