php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11709 Call to undefined function: pdf_new()
Submitted: 2001-06-26 15:03 UTC Modified: 2001-06-27 14:38 UTC
From: william_moore at umanitoba dot ca Assigned:
Status: Closed Package: *PDF functions
PHP Version: 4.0.6 OS: Linux 2.2.16-22
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: william_moore at umanitoba dot ca
New email:
PHP Version: OS:

 

 [2001-06-26 15:03 UTC] william_moore at umanitoba dot ca
I have attempted to compile PDF support into PHP, yet when I use the script to build a PDF document with the face of a clock and the current time it fails immediately with the error
  Fatal error: Call to undefined function: pdf_new() in /var/www/html/php/pdf-test.php on line 6

The script I am using is from Example 2 on the page:
http://php.net/manual/en/ref.pdf.php

I am using:
  Apache 1.3.20
  PDFLIB 4.0.1  (installed in /usr/local/lib)
  PHP 4.0.6

The configure script I have used for PHP is:
./configure \
  --with-apxs=/usr/local/apache/bin/apxs \
  --disable-pear \
  --enable-libgcc \
  --enable-ftp \
  --with-yaz \
  --with-pdflib=shared \
  --with-tiff-dir=shared \
  --with-jpeg-dir=shared \
  --with-png-dir=shared \
  --with-zlib=shared \
  --with-gd=shared \
  --with-regex=system \
  --enable-yp \
  --enable-bcmath \
  --enable-c9x-inline \
  --enable-calendar \
  --enable-inline-optimization \
  --enable-trans-sid \
  --with-dom=shared \
  --with-mhash=shared \
  --with-config-file-path=/usr/local/apache/conf

Configure does not complain about missing any PDF support files.

The config.log file had the following lines regarding PDFlib support:configure:39416: checking whether to include PDFlib support
configure:39602: checking for PDF_show_boxed in -lpdf
configure:39623: gcc -o conftest -g -O2  -DLINUX=22 -DUSE_HSREGEX -DUSE_EXPAT -DSUPPORT_UTF8  -Wl,-rpath,/usr/lib/gcc-lib/i386-redhat-linux/2.96 -L/usr/lib/gcc-lib/i386-redhat-linux/2.96 conftest.c -lpdf 
        -ltiff -ljpeg -lpng -lz
       -lgd -lcrypt -lresolv -lm -ldl -lnsl  -lresolv -lgcc 1>&5

After this scipt failed with the PHP 4.0.6 source, I followed the directions in the PDFLIB source which suggests to copy their copy of ext/pdf into the PHP source tree and recompile PHP. This made no difference.

Any suggestions?


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-27 03:05 UTC] derick@php.net
Does the output of phpinfo(); mention anything about PDF?
 [2001-06-27 08:43 UTC] william_moore at umanitoba dot ca
The only mention in the phpinfo output about pdf is the configure command. If need be the phpinfo page I have up for this system is located at:
  http://moore.cc.umanitoba.ca/php/php.php
 [2001-06-27 09:11 UTC] sniper@php.net
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)

Also, the --with-jpeg-dir and others don't accept 'shared' as parameter. Only a install prefix path. 

By specifying the install prefix path for --with-pdlib=/usr/local should fix this problem.
(delete config.cache before configure and do 'make clean' after)


 [2001-06-27 14:38 UTC] william_moore at umanitoba dot ca
Thank you for the suggestions as they worked.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu May 08 00:01:29 2025 UTC