Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 03 Sep 2012 21:19:31 +0400
From:      Solmin Vladimir <vs@celicom.ru>
To:        Darrell Betts <betts@norden1.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Error after upgrading to php 5.4.6
Message-ID:  <5044E6A3.2010703@celicom.ru>
In-Reply-To: <F937A155-7B1D-4421-8BA8-6BD4659D09C0@norden1.com>
References:  <F937A155-7B1D-4421-8BA8-6BD4659D09C0@norden1.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi! After any upgrade of php i'm use one script that was founded on 
freebsd.org
$ cd /usr/local/etc/php
$ cat fixphpextorder.sh
#!/bin/sh

# =============================================================
# Fix php/extensions.ini order
#
# Script based on the idea and information(s) of
# - http://www.pingle.org/2007/09/22/php-crashes-extensions-workaround
# - http://nerdstock.org/php_extensions
#
# Please copy your original php/extensions.ini to a save place before
# running this script!
#
# There is no guaranty the script is working for you or don't damage
# your system. Use at own Risk!
#
# 2011-04-03 olli hauer
#
# License: BSD
# http://www.freebsd.org/copyright/freebsd-license.html
#
#
# Updates:
# 2011-12-26:
# Make sed expression more explicit.
# Reported by Kartsten Schmidt
#

INI=/usr/local/etc/php/extensions.ini

EXT="session.so fileinfo.so crack.so ssh2.so imagick.so ldap.so
simplexml.so dba.so ctype.so apc.so ftp.so mbstring.so tokenizer.so
filter.so pgsql.so gmp.so mcrypt.so tidy.so xmlwriter.so mhash.so gd.so
ncurses.so readline.so gettext.so iconv.so dbase.so calendar.so exif.so
zlib.so curl.so mailparse.so xmlrpc.so bz2.so sysvmsg.so pdf.so openssl.so
ming.so dom.so hash.so xmlreader.so gnupg.so bcmath.so pcre.so xsl.so
wddx.so memcache.so soap.so spl.so sqlite.so recode.so pdo.so pdo_mysql.so
pdo_sqlite.so mysqli.so mysql.so imap.so sockets.so pspell.so xml.so"


if [ ! -e ${INI} ] ; then
echo "cannot find ${INI}"
exit 1
fi

# cleanup previous run
[ -e ${INI}.new ] && rm -f ${INI}.new
cp -f ${INI} ${INI}.work

for e in ${EXT}; do
if egrep -q "^extension=${e}" ${INI}.work ; then
echo extension=${e} >> ${INI}.new
sed -i '' -e "/^extension=${e}/d" ${INI}.work
fi
done

if [ -s ${INI}.work ]; then
echo "; additional extension(s) not known by $(basename $0)" >> ${INI}.new
# sybase_ct needs to be loaded last.
grep ^extension ${INI}.work | grep -v sybase_ct.so >> ${INI}.new
grep ^extension=sybase_ct.so ${INI}.work >> ${INI}.new
AE=1
fi
[ -e ${INI}.work ] && rm -f ${INI}.work
if cmp -s ${INI} ${INI}.new ; then
echo "No changes found, remove ${INI}.new"
rm -f ${INI}.new
AE=0
fi

if [ ${AE} -ne 0 ]; then
cat << _EOF
==============================
New INI is saved as ${INI}.new

Additional extension(s) not known by $(basename $0)
are added to the end of new INI file.

Please review the new INI, and replace it on your own!
Do some Basic tests:
php -V
php -m
php -i
apachectl graceful
...

_EOF
fi

cat << _EOF
If the segfault issue is not gone, or you cannot find the issue
- ask on the ports@ mailing list
or
- open a PR:
Synopsys: lang/php5 Segmentation fault.
Additional try debugging with command:
gdb php ./php.core

http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/debugging.html


_EOF

Best regards,
Vladimir
Unix Sysadmin

  

03.09.2012 15:26, Darrell Betts пишет:
> My php pages will no longer render in a web browser after upgrading to php 5.4.6. Used port upgrade to do this. Running apache 2.2.22_6.
> Checked the error log and this is what I receive
>
> [notice] child pid 38232 exit signal Segmentation fault (11)
>
> This does this on all php pages.
> Any idea how to fix this error?
>
>
> Thanks_______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5044E6A3.2010703>