Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - Debenu & PHP-CPP on Linux examples?
  FAQ FAQ  Forum Search   Register Register  Login Login

Debenu & PHP-CPP on Linux examples?

 Post Reply Post Reply
Author
Message
michib View Drop Down
Beginner
Beginner


Joined: 31 Aug 20
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote michib Quote  Post ReplyReply Direct Link To This Post Topic: Debenu & PHP-CPP on Linux examples?
    Posted: 31 Aug 20 at 10:39AM
Hi to all,

I'm actually evaluating Debenu (foxit quick) PDF SDK. I need to integrate inside a PHP project on Linux. 

I am actually trying to get a working extension with php-cpp. I'm wondering if anybody has some working procedure or example for it? 

thanks,
Michele
Back to Top
txt258 View Drop Down
Beginner
Beginner


Joined: 28 Aug 20
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote txt258 Quote  Post ReplyReply Direct Link To This Post Posted: 31 Aug 20 at 5:57PM
We've the same issue :) 
Back to Top
michib View Drop Down
Beginner
Beginner


Joined: 31 Aug 20
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote michib Quote  Post ReplyReply Direct Link To This Post Posted: 01 Sep 20 at 10:09AM
Oh great.. we're two yet Big smile

I'm trying to compile the php extension with php-cpp, I'll post more eventually.
Back to Top
michib View Drop Down
Beginner
Beginner


Joined: 31 Aug 20
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote michib Quote  Post ReplyReply Direct Link To This Post Posted: 01 Sep 20 at 6:13PM
Hi to all,

I was able to successfully compile the extension... but unfortunately calling it does segfaults. Anyway, here is my procedure. 

Linux: CentOS Linux release 7.5.1804 (Core) 

== PHP-CPP: 2.2.0 ==
Downloaded: make, make install. This putted /usr/lib/libphpcpp.so
Tested libphpcpp with example 'simple' inside PHP-CPP package. This worked.

== Foxit == 
Copied the simple example.
main.cpp overwritten with Import/PHP/FoxitQPLLinuxMain1811.cpp from foxit devel zip.
Makefile modified in the relevant part:
COMPILER_FLAGS = -Wall -c -O2 -std=c++11 -fpic -o
LINKER_FLAGS = -shared
LINKER_DEPENDENCIES = -lphpcpp -lQPLLinux

This produces: foxitquickpdf.so
It seems linked correctly: ldd foxitquickpdf.so 
linux-vdso.so.1 =>  (0x00007ffd5891d000)
libphpcpp.so.2.2 => /lib/libphpcpp.so.2.2 (0x00007f2d009d6000)
libQPLLinux.so => /lib/libQPLLinux.so (0x00007f2cff738000)
libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f2cff431000)
libm.so.6 => /lib64/libm.so.6 (0x00007f2cff12f000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f2cfef19000)
libc.so.6 => /lib64/libc.so.6 (0x00007f2cfeb4c000)
/lib64/ld-linux-x86-64.so.2 (0x00007f2d00c80000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f2cfe948000)

/usr/lib/libQPLLinux.so -> /usr/lib/libFoxitQPL1811-linux-x64.so from foxit devel zip.

The trying with:
<?php

$QP = new FoxitQPL();
$k = $QP->Unlocked();
echo $k;

but it segfaults.

Any ideas?

thanks



Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 01 Sep 20 at 9:44PM
Hi Michi,

do you have a testkey or regkey from Debenu/Foxit tounlock the library?


Cheers,
Ingo

Back to Top
michib View Drop Down
Beginner
Beginner


Joined: 31 Aug 20
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote michib Quote  Post ReplyReply Direct Link To This Post Posted: 02 Sep 20 at 11:48AM
Hi Ingo,

Yet I have a trial key. I also tried putting 

$k = $QP->UnlockKey("jz45q97d5ap8ut6w77nr9rb8y");

but it also segfaults. Also var_dump($QP) segfaults. 

I think it's something relate to linking with Foxit provided .so lib for linux. I've noticed that even if I not specify -lQPLlinux as a linker option it gets compiled straight away... but how it could be so without reference to the .so library provided by Foxit?   

I noticed a warning:
[31-Aug-2020 23:14:50 UTC] PHP Warning:  Module 'qplphp' already loaded in Unknown on line 0

And here my backtrace:
Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x00007ffff7ef2413 in FoxitQPL::StringParm(std::string, bool&) () from /opt/rh/rh-php72/root/usr/lib64/php/modules/foxitquickpdf.so
#2  0x00007ffff7f5966d in void Php::ZendCallable::invoke<FoxitQPL, &FoxitQPL::UnlockKey>(_zend_execute_data*, _zval_struct*) ()
   from /opt/rh/rh-php72/root/usr/lib64/php/modules/foxitquickpdf.so
#3  0x00007fffed2a2ef5 in xdebug_execute_internal () from /opt/rh/rh-php72/root/usr/lib64/php/modules/xdebug.so
#4  0x0000555555829880 in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER ()
#5  0x0000555555887115 in execute_ex ()
#6  0x00007fffed2a2531 in xdebug_execute_ex () from /opt/rh/rh-php72/root/usr/lib64/php/modules/xdebug.so
#7  0x000055555588f573 in zend_execute ()
#8  0x00005555557e6423 in zend_execute_scripts ()
#9  0x0000555555781f60 in php_execute_script ()
#10 0x0000555555891976 in do_cli ()
#11 0x000055555563f57e in main ()
(gdb) 


Here on the forum someone is able to contact developers inside Foxit Debenu team?

Michele


Edited by michib - 02 Sep 20 at 12:03PM
Back to Top
michib View Drop Down
Beginner
Beginner


Joined: 31 Aug 20
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote michib Quote  Post ReplyReply Direct Link To This Post Posted: 02 Sep 20 at 12:14PM
Hi,

Just another matter of facts. I know notice that my license file, received on 29 august, says "valid until 21 aug 2020'. what????? I really start wondering if Foxit Quick pdf library is a real alternative to Foxit full...

Michele

Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 02 Sep 20 at 6:21PM
"...
Here on the forum someone is able to contact developers inside Foxit Debenu team?
..."

This here is a user-community which has less to do with Debenu/Foxit.
So there's no direct contact to the developers.

Here you should get the contact you need:
https://www.debenu.com/support/


Cheers,
Ingo

Back to Top
michib View Drop Down
Beginner
Beginner


Joined: 31 Aug 20
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote michib Quote  Post ReplyReply Direct Link To This Post Posted: 03 Sep 20 at 7:38AM
Hi ingo,

Thanks so much for you help!
I wrote to the official foxit support too; waiting for some feedback. 
I was wondering if - as usual elsewhere - some Foxit employee gives a sneak peak here... 

regards,
Michele
Back to Top
tfrost View Drop Down
Senior Member
Senior Member


Joined: 06 Sep 10
Location: UK
Status: Offline
Points: 437
Post Options Post Options   Thanks (0) Thanks(0)   Quote tfrost Quote  Post ReplyReply Direct Link To This Post Posted: 03 Sep 20 at 10:17AM
http://quickpdf.org/forum/forum_posts.asp?TID=3819&PID=15291&title=delphi-104-release#15291
Back to Top
michib View Drop Down
Beginner
Beginner


Joined: 31 Aug 20
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote michib Quote  Post ReplyReply Direct Link To This Post Posted: 03 Sep 20 at 12:22PM
Thanks tfrost!
I'll try to contact to leonardo_martello@foxitsoftware.com and see.

Miche
Back to Top
michib View Drop Down
Beginner
Beginner


Joined: 31 Aug 20
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote michib Quote  Post ReplyReply Direct Link To This Post Posted: 03 Sep 20 at 6:54PM
Hi to all,

Foxit Software Support replied today. Thanks to Kevin N. I was able to obtain my first PDF! He fixed also my license number wrong expiration date. 

To solve the segfault ... You need to pass the path to the .so library to the QPL constructor to make it work, in my case installed in /usr/lib:

$QP = new FoxitQPL('/usr/lib/libQPLLinux.so');

libQPLLinux.so is the name assigned by ldconfig.

Michele
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 03 Sep 20 at 7:17PM
BTW: Kevin Newman was the man who published the very first release of QuickPDF.

Cheers,
Ingo

Back to Top
txt258 View Drop Down
Beginner
Beginner


Joined: 28 Aug 20
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote txt258 Quote  Post ReplyReply Direct Link To This Post Posted: 05 Sep 20 at 3:57PM
Originally posted by michib michib wrote:

Hi to all,

I was able to successfully compile the extension... but unfortunately calling it does segfaults. Anyway, here is my procedure. 

Linux: CentOS Linux release 7.5.1804 (Core) 

== PHP-CPP: 2.2.0 ==
Downloaded: make, make install. This putted /usr/lib/libphpcpp.so
Tested libphpcpp with example 'simple' inside PHP-CPP package. This worked.

== Foxit == 
Copied the simple example.
main.cpp overwritten with Import/PHP/FoxitQPLLinuxMain1811.cpp from foxit devel zip.
Makefile modified in the relevant part:
COMPILER_FLAGS = -Wall -c -O2 -std=c++11 -fpic -o
LINKER_FLAGS = -shared
LINKER_DEPENDENCIES = -lphpcpp -lQPLLinux

This produces: foxitquickpdf.so
It seems linked correctly: ldd foxitquickpdf.so 
linux-vdso.so.1 =>  (0x00007ffd5891d000)
libphpcpp.so.2.2 => /lib/libphpcpp.so.2.2 (0x00007f2d009d6000)
libQPLLinux.so => /lib/libQPLLinux.so (0x00007f2cff738000)
libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f2cff431000)
libm.so.6 => /lib64/libm.so.6 (0x00007f2cff12f000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f2cfef19000)
libc.so.6 => /lib64/libc.so.6 (0x00007f2cfeb4c000)
/lib64/ld-linux-x86-64.so.2 (0x00007f2d00c80000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f2cfe948000)

/usr/lib/libQPLLinux.so -> /usr/lib/libFoxitQPL1811-linux-x64.so from foxit devel zip.

The trying with:
<?php

$QP = new FoxitQPL();
$k = $QP->Unlocked();
echo $k;

but it segfaults.

Any ideas?

thanks





Thank you. Im going to try and see if I can get this to work.
Back to Top
txt258 View Drop Down
Beginner
Beginner


Joined: 28 Aug 20
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote txt258 Quote  Post ReplyReply Direct Link To This Post Posted: 27 Dec 20 at 2:18AM
Just wanted to let members know. I'm still not having much luck getting this installed on a Linux either on Centos and Ubuntu.
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 27 Dec 20 at 3:53PM
Hi Tex,

what does "segfaults" mean?
Google isn't able to translate it.
Don't know if it matters but you know that QP is handling strings as unicode?

Cheers,
Ingo

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store