1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice

PHP module install

Discussion in 'Plesk for Linux - 8.x and Older' started by lightborne, Oct 25, 2005.

  1. lightborne

    lightborne Guest

    0
     
    Trying to install PDFLib on my server, I did "pear install pdflib," restarted httpd, and it doesn't show up in phpinfo()

    I will pay someone to troubleshoot this.
     
  2. CoKo

    CoKo Guest

    0
     
    As far as I know pear modules never show up in phpinfo().

    You can list them with

    pear list

    from shell.
     
  3. lightborne

    lightborne Guest

    0
     
    [root@as psa]# pear list
    Installed packages:
    ===================
    Package Version State
    Archive_Tar 1.1 stable
    Console_Getopt 1.2 stable
    HTML_Template_IT 1.1 stable
    Net_UserAgent_Detect 2.0.1 stable
    PEAR 1.3.5 stable
    XML_RPC 1.3.1 stable
    pdflib 2.0.4 stable

    OK so everything looks fine there, but when I go to my PHP script...

    "Fatal error: Call to undefined function: pdf_new() in /home/httpd/..." etc, etc
     
  4. CoKo

    CoKo Guest

    0
     
    Maybe you forgot the

    require 'pdflib';

    ??

    Just a guess. If not - is there anything in the error log when you open the PHP file?
     
  5. lightborne

    lightborne Guest

    0
     
    Hmm... weird error in the log:

    PHP Warning: Unknown(): Unable to load dynamic library '/usr/lib/php4/pdf.so' - /usr/lib/php4/pdf.so: undefined symbol: php_sprintf in Unknown on line 0
    PHP Warning: Unknown(): Unable to load dynamic library '/usr/lib/php4/pgsql.so' - libpq.so.3: cannot open shared object file: No such file or directory in Unknown on line 0
     
  6. CoKo

    CoKo Guest

    0
     
    Try to locate pdf.so on your server:

    updatedb
    locate pdf.so
     
  7. lightborne

    lightborne Guest

    0
     
    [root@as root]# locate pdf.so
    /usr/lib/php4/pdf.so
    /usr/local/lib/libpdf.so.5
    /usr/local/lib/libpdf.so.5.0.1
    /usr/local/lib/libpdf.so
    /usr/local/lib/php/extensions/no-debug-non-zts-20020429/pdf.so
    /root/PDFlib/libs/pdflib/.libs/libpdf.so.5.0.1
    /root/PDFlib/libs/pdflib/.libs/libpdf.so.5
    /root/PDFlib/libs/pdflib/.libs/libpdf.so
     
  8. CoKo

    CoKo Guest

    0
     
    looking at PEAR pdflib, it has nothing to do with those warnings.

    Once again: Did you use the require in your PHP script? Does it throw an error (on screen or in logs)?
     
  9. lightborne

    lightborne Guest

    0
     
    Warning: main(pdflib): failed to open stream: No such file or directory in /home/httpd/vhosts/lightborne/httpdocs/include/lib.php on line 3

    Fatal error: main(): Failed opening required 'pdflib' (include_path='.:/usr/share/pear') in /home/httpd/vhosts/lightborne/httpdocs/include/lib.php on line 3
     
  10. CoKo

    CoKo Guest

    0
     
    Can you please post the result of

    ls -al /usr/share/pear
     
  11. lightborne

    lightborne Guest

    0
     
    [root@as pear]# ls -la
    total 156
    drwxr-xr-x 13 root root 4096 Oct 25 16:03 .
    drwxr-xr-x 59 root root 4096 Oct 19 06:57 ..
    -rw-r--r-- 1 root root 6 Dec 23 2004 .filemap
    -rw-r--r-- 1 root root 0 Oct 24 22:58 .lock
    drwxr-xr-x 2 root root 4096 Oct 24 22:33 .registry
    drwxr-xr-x 2 root root 4096 Oct 4 11:00 Archive
    drwxr-xr-x 2 root root 4096 Oct 4 11:00 Console
    drwxr-xr-x 2 root root 4096 Oct 4 11:00 DB
    -rw-r--r-- 1 root root 27414 Dec 23 2004 DB.php
    -rw-r--r-- 1 root root 7719 Dec 23 2004 HTTP.php
    drwxr-xr-x 2 root root 4096 Oct 4 11:00 Mail
    -rw-r--r-- 1 root root 7279 Dec 23 2004 Mail.php
    drwxr-xr-x 2 root root 4096 Oct 4 11:00 Net
    drwxr-xr-x 2 root root 4096 Oct 4 11:00 OS
    drwxr-xr-x 4 root root 4096 Oct 4 11:00 PEAR
    -rw-r--r-- 1 root root 29809 Dec 23 2004 PEAR.php
    -rw-r--r-- 1 root root 14889 Dec 23 2004 System.php
    drwxr-xr-x 3 root root 4096 Oct 4 11:00 XML
    drwxr-xr-x 3 root root 4096 Oct 4 11:00 data
    drwxr-xr-x 5 root root 4096 Oct 24 21:29 docs
    -rw-r--r-- 1 root root 9137 Dec 23 2004 pearcmd.php
     
  12. CoKo

    CoKo Guest

    0
     
    There's nothing fresh installed in /usr/share/pear - I fear your installation failed.

    try

    pear uninstall pdflib
    pear install pdflib

    and watch if there are any error messages!
    In addition: I think the PEAR package pdflib is no longer maintained - you can't get it for newer versions of PEAR. Maybe you should look for other options...
     
Loading...