summaryrefslogtreecommitdiffhomepage
path: root/auto/modules/php (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-10-28Fixed main() prototypes in auto tests.Andrew Clayton1-4/+4
Future releases of GCC are planning to remove[0] default support for some old features that were removed from C99 but GCC still accepts. We can test for these changes by using the following -Werror= directives -Werror=implicit-int -Werror=implicit-function-declaration -Werror=int-conversion -Werror=strict-prototypes -Werror=old-style-definition Doing so revealed an issue with the auto/ tests in that the test programs always define main as int main() rather than int main(void) which results in a bunch of errors like build/autotest.c:3:23: error: function declaration isn't a prototype [-Werror=strict-prototypes] 3 | int main() { | ^~~~ build/autotest.c: In function 'main': build/autotest.c:3:23: error: old-style function definition [-Werror=old-style-definition] The fix was easy, it only required fixing the main prototype with find -type f -exec sed -i 's/int main() {/int main(void) {/g' {} \; Regardless of these upcoming GCC changes, this is probably a good thing to do anyway for correctness. [0]: https://fedoraproject.org/wiki/Changes/PortingToModernC Link: <https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/CJXKTLXJUPZ4F2C2VQOTNMEA5JAUPMBD/> Link: <https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/6SGHPHPAXKCVJ6PUZ57WVDQ5TDBVIRMF/> Reviewed-by: Alejandro Colomar <alx@nginx.com> Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2022-10-19PHP: Fixed php_module_startup() call for PHP 8.2.Remi Collet1-0/+4
PHP 8.2 changed the prototype of the function, removing the last parameter. Signed-off-by: Remi Collet <remi@remirepo.net> Cc: Timo Stark <t.stark@nginx.com> Cc: George Peter Banyard <girgias@php.net> Tested-by: Andy Postnikov <apostnikov@gmail.com> Acked-by: Andy Postnikov <apostnikov@gmail.com> Reviewed-by: Andrew Clayton <a.clayton@nginx.com> Signed-off-by: Alejandro Colomar <alx@nginx.com>
2020-10-26Configure: using comma instead of space for passing -rpath value.Valentin Bartenev1-2/+1
This variant will be more interoperable across various systems and it's already used in Ruby module. Otherwise, configure tests fail on NetBSD with: gcc: Missing argument for -Wl,-rpath
2020-09-09PHP: fixed "rootfs" isolation dependency on system mounts.Tiago Natel de Moura1-29/+1
2020-08-25Isolation: added "automount" option.Tiago Natel de Moura1-3/+3
Now it's possible to disable default bind mounts of languages by setting: { "isolation": { "automount": { "language_deps": false } } } In this case, the user is responsible to provide a "rootfs" containing the language libraries and required files for the application.
2020-08-25PHP: added bind mounts for extensions directory.Tiago Natel de Moura1-1/+32
2020-07-28PHP: fixed version comparison in configure script.Tiago Natel de Moura1-2/+2
Some PPAs for Ubuntu package PHP with versions like: 7.2.28-3+ubuntu18.04.1+deb.sury.org+1 But the script expected only "X.Y.Z". The issue was introduced in: http://hg.nginx.org/unit/rev/2ecb15904ba5
2020-05-20PHP: building with PHP 8 (development version).Remi Collet1-1/+5
2020-03-04PHP: added ZTS indication to ./configure output.Valentin Bartenev1-0/+19
2020-03-04PHP: rearranged feature checks in ./configure.Valentin Bartenev1-46/+48
Now it prints version even if PHP was built without embed SAPI.
2020-03-03PHP: optimization to avoid surplus chdir(2) calls.Tiago Natel de Moura1-2/+11
For each request, the worker calls the php_execute_script function from libphp that changes to the script directory before doing its work and then restores the process directory before returning. The chdir(2) calls it performs are unnecessary in Unit design. In simple benchmarks, profiling shows that the chdir syscall code path (syscall, FS walk, etc.) is where the CPU spends most of its time. PHP SAPI semantics requires the script to be run from the script directory. In Unit's PHP implementation, we have two use cases: - script - arbitrary path The "script" configuration doesn't have much need for a working directory change: it can be changed once at module initialization. The module needs to chdir again only if the user's PHP script also calls chdir to switch to another directory during execution. If "script" is not used in Unit configuration, we must ensure the script is run from its directory (thus calling chdir before exec), but there's no need to restore the working directory later. Our implementation disables mandatory chdir calls with the SAPI option SAPI_OPTION_NO_CHDIR, instead calling chdir only when needed. To detect the user's calls to chdir, a simple "unit" extension is added that hooks the built-in chdir() PHP call.
2019-10-02Fixed "make tests" build without preceding "make".Max Romanov1-1/+1
Currently almost all Unit object files depends on generated nxt_version.h. This patch adds missing dependence and fixes running make with multiple jobs. This closes #318 issue on GitHub.
2018-11-22PHP: workaround for bug #71041.Valentin Bartenev1-1/+26
Since PHP 7, a zend_signal_startup() call is required if the interpreter was built with ZEND_SIGNALS defined; such a call was added in 3fd76e4ce70a. However, the zend_signal_startup() export is missing from the PHP library; as the result, dlopen() fails with the 'Undefined symbol "zend_signal_startup"' error while loading the PHP module. Meanwhile, if PHP is built without ZTS, the zend_signal_startup() call can be omitted; otherwise, the missing call causes segmentation fault. The PHP fix already was committed to upstream, but we still have to deal with numerous unpatched versions remaining at large. See the related PHP bug: https://bugs.php.net/bug.php?id=71041
2018-11-21PHP: fixed compatibility with ZTS.Valentin Bartenev1-1/+1
This closes #184 issue on GitHub.
2018-08-06Unit application library.Max Romanov1-1/+1
Library now used in all language modules. Old 'nxt_app_*' code removed. See src/test/nxt_unit_app_test.c for usage sample.
2018-06-28Added check of "make install" ability.Igor Sysoev1-1/+1
This closes #136 issue on GitHub.
2018-05-30PHP: fixed building on MacOSX with --ld-opt= option.Igor Sysoev1-2/+4
2018-05-30PHP: using generated dependencies in makefile.Max Romanov1-0/+3
2018-04-04Changed version processing for modules.Alexander Borisov1-1/+17
2018-01-15PHP: "--lib-static" option uses "--lib-path" option.Igor Sysoev1-6/+18
2018-01-12PHP: added "--lib-static" configure option.Igor Sysoev1-0/+7
The libraries returned by "php-config --libs" are required to link with static libphp.a. Dynamic libphp.so contains the required libraries names.
2017-12-01Using compiler capability to generate dependencies.Max Romanov1-2/+8
This closes #58 issue on GitHub.
2017-11-29Using --ld-opt when linking modules.Max Romanov1-2/+2
2017-09-06Style fixes.Igor Sysoev1-1/+1
2017-08-31Introducing install & uninstall Makefile targets.Max Romanov1-1/+18
2017-08-31Changed modules names format.Igor Sysoev1-4/+4
2017-08-31nginext has been renamed to unit.Igor Sysoev1-4/+4
2017-08-29Separation of module prerequisites for 'all' target in Makefile.Max Romanov1-2/+2
To avoid using sed -i.
2017-08-26Added configure and command line option --help.Igor Sysoev1-8/+17
2017-08-17The new module configuration interface.Igor Sysoev1-0/+152
Configuration and building example: ./configure ./configure python ./configure php ./configure go make all or ./configure make nginext ./configure python make python ./configure php make php ./configure go make go Modules configuration options and building examples: ./configure python --module=python2 --config=python2.7-config make python2 ./configure php --module=php7 --config=php7.0-config --lib-path=/usr/local/php7.0 make php7 ./configure go --go=go1.6 --go-path=${HOME}/go1.6 make go1.6
2017-08-17Removing auto/modules directory before commiting the new moduleIgor Sysoev2-80/+0
configuration infrastructure.
2017-08-04Introducing configure option --with-php-ldflags=.Igor Sysoev1-8/+11
2017-07-26Improved PHP configure test.Igor Sysoev1-21/+31
2017-06-23PHP app request processing.Max Romanov2-0/+67