DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 22nd May 2008
mtx's Avatar
mtx mtx is offline
Real Name: Valentin Bud
Fdisk Soldier
 
Join Date: May 2008
Location: RO/TM
Posts: 79
Default php cli and imagick extension

hello community.
I have installed today imagick extension from http://pecl.php.net/package/imagick/
following the procedure i have found in the INSTALL file from the package
Code:
# phpize && ./configure && make && make install
installation worked like a charm. The problem I have is with scripts run from cron which are written in php. http works just fine (even the imagick extension).
they output
Code:
Bad system call (core dumped)
here is the coredump
Code:
# gdb php /var/log/php.core
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 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-marcel-freebsd"...(no debugging symbols found)...
Core was generated by `php'.
Program terminated with signal 12, Bad system call.
Reading symbols from /lib/libcrypt.so.4...(no debugging symbols found)...done.
Loaded symbols for /lib/libcrypt.so.4
Reading symbols from /usr/local/lib/libpng.so.5...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libpng.so.5
Reading symbols from /lib/libz.so.4...(no debugging symbols found)...done.
Loaded symbols for /lib/libz.so.4
Reading symbols from /lib/libm.so.5...(no debugging symbols found)...done.
Loaded symbols for /lib/libm.so.5
Reading symbols from /usr/local/lib/libxml2.so.5...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libxml2.so.5
Reading symbols from /usr/local/lib/libiconv.so.3...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libiconv.so.3
Reading symbols from /lib/libc.so.7...(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.7
Reading symbols from /usr/local/lib/php/20060613/libpdf_php.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/php/20060613/libpdf_php.so
Reading symbols from /usr/local/lib/libm.so.4...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libm.so.4
Reading symbols from /usr/local/lib/php/20060613/session.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/php/20060613/session.so
Reading symbols from /usr/local/lib/php/20060613/mysql.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/php/20060613/mysql.so
Reading symbols from /usr/local/lib/mysql/libmysqlclient.so.15...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/mysql/libmysqlclient.so.15
Reading symbols from /usr/local/lib/php/20060613/mcrypt.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/php/20060613/mcrypt.so
Reading symbols from /usr/local/lib/libmcrypt.so.8...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libmcrypt.so.8
Reading symbols from /usr/local/lib/libltdl.so.4...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libltdl.so.4
Reading symbols from /usr/local/lib/php/20060613/openssl.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/php/20060613/openssl.so
Reading symbols from /usr/local/lib/libssl.so.5...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libssl.so.5
Reading symbols from /usr/local/lib/libcrypto.so.5...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libcrypto.so.5
Reading symbols from /lib/libthr.so.3...(no debugging symbols found)...done.
Loaded symbols for /lib/libthr.so.3
Reading symbols from /usr/local/lib/php/20060613/gettext.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/php/20060613/gettext.so
Reading symbols from /usr/local/lib/libintl.so.8...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libintl.so.8
Reading symbols from /usr/local/lib/php/20060613/imap.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/php/20060613/imap.so
Reading symbols from /usr/local/lib/libc-client4.so.9...done.
Loaded symbols for /usr/local/lib/libc-client4.so.9
Reading symbols from /usr/lib/libpam.so.4...done.
Loaded symbols for /usr/lib/libpam.so.4
Reading symbols from /usr/local/lib/php/20060613/pcre.so...done.
Loaded symbols for /usr/local/lib/php/20060613/pcre.so
Reading symbols from /usr/local/lib/php/20060613/simplexml.so...done.
Loaded symbols for /usr/local/lib/php/20060613/simplexml.so
Reading symbols from /usr/local/lib/php/20060613/spl.so...done.
Loaded symbols for /usr/local/lib/php/20060613/spl.so
Reading symbols from /usr/local/lib/php/20060613/mbstring.so...done.
Loaded symbols for /usr/local/lib/php/20060613/mbstring.so
Reading symbols from /usr/local/lib/php/20060613/mysqli.so...done.
Loaded symbols for /usr/local/lib/php/20060613/mysqli.so
Reading symbols from /usr/local/lib/php/20060613/imagick.so...done.
Loaded symbols for /usr/local/lib/php/20060613/imagick.so
Reading symbols from /usr/local/lib/libMagickWand.so.1...done.
Loaded symbols for /usr/local/lib/libMagickWand.so.1
Reading symbols from /usr/local/lib/libMagickCore.so.1...done.
Loaded symbols for /usr/local/lib/libMagickCore.so.1
Reading symbols from /usr/local/lib/libjbig.so.1...done.
Loaded symbols for /usr/local/lib/libjbig.so.1
Reading symbols from /usr/local/lib/liblcms.so.1...done.
Loaded symbols for /usr/local/lib/liblcms.so.1
Reading symbols from /usr/local/lib/libtiff.so.4...done.
Loaded symbols for /usr/local/lib/libtiff.so.4
Reading symbols from /usr/local/lib/libjasper.so.4...done.
Loaded symbols for /usr/local/lib/libjasper.so.4
Reading symbols from /usr/local/lib/libjpeg.so.9...done.
Loaded symbols for /usr/local/lib/libjpeg.so.9
Reading symbols from /usr/local/lib/libfontconfig.so.1...done.
Loaded symbols for /usr/local/lib/libfontconfig.so.1
Reading symbols from /usr/local/lib/libexpat.so.6...done.
Loaded symbols for /usr/local/lib/libexpat.so.6
Reading symbols from /usr/lib/libbz2.so.3...done.
Loaded symbols for /usr/lib/libbz2.so.3
Reading symbols from /usr/lib/libgomp.so.1...done.
Loaded symbols for /usr/lib/libgomp.so.1
Reading symbols from /usr/local/lib/libfreetype.so.9...done.
Loaded symbols for /usr/local/lib/libfreetype.so.9
Reading symbols from /libexec/ld-elf.so.1...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  0x28589f63 in ksem_init () from /lib/libc.so.7
[New Thread 0x28759300 (LWP 100257)]
Information about the system
Code:
# uname -a
FreeBSD seth 7.0-RELEASE FreeBSD 7.0-RELEASE #3: Thu Apr  3 14:20:12 EEST 2008     root@seth:/usr/obj/usr/src/sys/SETH  i386

# php -v
PHP 5.2.6 with Suhosin-Patch 0.9.6.2 (cli) (built: May 22 2008 12:31:58)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies

# pkg_info | grep ImageMagick
ImageMagick-nox11-6.4.1.3 Image processing tools
If i comment the
Code:
#extension=imagick.so
from /usr/local/etc/php/extensions.ini everything works like it should.
the version of imagick is 2.1.1
If i must provide any additional info i'll be glad to.

all the best,
v
__________________
Stop! think! ... the problem is somewhere between the monitor and chair...
"First they ignore you, then they laugh at you, then they fight you, then you win." Gandhi
links: spreadbsd syk

Last edited by mtx; 22nd May 2008 at 10:52 AM. Reason: typo
Reply With Quote
  #2   (View Single Post)  
Old 22nd May 2008
corey_james corey_james is offline
Uber Geek
 
Join Date: Apr 2008
Location: Brisbane, Australia
Posts: 238
Default

err . why are you running php scripts via cli ?

you'll need to show at least a 'where' or 'up' with gdb if you're trying to find out where the app crashed
Reply With Quote
  #3   (View Single Post)  
Old 22nd May 2008
mtx's Avatar
mtx mtx is offline
Real Name: Valentin Bud
Fdisk Soldier
 
Join Date: May 2008
Location: RO/TM
Posts: 79
Default

first time i work with gdb. how can i show a 'where' or 'up' with gdb? excuse my noobish question .
thanks

Quote:
err . why are you running php scripts via cli ?
the scripts are part of an app the company i work for develops.

all the best,
v
__________________
Stop! think! ... the problem is somewhere between the monitor and chair...
"First they ignore you, then they laugh at you, then they fight you, then you win." Gandhi
links: spreadbsd syk

Last edited by mtx; 22nd May 2008 at 12:13 PM.
Reply With Quote
  #4   (View Single Post)  
Old 22nd May 2008
mtx's Avatar
mtx mtx is offline
Real Name: Valentin Bud
Fdisk Soldier
 
Join Date: May 2008
Location: RO/TM
Posts: 79
Default

i suppose you meant
Code:
(gdb) bt
with imagick extension loaded
Code:
# cat x.php
<?php
phpinfo();
?>
# php x.php
Bad system call (core dumped)
# gdb php php.core
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 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-marcel-freebsd"...(no debugging symbols found)...
Core was generated by `php'.
Program terminated with signal 12, Bad system call.
Reading symbols from /lib/libcrypt.so.4...(no debugging symbols found)...done.
Loaded symbols for /lib/libcrypt.so.4
Reading symbols from /usr/local/lib/libpng.so.5...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libpng.so.5
Reading symbols from /lib/libz.so.4...(no debugging symbols found)...done.
Loaded symbols for /lib/libz.so.4
Reading symbols from /lib/libm.so.5...(no debugging symbols found)...done.
Loaded symbols for /lib/libm.so.5
Reading symbols from /usr/local/lib/libxml2.so.5...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libxml2.so.5
Reading symbols from /usr/local/lib/libiconv.so.3...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libiconv.so.3
Reading symbols from /lib/libc.so.7...(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.7
Reading symbols from /usr/local/lib/php/20060613/libpdf_php.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/php/20060613/libpdf_php.so
Reading symbols from /usr/local/lib/libm.so.4...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libm.so.4
Reading symbols from /usr/local/lib/php/20060613/session.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/php/20060613/session.so
Reading symbols from /usr/local/lib/php/20060613/mysql.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/php/20060613/mysql.so
Reading symbols from /usr/local/lib/mysql/libmysqlclient.so.15...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/mysql/libmysqlclient.so.15
Reading symbols from /usr/local/lib/php/20060613/mcrypt.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/php/20060613/mcrypt.so
Reading symbols from /usr/local/lib/libmcrypt.so.8...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libmcrypt.so.8
Reading symbols from /usr/local/lib/libltdl.so.4...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libltdl.so.4
Reading symbols from /usr/local/lib/php/20060613/openssl.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/php/20060613/openssl.so
Reading symbols from /usr/local/lib/libssl.so.5...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libssl.so.5
Reading symbols from /usr/local/lib/libcrypto.so.5...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libcrypto.so.5
Reading symbols from /lib/libthr.so.3...(no debugging symbols found)...done.
Loaded symbols for /lib/libthr.so.3
Reading symbols from /usr/local/lib/php/20060613/gettext.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/php/20060613/gettext.so
Reading symbols from /usr/local/lib/libintl.so.8...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libintl.so.8
Reading symbols from /usr/local/lib/php/20060613/imap.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/php/20060613/imap.so
Reading symbols from /usr/local/lib/libc-client4.so.9...done.
Loaded symbols for /usr/local/lib/libc-client4.so.9
Reading symbols from /usr/lib/libpam.so.4...done.
Loaded symbols for /usr/lib/libpam.so.4
Reading symbols from /usr/local/lib/php/20060613/pcre.so...done.
Loaded symbols for /usr/local/lib/php/20060613/pcre.so
Reading symbols from /usr/local/lib/php/20060613/simplexml.so...done.
Loaded symbols for /usr/local/lib/php/20060613/simplexml.so
Reading symbols from /usr/local/lib/php/20060613/spl.so...done.
Loaded symbols for /usr/local/lib/php/20060613/spl.so
Reading symbols from /usr/local/lib/php/20060613/mbstring.so...done.
Loaded symbols for /usr/local/lib/php/20060613/mbstring.so
Reading symbols from /usr/local/lib/php/20060613/mysqli.so...done.
Loaded symbols for /usr/local/lib/php/20060613/mysqli.so
Reading symbols from /usr/local/lib/php/20060613/imagick.so...done.
Loaded symbols for /usr/local/lib/php/20060613/imagick.so
Reading symbols from /usr/local/lib/libMagickWand.so.1...done.
Loaded symbols for /usr/local/lib/libMagickWand.so.1
Reading symbols from /usr/local/lib/libMagickCore.so.1...done.
Loaded symbols for /usr/local/lib/libMagickCore.so.1
Reading symbols from /usr/local/lib/libjbig.so.1...done.
Loaded symbols for /usr/local/lib/libjbig.so.1
Reading symbols from /usr/local/lib/liblcms.so.1...done.
Loaded symbols for /usr/local/lib/liblcms.so.1
Reading symbols from /usr/local/lib/libtiff.so.4...done.
Loaded symbols for /usr/local/lib/libtiff.so.4
Reading symbols from /usr/local/lib/libjasper.so.4...done.
Loaded symbols for /usr/local/lib/libjasper.so.4
Reading symbols from /usr/local/lib/libjpeg.so.9...done.
Loaded symbols for /usr/local/lib/libjpeg.so.9
Reading symbols from /usr/local/lib/libfontconfig.so.1...done.
Loaded symbols for /usr/local/lib/libfontconfig.so.1
Reading symbols from /usr/local/lib/libexpat.so.6...done.
Loaded symbols for /usr/local/lib/libexpat.so.6
Reading symbols from /usr/lib/libbz2.so.3...done.
Loaded symbols for /usr/lib/libbz2.so.3
Reading symbols from /usr/lib/libgomp.so.1...done.
Loaded symbols for /usr/lib/libgomp.so.1
Reading symbols from /usr/local/lib/libfreetype.so.9...done.
Loaded symbols for /usr/local/lib/libfreetype.so.9
Reading symbols from /libexec/ld-elf.so.1...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  0x2858cf63 in ksem_init () from /lib/libc.so.7
[New Thread 0x28759300 (LWP 100289)]
(gdb) bt
#0  0x2858cf63 in ksem_init () from /lib/libc.so.7
#1  0x28582f23 in sem_init () from /lib/libc.so.7
#2  0x295100d4 in GOMP_ordered_start () from /usr/lib/libgomp.so.1
#3  0x29510b51 in omp_get_nested () from /usr/lib/libgomp.so.1
#4  0x2950dbc1 in ?? () from /usr/lib/libgomp.so.1
#5  0x00000003 in ?? ()
#6  0x282ca134 in ?? () from /libexec/ld-elf.so.1
#7  0xbfbfe9c8 in ?? ()
#8  0x282aa0b7 in dlsym () from /libexec/ld-elf.so.1
#9  0x282aa9cb in dlopen () from /libexec/ld-elf.so.1
#10 0x080ede4b in php_dl ()
#11 0x0814fcd1 in php_load_function_extension_cb ()
#12 0x08180201 in zend_llist_apply ()
#13 0x0814fc8f in php_ini_register_extensions ()
#14 0x0814a66d in php_module_startup ()
#15 0x081fe04f in php_cli_startup ()
#16 0x081fe752 in main ()
if i misunderstood please excuse me and give me a hint where to read about gdb.
thank you

all the best,
v
__________________
Stop! think! ... the problem is somewhere between the monitor and chair...
"First they ignore you, then they laugh at you, then they fight you, then you win." Gandhi
links: spreadbsd syk
Reply With Quote
  #5   (View Single Post)  
Old 22nd May 2008
ephemera's Avatar
ephemera ephemera is offline
Knuth's homeboy
 
Join Date: Apr 2008
Posts: 537
Default

Quote:
Originally Posted by mtx
Program terminated with signal 12, Bad system call.
...
(gdb) bt
#0 0x2858cf63 in ksem_init () from /lib/libc.so.7
#1 0x28582f23 in sem_init () from /lib/libc.so.7
i think on fbsd you will need to load the 'sem' kernel module for POSIX semaphores.

try putting this into /boot/loader.conf:

sem_load="YES"
Reply With Quote
  #6   (View Single Post)  
Old 22nd May 2008
mtx's Avatar
mtx mtx is offline
Real Name: Valentin Bud
Fdisk Soldier
 
Join Date: May 2008
Location: RO/TM
Posts: 79
Default

thank you ephemera. that did the trick.

/v
__________________
Stop! think! ... the problem is somewhere between the monitor and chair...
"First they ignore you, then they laugh at you, then they fight you, then you win." Gandhi
links: spreadbsd syk
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
USB extension cable: bad? IdOp General Hardware 3 24th January 2009 08:41 PM


All times are GMT. The time now is 01:03 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick