Василий М.
Новичок
Хостер отрапортовал, что установлены 5.4 и 5.5
если переписывать код, то лучше на какую версию? в чем разница между ними?
если переписывать код, то лучше на какую версию? в чем разница между ними?
Я год назад писал ядро новой версии, под 5.4, с error_reporting(E_ALL). Eстественно без всяких там E_DEPRICATED и E_NOTICE, на 5.5 перешло само собой, без каких либо доработок, с 5.5 на 5.6 вылетел только E_NOTICE на функцию crypt (теперь соль обязательная) и юзать нужно hash_equal, ну и в принципе все. Главное E_ALL и миграции с 5.5 на 5.6 пройдет без проблему меня при обновлении с 55 до 5.6 сегфолт, с этими нашими фреймворками сложновато пока воспроизвести минимальным кодом, но сделаю
Ну методом исключения кода можно найти часть, где валится. Кстати, тесты после сборки проходили норм?Активист, так он же сказал, что STC пока нет. А боевой движок выкладывать никакого смысла - никто в нём копаться не будет.
методом исключения кода можно найти часть, где валится
(gdb) bt
#0 0x0844e25d in _zval_dtor_func
Кстати, тесты после сборки проходили норм?
=====================================================================
TEST RESULT SUMMARY
---------------------------------------------------------------------
Exts skipped : 41
Exts tested : 39
---------------------------------------------------------------------
Number of tests : 13575 10100
Tests skipped : 3475 ( 25.6%) --------
Tests warned : 3 ( 0.0%) ( 0.0%)
Tests failed : 38 ( 0.3%) ( 0.4%)
Expected fail : 43 ( 0.3%) ( 0.4%)
Tests passed : 10016 ( 73.8%) ( 99.2%)
---------------------------------------------------------------------
FAILED TEST SUMMARY
---------------------------------------------------------------------
Test getdate() function : usage variation - Passing high positive and negative float values to timestamp. [ext/date/tests/getdate_variation7.phpt]
Test localtime() function : usage variation - Passing higher positive and negetive float values to timestamp. [ext/date/tests/localtime_variation3.phpt]
Testing reading and writing to DOMNode::textContent [ext/dom/tests/node_textcontent.phpt]
mysql_connect() [ext/mysql/tests/mysql_connect.phpt]
mysql_errno() [ext/mysql/tests/mysql_errno.phpt]
mysql_error() [ext/mysql/tests/mysql_error.phpt]
mysql_pconnect() [ext/mysql/tests/mysql_pconnect.phpt]
Server bitwise stream crypto flag assignment [ext/openssl/tests/stream_crypto_flags_003.phpt]
MySQL PDO->__construct() - Generic + DSN [ext/pdo_mysql/tests/pdo_mysql___construct.phpt]
MySQL PDO->exec(), affected rows [ext/pdo_mysql/tests/pdo_mysql_exec.phpt]
Test session_cache_expire() function : basic functionality [ext/session/tests/session_cache_expire_basic.phpt]
Test session_cache_expire() function : error functionality [ext/session/tests/session_cache_expire_error.phpt]
Test session_cache_expire() function : variation [ext/session/tests/session_cache_expire_variation3.phpt]
Test session_cache_limiter() function : basic functionality [ext/session/tests/session_cache_limiter_basic.phpt]
Test session_cache_limiter() function : error functionality [ext/session/tests/session_cache_limiter_error.phpt]
Test session_cache_limiter() function : variation [ext/session/tests/session_cache_limiter_variation3.phpt]
Testing xpath() with invalid XML [ext/simplexml/tests/SimpleXMLElement_xpath.phpt]
SQLite3:pen error test [ext/sqlite3/tests/sqlite3_15_open_error.phpt]
Test function proc_nice() by substituting argument 1 with int values. [ext/standard/tests/general_functions/proc_nice_variation5.phpt]
Bug #64146 (serialize incorrectly saving objects when they are cloned) [ext/standard/tests/serialize/bug64146.phpt]
Bug #32001 (xml_parse*() goes into infinite loop when autodetection in effect), using UTF-* [ext/xml/tests/bug32001.phpt]
FPM: Startup and connect [sapi/fpm/tests/002.phpt]
FPM: Test IPv6 support [sapi/fpm/tests/003.phpt]
FPM: Test IPv4/IPv6 support [sapi/fpm/tests/004.phpt]
FPM: Test IPv4 allowed clients [sapi/fpm/tests/005.phpt]
FPM: Test IPv6 allowed clients (bug #68428) [sapi/fpm/tests/006.phpt]
FPM: Test IPv6 all addresses and access_log (bug #68421) [sapi/fpm/tests/007.phpt]
FPM: Test multi pool (dynamic + ondemand + static) (bug #68423) [sapi/fpm/tests/008.phpt]
FPM: Test Unix Domain Socket [sapi/fpm/tests/009.phpt]
FPM: Test status page [sapi/fpm/tests/010.phpt]
FPM: Test IPv4 all addresses (bug #68420) [sapi/fpm/tests/011.phpt]
FPM: Test reload configuration (bug #68442) [sapi/fpm/tests/012.phpt]
FPM: Test for log_level in fpm_unix_init_main #68381 [sapi/fpm/tests/013.phpt]
FPM: Test for pm.start_servers default calculation message being a notice and not a warning #68458 [sapi/fpm/tests/014.phpt]
FPM: Test splited configuration and load order #68391 [sapi/fpm/tests/016.phpt]
FPM: Test fastcgi_finish_request function [sapi/fpm/tests/017.phpt]
FPM: Test global prefix [sapi/fpm/tests/019.phpt]
FPM: Test pool prefix [sapi/fpm/tests/020.phpt]
=====================================================================
=====================================================================
WARNED TEST SUMMARY
---------------------------------------------------------------------
zend multibyte (2) [ext/mbstring/tests/zend_multibyte-02.phpt] (warn: XFAIL section but test passes)
zend multibyte (6) [ext/mbstring/tests/zend_multibyte-06.phpt] (warn: XFAIL section but test passes)
MySQL PDO->prepare(), emulated PS [ext/pdo_mysql/tests/pdo_mysql_prepare_emulated.phpt] (warn: XFAIL section but test passes)
Херасе фейлов, дохера. У меня только locale (gettext) фейлится, ибо не делал поддержку локали "fr_FR".Данное расширение устарело, начиная с версии PHP 5.5.0, и будет удалено в будущем
=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
#66265: gettext doesn't switch locales within the same script [ext/gettext/tests/bug66267.phpt]
=====================================================================
=====================================================================
WARNED TEST SUMMARY
---------------------------------------------------------------------
zend multibyte (8) [ext/mbstring/tests/zend_multibyte-08.phpt] (warn: XFAIL section but test passes)
zend multibyte (10) [ext/mbstring/tests/zend_multibyte-10.phpt] (warn: XFAIL section but test passes)
zend multibyte (11) [ext/mbstring/tests/zend_multibyte-11.phpt] (warn: XFAIL section but test passes)
=====================================================================
#!/bin/sh
read -p "Please, enter version of PHP 5.6 to build (etc 5.6.0):" VER
CFG="/opt/php-$VER/etc"
PREFIX="/opt/php-$VER"
SRC="/opt/src/php-$VER"
TARGZ="php-$VER.tar.gz"
# DOENLOADING
read -p "Download source for version $VER ? (y/n)?" REPLY
if [ $REPLY = "y" ]; then
wget "http://ru2.php.net/get/$TARGZ/from/this/mirror" --content-disposition
if [ ! -f $TARGZ ]; then
echo "File $TARGZ not found (not downloaded)";
exit 1;
fi;
tar -xzf $TARGZ
rm $TARGZ
fi;
if [ ! -d $SRC ]; then
echo "Src directory $SRC not exists";
exit 1;
fi;
cd $SRC;
#
# Configuring
#
read -p "Make clean ? (y/n)?" REPLY
if [ $REPLY = "y" ]; then
make clean
fi;
read -p "Configure (y/n)?" REPLY
if [ $REPLY = "y" ]; then
apt-get build-dep php5
./configure --prefix="$PREFIX"\
--enable-cgi \
--enable-static \
\
--enable-mbstring \
--enable-soap \
--enable-zip \
--enable-calendar\
--enable-sockets\
\
--with-zlib\
--with-openssl=shared\
--with-curl=shared \
--with-gettext=shared \
\
--with-gd=shared \
--enable-gd-native-ttf \
--with-freetype-dir=/usr \
\
--with-mcrypt \
--with-mysqli \
--with-pdo-mysql \
\
--with-jpeg-dir=/usr \
--with-png-dir=/usr \
--with-config-file-path="$CFG" \
--with-config-file-scan-dir="$CFG/conf.d"
# --with-pgsql \
fi
read -p "Make ? (y/n)?" REPLY
if [ $REPLY = "y" ]; then
make -j 12
fi;
read -p "Make test ? (y/n)?" REPLY
if [ $REPLY = "y" ]; then
make test -j 12
fi;
#
# Install ?
#
read -p "Install ? (y/n)?" REPLY
if [ $REPLY = "y" ]; then
make install
fi;
#
# Set config ini files?
#
read -p "Save ini files? (y/n)?" REPLY
if [ $REPLY = "y" ]; then
if [ ! -d "$CFG" ];
then
mkdir -p "$CFG";
fi
if [ ! -d "$CFG/conf.d" ];
then
mkdir -p "$CFG/conf.d";
fi;
# extension
echo "extension=openssl.so;" > $CFG/conf.d/openssl.ini
echo "extension=curl.so;" > $CFG/conf.d/curl.ini
echo "extension=gd.so;" > $CFG/conf.d/gd.ini
echo "extension=gettext.so;" > $CFG/conf.d/gettext.ini
# opcache
echo "zend_extension=opcache.so;" > $CFG/conf.d/opcache.ini
echo "opcache.memory_consumption=128;" >> $CFG/conf.d/opcache.ini
echo "opcache.interned_strings_buffer=8;" >> $CFG/conf.d/opcache.ini
echo "opcache.max_accelerated_files=4000;" >> $CFG/conf.d/opcache.ini
echo "opcache.revalidate_freq=60;" >> $CFG/conf.d/opcache.ini
echo "opcache.fast_shutdown=1;" >> $CFG/conf.d/opcache.ini
echo "opcache.enable_cli=1;" >> $CFG/conf.d/opcache.ini
# defaults
echo "date.timezone=\"Europe/Moscow\";" > $CFG/conf.d/defaults.ini
# limits
echo "post_max_size=512m;" > $CFG/conf.d/limits.ini
echo "memory_limit=128m;" >> $CFG/conf.d/limits.ini
echo "upload_max_filesize=512m;" >> $CFG/conf.d/limits.ini
fi;
#
# Pecl imagemagic
#
read -p "Pecl install imagick (y/n)?" REPLY
if [ $REPLY = "y" ]; then
apt-get build-dep php5-imagick --install-recommends
cd $PREFIX/bin/
./pecl install imagick
echo "extension=imagick.so;" > $CFG/conf.d/imagick.ini
fi;
#
# Set as default PHP-5.6 OPT CGI ?
#
read -p "Set as default version for php-5.6 opt?" REPLY
if [ $REPLY = "y" ]; then
echo "#!/opt/php-$VER/bin/php-cgi" > /opt/php-cgi-5.6
chmod 755 /opt/php-cgi-5.6
fi;
#
# Restart service ?
#
read -p "Restart apache2?" REPLY
if [ $REPLY = "y" ]; then
service apache2 restart
fi;