The Community Forums

Interact with an entire community of cPanel & WHM users.
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Problem: compile php with PDFLIB and PHP 5.1.6

Discussion in 'General Discussion' started by CoolMike, Sep 12, 2006.

  1. CoolMike

    CoolMike Well-Known Member

    Joined:
    Sep 6, 2001
    Messages:
    307
    Likes Received:
    0
    Trophy Points:
    16
    Hi

    I'm using PHP 5.1.6 and need the PDFLIB functionality. Therefore I marked the tickbox PDFlib in WHM and recompiled PHP.

    In phpinfo I can see, PHP is configured with pdflib:

    Code:
    './configure' '--with-apxs=/usr/local/apache/bin/apxs' '--prefix=/usr/local' '--with-xml' '--enable-bcmath' '--enable-calendar' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--enable-magic-quotes' '--with-mysqli' '--with-mysql=/usr' '--enable-discard-path' '--with-pdflib' '--with-pear' '--enable-sockets' '--enable-track-vars' '--with-ttf' '--with-freetype-dir=/usr' '--enable-gd-native-ttf' '--with-zip' '--with-zlib'
    
    But there is no section in phpinfo for PDF below. On another server with pdflib, I can see this section.

    When I try the testscript fom php.net for PHP5 I get this error message:

    Fatal error: Class 'PDFlib' not found in /home/username/public_html/test.php on line 4

    Can someonw help me with this problem? Or is PDFlib not working with this PHP version?

    Michael
     
  2. MZmuda

    MZmuda Active Member

    Joined:
    Oct 22, 2005
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Long Island, NY
    PDFLib

    Hi, Mike,

    I too had MASSIVE problems installing PDFLib. PLEASE DON'T do anything I say in this message without knowing that I was taking multiple stabs in the dark, hoping SOMETHING would work out.

    First, get into contact with the guys at PDFLib. They DO offer some good support.

    Second, I found (and this is weird,) that doing the Apache update and turning on PDFLib (Free) (the free version of PDFLib) FIRST greased the wheels for a later PDFLib Pro (or whatever the paid-for version is called) installation. (I don't know how this worked - I had PDFLib all installed and everything, and it didn't work. Then I installed the Free PDFLib version, and shazam, the pro version materialized. I still can't figure it out.)

    I'm migrating to a new box as we speak, and based on my last experience installing PDFLib, I've decided to hire a server management company to do it for me. The $30-$100 that you're going to spend will save you LOTS of time and aggrivation later. (The last time, it took me about a week [Really - took me about 7 days to get it installed]) Mind you, I was "up" at 4 and 5 am to get "real-time" tech support from PDFLib in Europe, so I could ask a question, get an answer, try it, and ask another question MULTIPLE TIMES in a day - something that is a little hard if you're e-mailing them at... say... 1pm Pacific time! (Actually, their support WAS pretty good, and even got back to me at what would have been around 11pm their time, so...)

    Good luck installing it - Let me know how it goes for you!

    - Mike Z.
     
  3. CoolMike

    CoolMike Well-Known Member

    Joined:
    Sep 6, 2001
    Messages:
    307
    Likes Received:
    0
    Trophy Points:
    16
    Hi

    Thanks for the information, did you also use the PHP version 5.1.6? Because I installed pdflib already several times with PHP4 and never had problems.

    Michael
     
  4. MZmuda

    MZmuda Active Member

    Joined:
    Oct 22, 2005
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Long Island, NY
    PDFLib

    Hi, Mike,

    I think when I did it, it was version 5.1.4 or something like that. (It was about 4-5 months ago.)

    Never tried it in PHP 4.x.

    Let me know if / how you get it installed -

    - Mike Z.
     
  5. bigpy2003

    bigpy2003 Well-Known Member

    Joined:
    Feb 22, 2004
    Messages:
    124
    Likes Received:
    0
    Trophy Points:
    16
    To get it working with PHP 5, I did the following:

    I downloaded PDFLib Lite from the PDFLib website. I then extracted it. After extracting it, I did the following:
    ./configure
    make
    make install

    After that was done, it was then installed. Now, time to install the php lib.

    I did:
    pecl install pdflib

    It'll ask where your copy of pdflib is installed, I put: /usr/

    It then builds the extension, puts it in a directory (can find it through the output) and all you need to do is copy it to your php extension dir and modify your php.ini to load the module.
     
  6. MZmuda

    MZmuda Active Member

    Joined:
    Oct 22, 2005
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Long Island, NY
    Cool - Thanks, Bigpy,

    I eventually ended up hiring a support company to do it for me - It's all installed now, but what a pain!!! :)

    I remember doing something like that (installing the lite version then the regular version over it, which, for some reason, seems to work just fine...) but I will remember YOUR notes for the next time I have to install it on a new server.

    Thanks again -

    Z
     
  7. DannyM

    DannyM Member

    Joined:
    Jul 31, 2003
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Which company did you hire?
     
  8. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    There was a waste of money for you! :D

    Compiling PDFLIB into PHP 4/5 is incredibly brainless simple!

    That is one item easy enough that I probably wouldn't even bother to charge you.
     
  9. DannyM

    DannyM Member

    Joined:
    Jul 31, 2003
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Well, if so, why don't you tell us how to do it :)
    As you can see using the search on the forum, there are more people having trouble with this.
     
  10. MZmuda

    MZmuda Active Member

    Joined:
    Oct 22, 2005
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Long Island, NY
    Good to know, Spiral! :)

    Honestly, it was just such a pain... my "semi-managed" support company even tossed the problem over to CPanel support, and they spent a good couple of hours (5?) and couldn't get it installed...

    I think I got it installed by doing **SOMETHING** like

    1) Install PDFLIB (full ver) per the instructions in the included documentation.
    - [phpinfo shows no pdf support installed]

    2) Install PDFLIB Lite via CPanel (or Cpan)
    - [phpinfo shows pdflib lite installed]

    3) Install PDFLIB (full ver) again per the instructions in the included docs...
    - [phpinfo shows pdflib full version installed]

    Go figure...

    And yes, I tried Lite then full, and nada - no dice.

    So, yes... I will DEFINITELY give you a call the next time my servers need a new install..

    (Oh - and whenever they release a new version, it's a new install all over again! YAY!!!) :D

    Ok - 'nuff fer me...

    Ciao -

    Z
     
  11. CoolMike

    CoolMike Well-Known Member

    Joined:
    Sep 6, 2001
    Messages:
    307
    Likes Received:
    0
    Trophy Points:
    16
    Looks like this is still not working. I have to install it again, but still not working. Is there any good installation instruction to install pdflib with php5?
     
  12. bigpy2003

    bigpy2003 Well-Known Member

    Joined:
    Feb 22, 2004
    Messages:
    124
    Likes Received:
    0
    Trophy Points:
    16
    Maybe my blog might help. http://justletitflow.com/blog/pdflib-and-php-5/
     
  13. MZmuda

    MZmuda Active Member

    Joined:
    Oct 22, 2005
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Long Island, NY
    That's a really good blog! I may have to refer to it when I upgrade to the latest version of the pro version of PDFLib.

    Thanks!

    - Z
     
  14. justhost

    justhost Well-Known Member

    Joined:
    Sep 2, 2003
    Messages:
    108
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Halifax, Nova Scotia
    Hello all

    I am curious if all of you have purchased a licence to run PDFLib on your servers? I would like to install and activate it however, I do not want to pay the hundred s the licence costs?

    Anyone?
     
  15. bigpy2003

    bigpy2003 Well-Known Member

    Joined:
    Feb 22, 2004
    Messages:
    124
    Likes Received:
    0
    Trophy Points:
    16
    depends, if you just want to create pdf's, then you can use their free one...as long as it's not for commercial use...im sure you know that though.
     
  16. justhost

    justhost Well-Known Member

    Joined:
    Sep 2, 2003
    Messages:
    108
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Halifax, Nova Scotia
    If you are putting it on a web hosting server isnt that in itself commercial?
     
  17. bigpy2003

    bigpy2003 Well-Known Member

    Joined:
    Feb 22, 2004
    Messages:
    124
    Likes Received:
    0
    Trophy Points:
    16
    If you ask me, I'd say no it's not commercial. I see commercial as you charging for use of it...or making money off of it.

    http://www.google.com/search?hl=en&...cial+Use&sa=X&oi=glossary_definition&ct=title

    Depends how you want to look at it.

    Also, I must note that...
    A web hosting server is just a computer that allows ppl access to a website. If I set my machine up to host a few of my own sites, my machine isn't commercial. Whether you charge or not to host websites isn't really any of their business if you ask me. I'd say as long as you're not making money off of their product, it's fine. SO, if you're not charging for people to make PDF's, then you're good.

    In all it seems arguable. http://www.pdflib.com/products/pdflib-family/pdflib-lite/pdflib-lite-licensing/
     
Loading...

Share This Page