-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[3.2.0] Not compatible with PHP 5 #12909
Comments
Notice: it fails on startup when PHP is built with some special option, but it will segfault on runtime with default PHP build options. |
Issue could be in zephir (latest tagged version 0.9.8 used) |
$ pwd
/home/vagrant/workspace/cphalcon/build $ grep -r zend_error_noreturn . | grep -v "^Binary file" | awk -F':' '{print $1}'
./php5/32bits/phalcon.zep.c
./php5/32bits/phalcon.zep.c
./php5/32bits/phalcon.zep.c
./php5/32bits/phalcon.zep.c
./php5/32bits/phalcon.zep.c
./php5/32bits/phalcon.zep.c
./php5/32bits/phalcon.zep.c
./php5/64bits/phalcon.zep.c
./php5/64bits/phalcon.zep.c
./php5/64bits/phalcon.zep.c
./php5/64bits/phalcon.zep.c
./php5/64bits/phalcon.zep.c
./php5/64bits/phalcon.zep.c
./php5/64bits/phalcon.zep.c
./php5/safe/phalcon.zep.c
./php5/safe/phalcon.zep.c
./php5/safe/phalcon.zep.c
./php5/safe/phalcon.zep.c
./php5/safe/phalcon.zep.c
./php5/safe/phalcon.zep.c
./php5/safe/phalcon.zep.c $ php -v
PHP 5.5.38 (cli) (built: May 9 2017 15:49:23) (DEBUG)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies $ sudo ./install --phpize $(phpenv which phpize) --php-config $(phpenv which php-config)
...
Build complete.
Don't forget to run 'make test'.
Installing shared extensions: /home/vagrant/.phpenv/versions/5.5.38-nts-debug/lib/php/extensions/debug-non-zts-20121212/
Installing header files: /home/vagrant/.phpenv/versions/5.5.38-nts-debug/include/php/
Thanks for compiling Phalcon!
Build succeed: Please restart your web server to complete the installation $ php --ri phalcon
phalcon
Web framework delivered as a C-extension for PHP
phalcon => enabled
Author => Phalcon Team and contributors
Version => 3.2.0
Build Date => Jun 19 2017 17:52:17
Powered by Zephir => Version 0.9.8-6335775f25
Directive => Local Value => Master Value
phalcon.db.escape_identifiers => On => On
phalcon.db.force_casting => Off => Off
phalcon.orm.events => On => On
phalcon.orm.virtual_foreign_keys => On => On
phalcon.orm.column_renaming => On => On
phalcon.orm.not_null_validations => On => On
phalcon.orm.exception_on_failed_save => Off => Off
phalcon.orm.enable_literals => On => On
phalcon.orm.late_state_binding => Off => Off
phalcon.orm.enable_implicit_joins => On => On
phalcon.orm.cast_on_hydrate => Off => Off
phalcon.orm.ignore_unknown_columns => Off => Off
phalcon.orm.update_snapshot_on_save => On => On
phalcon.orm.disable_assign_setters => Off => Off $ php -r "echo Phalcon\Version::get() . PHP_EOL;"
3.2.0 $ php-config --configure-options | sed -e "s/ --/\n--/g"
--with-config-file-path=/home/vagrant/.phpenv/versions/5.5.38-nts-debug/etc
--with-config-file-scan-dir=/home/vagrant/.phpenv/versions/5.5.38-nts-debug/etc/conf.d
--prefix=/home/vagrant/.phpenv/versions/5.5.38-nts-debug
--libexecdir=/home/vagrant/.phpenv/versions/5.5.38-nts-debug/libexec
--without-pear
--with-gd
--enable-sockets
--with-jpeg-dir=/usr
--with-png-dir=/usr
--enable-exif
--enable-zip
--with-zlib
--with-zlib-dir=/usr
--with-bz2
--with-kerberos
--with-openssl
--with-mcrypt=/usr
--enable-soap
--enable-xmlreader
--with-xsl
--enable-ftp
--enable-cgi
--with-curl=/usr
--with-tidy
--with-xmlrpc
--enable-sysvsem
--enable-sysvshm
--enable-shmop
--with-pdo-mysql=mysqlnd
--with-pdo-sqlite
--enable-pcntl
--with-readline
--enable-mbstring
--disable-debug
--enable-fpm
--enable-bcmath
--enable-phpdbg
--with-mysql=mysqlnd
--enable-debug
--disable-fpm
--with-libdir=lib64 Also as you can see the tests on Travis (PHP5/PHP7) pass successfully.
Which one? Could you elaborate on that? I need steps to reproduce. Cc: @phalcon/collaborators Does anyone faced with this? |
Some Linux distributions use RTLD_NOW (all symbols resolved at startup) instead of RTLD_LAZY (resolved at runtime) for security enhancement reason. |
Ex, patch for 5.6 used in Fedora (also in RHEL, CentOS, ...) Debian patch Also -z relro -z now linker flags used. See https://fedoraproject.org/wiki/Changes/Harden_All_Packages |
@remicollet Well, anyway I need to reproduce this to be able debug. So I'll try to sort out.
Could you please explain this a bit more? What you mean "in 7+ only"? https://github.com/php/php-src/blob/PHP-5.5/Zend/zend.h#L294 |
There is no ZEND_API, so not public, not usable (may me different according of compiler default visibility) |
|
Use distro packages ;) |
BTW, the fix is trivial |
So can I not rush with patch for 3.2.0 and do it in 3.2.1? |
Your project, your priority, your choice. BTW, I was able to build 3.2.0 for 5.5, 5.6, 7.0 and 7.1 (haven't try 7.2 yet), other users could encounter the same issue, or segfault at runtime, which is IMHO worse... Perhaps everybody have switched to 7+, and you can wait for other reports |
Sure. But actually, it was important for me to hear exactly your opinion, because you maintain package repos for RPM based distros. Is this prevent you to release Phalcon 3.2.0 for PHP 5.x or not? |
No, as I patch sources to drop zend_error_noreturn usage Notice: zend_error_noreturn does exactly the same than zend_error, only exists to avoid compiler warnings
|
Test build: version 3.2.0 using zephir 0.9.9 => OK. |
Great, soe we should release 3.2.1 right now imho. |
Hi, For MacOS 10.12.5 seems to be working:
For FreeBSD 10.3 also seems to be working:
I had that problem when I compiled it for my raspberry pi with debian, but I'm not at home atm to give you more information. |
Linux Debian raspberry not working:
|
Redhat linux 6.2, php 5.6.28, custom build:
|
You sure you used zephir to compile? |
@remicollet Fixed in |
Using 5.6.30
PHP Warning: PHP Startup: Unable to load dynamic library '/builddir/build/BUILDROOT/php-phalcon3-3.2.0-1.fc24.remi.5.6.x86_64/usr/lib64/php/modules/phalcon.so' - /builddir/build/BUILDROOT/php-phalcon3-3.2.0-1.fc24.remi.5.6.x86_64/usr/lib64/php/modules/phalcon.so: undefined symbol: zend_error_noreturn in Unknown on line 0
zend_error_noreturn is part of PHP public API in 7+ only
5.6.30:
void zend_error_noreturn(int type, const char *format, ...) __attribute__ ((noreturn));
7.0.20
ZEND_API ZEND_COLD ZEND_NORETURN void zend_error_noreturn(int type, const char *format, ...);
The text was updated successfully, but these errors were encountered: