[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cobalt-users] php - pdflib - undefined functions possible wrong configure path ?
- Subject: [cobalt-users] php - pdflib - undefined functions possible wrong configure path ?
- From: "Fragga" <fragga@xxxxxxxxxxxx>
- Date: Tue Nov 19 03:08:01 2002
- List-id: Mailing list for users to share thoughts on Sun Cobalt products. <cobalt-users.list.cobalt.com>
ello,
im trying to use some php functions with pdflib but it keeps coming
resulting in undefined functions as i think the configure path is wrong. The
PHP version im using is 4.1.2 as compiled from the package by pkgmaster.com
and im using a raq 4. a quick phpinfo() throws up :
'./configure' '--prefix=/usr' '--with-apxs=/usr/sbin/apxs' '--with-gd'
'--with-gettext=/usr' '--enable-safe-mode'
'--with-config-file-path=/etc/httpd' '--with-exec-dir=/usr/bin'
'--with-zlib' '--enable-magic-quotes' '--with-regex=system' '--with-ttf'
'--with-db' '--with-gdbm' '--enable-mbstring' '--enable-mbstr-enc-trans'
'--enable-track-vars' '--enable-wddx=shared' '--enable-mm=shared'
'--enable-xml' '--enable-ftp' '--disable-debug' '--with-libdir=/usr/lib'
'--with-db3' '--with-interbase=shared' '--with-pgsql=shared' '--with-ldap'
'--with-imap' '--with-curl=shared' '--with-pdflib=shared'
so that concirms it has been compiled with pdflib support. ive also
performed the following :
[root lib]# pwd
/usr/lib
[root lib]# find / -name "libpdf.*"
find: /proc/6/fd: Permission denied
/usr/lib/libpdf.a
/usr/lib/libpdf.la
/usr/lib/libpdf.so
/usr/lib/libpdf.so.1
/usr/lib/libpdf.so.1.1.2
[root lib]# ls -la | grep libpdf
-rw-r--r-- 1 root root 766k Feb 25 2002 libpdf.a
-rw-r--r-- 1 root root 689 Feb 25 2002 libpdf.la
lrwxrwxrwx 1 root root 15 Mar 1 2002 libpdf.so ->
libpdf.so.1.1.2
lrwxrwxrwx 1 root root 15 Mar 1 2002 libpdf.so.1 ->
libpdf.so.1.1.2
-rwxr-xr-x 1 root root 662k Feb 25 2002 libpdf.so.1.1.2
[root lib]#
anyone got any ideas as to why this isnt working or have successfully used
this in the past ? ive found on the web a snip from a post about a similar
problem of undefined functions with pdflib which said ::
Quote - "There is older PDFlib somewhere in /usr PHP looks for it (if you
don't specify a path) in /usr (although the help says it's looking for it in
/usr/local that is not correct) By specifying the install prefix path
for --with-pdlib=/usr/local should fix this problem"
is this going to need a rebuild of PHP ? out of date version of pdflib ? any
ideas would be appreciated.
Thanks in advance.
fragga
test code im using is below and straght off PDF_new() is undefined.
<?
$pdf = PDF_new();
PDF_open_file($pdf);
PDF_set_info($pdf, "author", "Name");
PDF_set_info($pdf, "title", "Title");
PDF_set_info($pdf, "creator", "www.domain.com");
PDF_set_info($pdf, "subject", "Subject");
PDF_begin_page($pdf, 450, 450);
$font = PDF_findfont($pdf, "Helvetica-Bold", "winansi",0);
PDF_setfont($pdf, $font, 12);
PDF_show_xy($pdf, "blah blah blah", 5, 225);
PDF_end_page($pdf);
PDF_close($pdf);
$buffer = PDF_get_buffer($pdf);
header("Content-type: application/pdf");
header("Content-Length: ".strlen($buffer));
header("Content-Disposition: inline; filename=test.pdf");
echo $buffer;
PDF_delete($pdf);
?>