Re: strange CGI vs DSO problems with PDFlib
| From: | Chris Lee | Date: | Wed, 20 Dec 2000 19:34:40 +0000 |
| Subject: | Re: strange CGI vs DSO problems with PDFlib | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-31294@lists.php.net to get a copy of this message | ||
A simple code example to go with my previous post is
<?php
$fp = fopen("/tmp/test.pdf", "w");
$pdf = pdf_open($fp);
pdf_set_info($pdf, "Author", "Uwe Steinmann");
pdf_set_info($pdf, "Title", "Test for PHP wrapper of PDFlib 2.0");
pdf_set_info($pdf, "Creator", "See Author");
pdf_set_info($pdf, "Subject", "Testing");
pdf_begin_page($pdf, 595, 842);
pdf_add_outline($pdf, "Page 1");
pdf_set_font($pdf, "Times-Roman", 30, "host");
pdf_set_value($pdf, "textrendering", 1);
pdf_show_xy($pdf, "Times Roman outlined", 50, 750);
pdf_moveto($pdf, 50, 740);
pdf_lineto($pdf, 330, 740);
pdf_stroke($pdf);
pdf_end_page($pdf);
pdf_close($pdf);
fclose($fp);
echo "<A HREF=getpdf.php>finished</A>";
?>
Chris Lee
Mediawaveonline.com
In article <91r16q$e8p$1@toye.p.sourceforge.net>, "Chris Lee"
<lee@mediawaveonline.com> wrote:
> k, here's the strange thing.
>
> configure \
> --with-apxs \
> --disable-debug \
> --enable-versioning \
> --enable-trans-sid \
> --enable-sockets \
> --with-mhash \
> --with-mcrypt \
> --with-pgsql \
> --with-mysql \
> --with-jpeg-dir=/usr/local \
> --with-xpm-dir=/usr/X11R6 \
> --with-png \
> --with-tiff \
> --with-zlib \
> --with-ttf \
> --with-t1lib \
> --with-gd \
> --with-pdflib \
>
> when I try to use pdf function's namely
> pdf_set_font($pdf, "Times-Roman", 10, "winansi");
> apache segfaults, no error's, php doesn't issue a log error, or echo
> anything. The raw hearders show.
>
> [lee@server lee]$ nc www.miningsurplus.com 80
> GET /include/pdf_parts_query.inc HTTP/1.0 Host: www.miningsurplus.com
>
> [lee@server lee]$
>
> strange eh? but whats even wierder is that when I compile php without
> the
>
> --with-apxs \
>
> this generates a cgi executable, I can run the same script
>
> php pdf_parts_query.inc
>
> and all works great, no errors, just a prestean pdf file, like its
> supposed to....
>
> PS. the pdflib example on http://php.net/manual/ doesn't
> work either on
> DSO mode, only when compiled as a CGI...
>
> Chris Lee Mediawaveonline.com
>
>