php: Stop using dl()

With modern PHP it only works with the CLI version of PHP, so it's
better to direct users to load the extension via "extension=" in
php.ini.

Suggested by ferdynator in #1529.
This commit is contained in:
Olly Betts 2021-03-23 11:49:57 +13:00
commit 586eb24efe
6 changed files with 43 additions and 36 deletions

View file

@ -71,9 +71,9 @@ missingtests: missingcpptests missingctests
# found, runs testcase.php, except for multicpptests.
run_testcase = \
if [ -f $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
$(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile PHP_SCRIPT=$(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) RUNTOOL='$(RUNTOOL)' php_run; \
$(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile PHP_EXTENSION=$(TARGETPREFIX)$*$(PHP_SO) PHP_SCRIPT=$(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) RUNTOOL='$(RUNTOOL)' php_run; \
elif [ -f $(SCRIPTDIR)/$(SCRIPTPREFIX)$*.php -a ! -f $(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE)/$*.list ]; then \
$(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile PHP_SCRIPT=$(SCRIPTDIR)/$(SCRIPTPREFIX)$*.php RUNTOOL='$(RUNTOOL)' php_run; \
$(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile PHP_EXTENSION=$(TARGETPREFIX)$*$(PHP_SO) PHP_SCRIPT=$(SCRIPTDIR)/$(SCRIPTPREFIX)$*.php RUNTOOL='$(RUNTOOL)' php_run; \
fi
# Clean: remove the generated .php file

View file

@ -175,7 +175,7 @@ class check {
$extra=array_flip(check::get_extra_globals());
foreach ($globals as $glob) {
if (self::GETSET) {
if (! isset($extra[$glob])) $missing[]=$glob;
if (! function_exists($glob . "_get") && ! function_exists($glob . "_set")) $missing[]=$glob;
else unset($extra[$glob]);
} else {
if (! isset($GLOBALS[$glob])) $missing[]=$glob;