com php-src: Remove major version from apache module: .gitignore Makefile.global README.UNIX-BUILD-SYSTEM configure.ac php.spec.in php7.spec.in
sapi/apache2handler/config.m4 sapi/apache2handler/config.w32 sapi/apache2handler/mod_php.c sapi/apache2handler/mod _php7.c sapi/apache2handler/php.sym
sapi/apache 2handler/php_apache.h sapi/apache2handler/sapi_apac he2.c sapi/cgi/README.FastCGI

From: Date: Tue, 05 Feb 2019 13:57:35 +0000
Subject: com php-src: Remove major version from apache module: .gitignore Makefile.global README.UNIX-BUILD-SYSTEM configure.ac php.spec.in php7.spec.in
sapi/apache2handler/config.m4 sapi/apache2handler/config.w32 sapi/apache2handler/mod_php.c sapi/apache2handler/mod _php7.c sapi/apache2handler/php.sym
sapi/apache 2handler/php_apache.h sapi/apache2handler/sapi_apac he2.c sapi/cgi/README.FastCGI
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-104449@lists.php.net to get a copy of this message
Commit: 6e3600f41b95d97d11ef48f817e6389a4ee95091 Author: Nikita Popov <nikita.ppv@gmail.com> Mon, 28 Jan 2019 12:04:51 +0100 Parents: 480fa4225540830302d3f5d2b52c3909e6b127fb Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=6e3600f41b95d97d11ef48f817e6389a4ee95091 Log: Remove major version from apache module Changed paths: M .gitignore M Makefile.global M README.UNIX-BUILD-SYSTEM M configure.ac A php.spec.in D php7.spec.in M sapi/apache2handler/config.m4 M sapi/apache2handler/config.w32 A sapi/apache2handler/mod_php.c D sapi/apache2handler/mod_php7.c M sapi/apache2handler/php.sym M sapi/apache2handler/php_apache.h M sapi/apache2handler/sapi_apache2.c M sapi/cgi/README.FastCGI

diff --git a/.gitignore b/.gitignore index c0e0597..8216317 100644 --- a/.gitignore +++ b/.gitignore @@ -87,7 +87,7 @@ missing mkinstalldirs # RPM specification file generated by `./configure` -/php7.spec +/php.spec # Directories for shared object files and headers generated by `./configure` include/ diff --git a/Makefile.global b/Makefile.global index 29d74d3..ad3fbac 100644 --- a/Makefile.global +++ b/Makefile.global @@ -119,7 +119,7 @@ clean: distclean: clean rm -f Makefile config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h main/internal_functions_cli.c main/internal_functions.c buildmk.stamp Zend/zend_dtrace_gen.h Zend/zend_dtrace_gen.h.bak Zend/zend_config.h TSRM/tsrm_config.h - rm -f php7.spec main/build-defs.h scripts/phpize + rm -f php.spec main/build-defs.h scripts/phpize rm -f ext/date/lib/timelib_config.h ext/mbstring/oniguruma/config.h ext/mbstring/libmbfl/config.h ext/oci8/oci8_dtrace_gen.h ext/oci8/oci8_dtrace_gen.h.bak rm -f scripts/man1/phpize.1 scripts/php-config scripts/man1/php-config.1 sapi/cli/php.1 sapi/cgi/php-cgi.1 sapi/phpdbg/phpdbg.1 ext/phar/phar.1 ext/phar/phar.phar.1 rm -f sapi/fpm/php-fpm.conf sapi/fpm/init.d.php-fpm sapi/fpm/php-fpm.service sapi/fpm/php-fpm.8 sapi/fpm/status.html diff --git a/README.UNIX-BUILD-SYSTEM b/README.UNIX-BUILD-SYSTEM index a184b90..8db9bcd 100644 --- a/README.UNIX-BUILD-SYSTEM +++ b/README.UNIX-BUILD-SYSTEM @@ -108,7 +108,7 @@ module, program, etc). For example for APXS: -PHP_SELECT_SAPI(apache, shared, sapi_apache.c mod_php7.c php_apache.c) +PHP_SELECT_SAPI(apache, shared, sapi_apache.c mod_php.c php_apache.c) diff --git a/configure.ac b/configure.ac index 3c7c86d..55b4f37 100644 --- a/configure.ac +++ b/configure.ac @@ -1550,7 +1550,7 @@ AC_DEFINE([HAVE_BUILD_DEFS_H], 1, [ ]) $php_shtool mkdir -p scripts $php_shtool mkdir -p scripts/man1 -ALL_OUTPUT_FILES="php7.spec main/build-defs.h \ +ALL_OUTPUT_FILES="php.spec main/build-defs.h \ scripts/phpize scripts/man1/phpize.1 \ scripts/php-config scripts/man1/php-config.1 \ $PHP_OUTPUT_FILES" diff --git a/php.spec.in b/php.spec.in new file mode 100644 index 0000000..97a84b5 --- /dev/null +++ b/php.spec.in @@ -0,0 +1,48 @@ +%define version @VERSION@ +%define so_version 5 +%define release 0 + +Name: php +Summary: PHP: Hypertext Preprocessor +Group: Development/Languages +Version: %{version} +Release: %{release} +Copyright: The PHP license (see "LICENSE" file included in distribution) +Source: http://www.php.net/get/php-%{version}.tar.gz/from/a/mirror +Icon: php.gif +URL: http://www.php.net/ +Packager: PHP Group <group@php.net> + +BuildRoot: /var/tmp/php-%{version} + +%description +PHP is an HTML-embedded scripting language. Much of its syntax is +borrowed from C, Java and Perl with a couple of unique PHP-specific +features thrown in. The goal of the language is to allow web +developers to write dynamically generated pages quickly. + +%prep + +%setup + +%build +set -x +./buildconf +./configure --prefix=/usr --with-apxs \ + --disable-debug \ + --with-xml=shared \ + +# figure out configure options options based on what packages are installed +# to override, use the OVERRIDE_OPTIONS environment variable. To add +# extra options, use the OPTIONS environment variable. + +#test rpm -q MySQL-devel >&/dev/null && OPTIONS="$OPTIONS --with-mysql=shared" +#test rpm -q solid-devel >&/dev/null && OPTIONS="$OPTIONS --with-solid=shared,/home/solid" +#test rpm -q postgresql-devel >&/dev/null && OPTIONS="$OPTIONS --with-pgsql=shared" +test rpm -q expat >&/dev/null && OPTIONS="$OPTIONS --with-xml=shared" + +if test "x$OVERRIDE_OPTIONS" = "x"; then + ./configure --prefix=/usr --with-apxs=$APXS $OPTIONS +else + ./configure $OVERRIDE_OPTIONS +fi diff --git a/php7.spec.in b/php7.spec.in deleted file mode 100644 index 97a84b5..0000000 --- a/php7.spec.in +++ /dev/null @@ -1,48 +0,0 @@ -%define version @VERSION@ -%define so_version 5 -%define release 0 - -Name: php -Summary: PHP: Hypertext Preprocessor -Group: Development/Languages -Version: %{version} -Release: %{release} -Copyright: The PHP license (see "LICENSE" file included in distribution) -Source: http://www.php.net/get/php-%{version}.tar.gz/from/a/mirror -Icon: php.gif -URL: http://www.php.net/ -Packager: PHP Group <group@php.net> - -BuildRoot: /var/tmp/php-%{version} - -%description -PHP is an HTML-embedded scripting language. Much of its syntax is -borrowed from C, Java and Perl with a couple of unique PHP-specific -features thrown in. The goal of the language is to allow web -developers to write dynamically generated pages quickly. - -%prep - -%setup - -%build -set -x -./buildconf -./configure --prefix=/usr --with-apxs \ - --disable-debug \ - --with-xml=shared \ - -# figure out configure options options based on what packages are installed -# to override, use the OVERRIDE_OPTIONS environment variable. To add -# extra options, use the OPTIONS environment variable. - -#test rpm -q MySQL-devel >&/dev/null && OPTIONS="$OPTIONS --with-mysql=shared" -#test rpm -q solid-devel >&/dev/null && OPTIONS="$OPTIONS --with-solid=shared,/home/solid" -#test rpm -q postgresql-devel >&/dev/null && OPTIONS="$OPTIONS --with-pgsql=shared" -test rpm -q expat >&/dev/null && OPTIONS="$OPTIONS --with-xml=shared" - -if test "x$OVERRIDE_OPTIONS" = "x"; then - ./configure --prefix=/usr --with-apxs=$APXS $OPTIONS -else - ./configure $OVERRIDE_OPTIONS -fi diff --git a/sapi/apache2handler/config.m4 b/sapi/apache2handler/config.m4 index 1e6916f..aa7f7c8 100644 --- a/sapi/apache2handler/config.m4 +++ b/sapi/apache2handler/config.m4 @@ -68,20 +68,20 @@ if test "$PHP_APXS2" != "no"; then if test -z `$APXS -q SYSCONFDIR`; then INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \ $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \ - -i -n php7" + -i -n php" else APXS_SYSCONFDIR='$(INSTALL_ROOT)'`$APXS -q SYSCONFDIR` INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \ \$(mkinstalldirs) '$APXS_SYSCONFDIR' && \ $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \ -S SYSCONFDIR='$APXS_SYSCONFDIR' \ - -i -a -n php7" + -i -a -n php" fi case $host_alias in *aix*) EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-brtl -Wl,-bI:$APXS_LIBEXECDIR/httpd.exp" - PHP_SELECT_SAPI(apache2handler, shared, mod_php7.c sapi_apache2.c apache_config.c php_functions.c, $APACHE_CFLAGS) + PHP_SELECT_SAPI(apache2handler, shared, mod_php.c sapi_apache2.c apache_config.c php_functions.c, $APACHE_CFLAGS) INSTALL_IT="$INSTALL_IT $SAPI_LIBTOOL" ;; *darwin*) @@ -97,12 +97,12 @@ if test "$PHP_APXS2" != "no"; then fi MH_BUNDLE_FLAGS="-bundle -bundle_loader $APXS_HTTPD $MH_BUNDLE_FLAGS" PHP_SUBST(MH_BUNDLE_FLAGS) - PHP_SELECT_SAPI(apache2handler, bundle, mod_php7.c sapi_apache2.c apache_config.c php_functions.c, $APACHE_CFLAGS) - SAPI_SHARED=libs/libphp7.so + PHP_SELECT_SAPI(apache2handler, bundle, mod_php.c sapi_apache2.c apache_config.c php_functions.c, $APACHE_CFLAGS) + SAPI_SHARED=libs/libphp.so INSTALL_IT="$INSTALL_IT $SAPI_SHARED" ;; *) - PHP_SELECT_SAPI(apache2handler, shared, mod_php7.c sapi_apache2.c apache_config.c php_functions.c, $APACHE_CFLAGS) + PHP_SELECT_SAPI(apache2handler, shared, mod_php.c sapi_apache2.c apache_config.c php_functions.c, $APACHE_CFLAGS) INSTALL_IT="$INSTALL_IT $SAPI_LIBTOOL" ;; esac diff --git a/sapi/apache2handler/config.w32 b/sapi/apache2handler/config.w32 index 45d6353..12dd503 100644 --- a/sapi/apache2handler/config.w32 +++ b/sapi/apache2handler/config.w32 @@ -10,7 +10,7 @@ if (PHP_APACHE2HANDLER != "no") { CHECK_LIB("libapr.lib", "apache2handler", PHP_PHP_BUILD + "\\lib\\apache2") && CHECK_LIB("libaprutil.lib", "apache2handler", PHP_PHP_BUILD + "\\lib\\apache2") ) { - SAPI('apache2handler', 'mod_php7.c sapi_apache2.c apache_config.c php_functions.c', + SAPI('apache2handler', 'mod_php.c sapi_apache2.c apache_config.c php_functions.c', 'php' + PHP_VERSION + 'apache2.dll', '/D PHP_APACHE2_EXPORTS /I win32 /DZEND_ENABLE_STATIC_TSRMLS_CACHE=1'); } else { @@ -28,7 +28,7 @@ if (PHP_APACHE2_2HANDLER != "no") { CHECK_LIB("libapr-1.lib", "apache2_2handler", PHP_PHP_BUILD + "\\lib\\apache2_2") && CHECK_LIB("libaprutil-1.lib", "apache2_2handler", PHP_PHP_BUILD + "\\lib\\apache2_2") ) { - SAPI('apache2_2handler', 'mod_php7.c sapi_apache2.c apache_config.c php_functions.c', + SAPI('apache2_2handler', 'mod_php.c sapi_apache2.c apache_config.c php_functions.c', 'php' + PHP_VERSION + 'apache2_2.dll', '/D PHP_APACHE2_EXPORTS /I win32 /DZEND_ENABLE_STATIC_TSRMLS_CACHE=1', 'sapi\\apache2_2handler'); @@ -46,7 +46,7 @@ if (PHP_APACHE2_4HANDLER != "no") { CHECK_LIB("libapr-1.lib", "apache2_4handler", PHP_PHP_BUILD + "\\lib\\apache2_4") && CHECK_LIB("libaprutil-1.lib", "apache2_4handler", PHP_PHP_BUILD + "\\lib\\apache2_4") ) { - SAPI('apache2_4handler', 'mod_php7.c sapi_apache2.c apache_config.c php_functions.c', + SAPI('apache2_4handler', 'mod_php.c sapi_apache2.c apache_config.c php_functions.c', 'php' + PHP_VERSION + 'apache2_4.dll', '/D PHP_APACHE2_EXPORTS /I win32 /DZEND_ENABLE_STATIC_TSRMLS_CACHE=1', 'sapi\\apache2handler'); diff --git a/sapi/apache2handler/mod_php.c b/sapi/apache2handler/mod_php.c new file mode 100644 index 0000000..a740271 --- /dev/null +++ b/sapi/apache2handler/mod_php.c @@ -0,0 +1,34 @@ +/* + +----------------------------------------------------------------------+ + | PHP Version 7 | + +----------------------------------------------------------------------+ + | Copyright (c) The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Authors: Sascha Schumann <sascha@schumann.cx> | + | Parts based on Apache 1.3 SAPI module by | + | Rasmus Lerdorf and Zeev Suraski | + +----------------------------------------------------------------------+ + */ + +#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS + +#include "php.h" +#include "php_apache.h" + +AP_MODULE_DECLARE_DATA module php_module = { + STANDARD20_MODULE_STUFF, + create_php_config, /* create per-directory config structure */ + merge_php_config, /* merge per-directory config structures */ + NULL, /* create per-server config structure */ + NULL, /* merge per-server config structures */ + php_dir_cmds, /* command apr_table_t */ + php_ap2_register_hook /* register hooks */ +}; diff --git a/sapi/apache2handler/mod_php7.c b/sapi/apache2handler/mod_php7.c deleted file mode 100644 index 6c44dba..0000000 --- a/sapi/apache2handler/mod_php7.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | PHP Version 7 | - +----------------------------------------------------------------------+ - | Copyright (c) The PHP Group | - +----------------------------------------------------------------------+ - | This source file is subject to version 3.01 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_01.txt | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Authors: Sascha Schumann <sascha@schumann.cx> | - | Parts based on Apache 1.3 SAPI module by | - | Rasmus Lerdorf and Zeev Suraski | - +----------------------------------------------------------------------+ - */ - -#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS - -#include "php.h" -#include "php_apache.h" - -AP_MODULE_DECLARE_DATA module php7_module = { - STANDARD20_MODULE_STUFF, - create_php_config, /* create per-directory config structure */ - merge_php_config, /* merge per-directory config structures */ - NULL, /* create per-server config structure */ - NULL, /* merge per-server config structures */ - php_dir_cmds, /* command apr_table_t */ - php_ap2_register_hook /* register hooks */ -}; diff --git a/sapi/apache2handler/php.sym b/sapi/apache2handler/php.sym index 1469b03..571f27e 100644 --- a/sapi/apache2handler/php.sym +++ b/sapi/apache2handler/php.sym @@ -1 +1 @@ -php7_module +php_module diff --git a/sapi/apache2handler/php_apache.h b/sapi/apache2handler/php_apache.h index 423ada1..c80e124 100644 --- a/sapi/apache2handler/php_apache.h +++ b/sapi/apache2handler/php_apache.h @@ -29,11 +29,11 @@ /* Enable per-module logging in Apache 2.4+ */ #ifdef APLOG_USE_MODULE -APLOG_USE_MODULE(php7); +APLOG_USE_MODULE(php); #endif /* Declare this so we can get to it from outside the sapi_apache2.c file */ -extern module AP_MODULE_DECLARE_DATA php7_module; +extern module AP_MODULE_DECLARE_DATA php_module; /* A way to specify the location of the php.ini dir in an apache directive */ extern char *apache2_php_ini_path_override; diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c index 1aeccb1..346019b 100644 --- a/sapi/apache2handler/sapi_apache2.c +++ b/sapi/apache2handler/sapi_apache2.c @@ -55,7 +55,7 @@ #define PHP_MAGIC_TYPE "application/x-httpd-php" #define PHP_SOURCE_MAGIC_TYPE "application/x-httpd-php-source" -#define PHP_SCRIPT "php7-script" +#define PHP_SCRIPT "php-script" /* A way to specify the location of the php.ini dir in an apache directive */ char *apache2_php_ini_path_override = NULL; @@ -550,7 +550,7 @@ typedef struct { HashTable config; } php_conf_rec; zend_string *str; - php_conf_rec *c = ap_get_module_config(r->per_dir_config, &php7_module); + php_conf_rec *c = ap_get_module_config(r->per_dir_config, &php_module); ZEND_HASH_FOREACH_STR_KEY(&c->config, str) { zend_restore_ini_entry(str, ZEND_INI_STAGE_SHUTDOWN); @@ -579,7 +579,7 @@ static int php_handler(request_rec *r) #define PHPAP_INI_OFF php_apache_ini_dtor(r, parent_req); - conf = ap_get_module_config(r->per_dir_config, &php7_module); + conf = ap_get_module_config(r->per_dir_config, &php_module); /* apply_config() needs r in some cases, so allocate server_context early */ ctx = SG(server_context); diff --git a/sapi/cgi/README.FastCGI b/sapi/cgi/README.FastCGI index 4d34ff3..74770ea 100644 --- a/sapi/cgi/README.FastCGI +++ b/sapi/cgi/README.FastCGI @@ -69,7 +69,7 @@ a line in your config like: Don't load mod_php, by the way. Make sure it is commented out! - #LoadModule php7_module /usr/lib/apache/2.0/libphp7.so + #LoadModule php_module /usr/lib/apache/2.0/libphp.so Now, we'll create a fcgi-bin directory, just like you would do with normal CGI scripts. You'll need to create a directory somewhere to store your
« previous php.cvs (#104449) next »