Date: 10/15/00
- Next message: Jani Taskinen: "RE: [PHP-DEV] Re: [PHP-QA] PHP 4.0.3pl1"
- Previous message: brianj <email protected>: "[PHP-DEV] PHP 4.0 Bug #7225: MySQL Related"
- In reply to: Rasmus Lerdorf: "RE: [PHP-DEV] Re: [PHP-QA] PHP 4.0.3pl1"
- Next in thread: Jani Taskinen: "RE: [PHP-DEV] Re: [PHP-QA] PHP 4.0.3pl1"
- Reply: Jani Taskinen: "RE: [PHP-DEV] Re: [PHP-QA] PHP 4.0.3pl1"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> I have tested 4.0.3 against pdflib-3.0.1 (installed from the source
> tarball) on RH7.0 and it worked fine. Can you compile in debug mode and
> see if you can get a core backtrace so we have some idea of what might be
> causing this?
Sure.
Please show some mercy if it winds up being my fault. :)
Stock rhl7.0, glibc-2.1.94.
Pdflib-3.0.1 from source, ./configure --enable-shared-pdflib,
tiff-v3.5.5 from source
jpeg-6b from source
/etc/ldconfig -v shows libpdf.so.0 -> libpdf.so.0.0.1 in /usr/local/lib
I recompiled php4.0.3pl1, turning on the debug stuff:
./configure --enable-debug --disable-inline --with-apxs=/usr/sbin/apxs --wit
h-zlib \
--with-mysql --with-pgsql --with-t1lib --with-jpeg-dir=/usr/local \
--with-tiff-dir=/usr/local --with-gd=/usr/local \
--with-mcrypt=/usr/local --enable-ftp --enable-wddx --enable-sockets --enabl
e-sysvshm \
--enable-bcmath --with-pspell=/usr/local --with-pdflib=/usr/local
configure shows:
checking whether to include Pdflib 3.x support... /usr/local
yes
checking for libz needed by pdflib 3.x... already zlib support
checking for jpeg_read_header in -ljpeg... (cached) yes
checking for png_create_info_struct in -lpng... yes
checking for TIFFOpen in -ltiff... yes
checking for PDF_show_boxed in -lpdf... yes
phpinfo() shows:
PDF Support enabled
PDFLib Version 3.01
CJK Font Support yes
In-memory PDF Creation Support yes
A chunk of php:
$fp = fopen("test.pdf", "w"); // file exists in same dir and is chmod 777
$pdf = pdf_open($fp);
pdf_set_info_author($pdf, "Uwe Steinmann");
pdf_set_info_title($pdf, "Test PHP - pdflib stuff");
pdf_set_info_creator($pdf, "See Author");
pdf_set_info_subject($pdf, "Testing");
pdf_begin_page($pdf, 595, 842);
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=\"test.pdf\">test pdf</A>";
Accessing this script in a browser produces nothing of course.
It will generate this in the httpd error_log:
[Sun Oct 15 16:13:59 2000] [notice] child pid 8856 exit signal Segmentation
fault (11)
[Sun Oct 15 16:13:59 2000] [notice] child pid 8853 exit signal Segmentation
fault (11)
It generates 2 lines of this every time I access the script.
Backtrace: (I could not generate a core file)
gdb /usr/sbin/httpd
GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...(no debugging symbols
found)...
(gdb) run -X
Starting program: /usr/sbin/httpd -X
(I access the script...)
Program received signal SIGSEGV, Segmentation fault.
0x401928ff in _IO_fwrite (buf=0x8130e3c, size=1, count=266, fp=0x0) at
iofwrite.c:40
40 iofwrite.c: No such file or directory.
(gdb) bt
#0 0x401928ff in _IO_fwrite (buf=0x8130e3c, size=1, count=266, fp=0x0) at
iofwrite.c:40
#1 0x403057b0 in pdf_writeproc_file (p=0x81248c4, data=0x8130e3c, size=266)
at p_basic.c:374
#2 0x40311dfd in pdf_flush_stream (p=0x81248c4) at p_stream.c:119
#3 0x40306a8a in PDF_end_page (p=0x81248c4) at p_basic.c:1106
#4 0x4030622e in PDF_close (p=0x81248c4) at p_basic.c:843
#5 0x40549fd2 in _free_pdf_doc (pdf=0x81248c4) at pdf.c:187
#6 0x404ecf43 in list_entry_destructor (ptr=0x81097fc) at zend_list.c:253
#7 0x404eaf0d in zend_hash_del_key_or_index (ht=0x4067692c, arKey=0x0,
nKeyLength=0, h=3, flag=1)
at zend_hash.c:535
#8 0x404ed46c in zend_list_do_delete (list=0x4067692c, id=3) at
zend_list.c:59
#9 0x404ecbc7 in zend_list_delete (id=3) at zend_list.c:118
#10 0x4054b51b in php_if_pdf_close (ht=1, return_value=0x810983c,
this_ptr=0x0, return_value_used=0) at pdf.c:503
#11 0x404d5878 in execute (op_array=0x810419c) at ./zend_execute.c:1519
#12 0x404e6ac1 in zend_execute_scripts (type=8, file_count=3) at zend.c:717
#13 0x404fb5d0 in php_execute_script (primary_file=0xbffff8c0) at
main.c:1200
#14 0x404f6e40 in apache_php_module_main (r=0x80ff80c,
display_source_mode=0) at sapi_apache.c:89
#15 0x404f7b00 in send_php (r=0x80ff80c, display_source_mode=0,
filename=0x81012e4 "/var/www/html/pdf2.php")
at mod_php4.c:510
#16 0x404f7b42 in send_parsed_php (r=0x80ff80c) at mod_php4.c:521
#17 0x805370b in ap_invoke_handler ()
#18 0x80633b2 in ap_some_auth_required ()
#19 0x806341f in ap_process_request ()
#20 0x805ca27 in ap_child_terminate ()
#21 0x805cbaf in ap_child_terminate ()
#22 0x805ccc4 in ap_child_terminate ()
#23 0x805d1ef in ap_child_terminate ()
#24 0x805d928 in main ()
#25 0x40141a2c in __libc_start_main (main=0x805d5f0 <main>, argc=2,
ubp_av=0xbffffb74, init=0x804f084 <_init>,
fini=0x807e45c <_fini>, rtld_fini=0x4000d3c8 <_dl_fini>,
stack_end=0xbffffb6c)
at ../sysdeps/generic/libc-start.c:111
All other functions seem to work fine, including mysql/pgsql, a full
runthrough of gd/ttf/jpg/gif/png stuff, some basic bcmath and mcrypt stuff,
everything seems fine.
If there's anything else I can do lmk.
If its my own idiocy, lmk off list. :)
Regards
.mike
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Jani Taskinen: "RE: [PHP-DEV] Re: [PHP-QA] PHP 4.0.3pl1"
- Previous message: brianj <email protected>: "[PHP-DEV] PHP 4.0 Bug #7225: MySQL Related"
- In reply to: Rasmus Lerdorf: "RE: [PHP-DEV] Re: [PHP-QA] PHP 4.0.3pl1"
- Next in thread: Jani Taskinen: "RE: [PHP-DEV] Re: [PHP-QA] PHP 4.0.3pl1"
- Reply: Jani Taskinen: "RE: [PHP-DEV] Re: [PHP-QA] PHP 4.0.3pl1"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

