php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #71041 zend_signal_startup() needs ZEND_API
Submitted: 2015-12-06 09:35 UTC Modified: 2017-09-03 22:38 UTC
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: rainer dot jung at kippdata dot de Assigned:
Status: Closed Package: Compile Failure
PHP Version: 7.0.0 OS: Linux and Solaris
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: rainer dot jung at kippdata dot de
New email:
PHP Version: OS:

 

 [2015-12-06 09:35 UTC] rainer dot jung at kippdata dot de
Description:
------------
In commit

http://git.php.net/?p=php-src.git;a=commitdiff;h=85a511d2c1b7d7489630d7e2d1112bddd4e20203

the calls to zend_signal_startup() where moved from Zend/zend.c into the individual sapi files. IMHO this means, that zend_signal_startup() needs to be declared and defined using ZEND_API in Zend/zend_signal.h and Zend/zend_signal.c.

I noticed this, because I changed the PHP build to use a common shared library for the different SAPIs. It likely is not noticed when linking all zend stuff statically into the binary sapi modules.


Patches

php_7.1_zend_signals_static_lib.patch (last revision 2017-01-20 08:22 UTC by maroszek at gmx dot net)
php7_0_0-zend_signal_startup-api.patch (last revision 2015-12-06 09:36 UTC by rainer dot jung at kippdata dot de)

Pull Requests

Pull requests:

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-12-06 10:02 UTC] rainer dot jung at kippdata dot de
I should add I'm using the configure flag --enable-zend-signals to enable zend signals.
 [2015-12-10 13:32 UTC] krakjoe@php.net
-Status: Open +Status: Wont fix
 [2015-12-10 13:32 UTC] krakjoe@php.net
The only place that this function should be called is in the SAPI layer, since all usable SAPI's are distributed with PHP, there doesn't seem to be a legitimate need to export the symbol.
 [2017-01-16 14:05 UTC] maroszek at gmx dot net
We are building PHP as a static embed library and linking it afterwards into our project. This worked in PHP 5.6. Unfortunately in PHP 7.x we get the same error, because zend_signal_startup is not exported. Any chance to revise your decision? Do i have any major drawbacks when compiling without signals? (This works around the issue)

Thanks in advance!
 [2017-09-03 22:38 UTC] hradtke@php.net
-Status: Wont fix +Status: Re-Opened
 [2017-09-03 22:38 UTC] hradtke@php.net
If we are not going to fix this bug, will we accept a patch to properly wrap zend_signal_activate with #if ZEND_SIGNAL? The call to zend_signal_deactivate is wrapped in it. We should be consistent.

Also, currently --disable_zend_signals is useless. See the report in https://bugs.php.net/bug.php?id=74149 for as to why.
 [2018-11-20 20:31 UTC] nikic@php.net
Automatic comment on behalf of vbart@nginx.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=11ddf7669a58969ad9101032ce891b951819b3e1
Log: Fix bug #71041 dynamic embed SAPI load error
 [2018-11-20 20:31 UTC] nikic@php.net
-Status: Re-Opened +Status: Closed
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Feb 04 03:01:31 2025 UTC