Skip to content

Commit cf0303e

Browse files
committed
Replaces php5 with php7, without whitespace changes.
1 parent 25f5ba9 commit cf0303e

File tree

173 files changed

+3964
-1090
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

173 files changed

+3964
-1090
lines changed

.gitignore

+4-4
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ mkinstalldirs
8282
modules
8383
php
8484
php-*.tar.gz
85-
php5.spec
85+
php7.spec
8686
php_lcov.info
8787
php_test_results_*.txt
8888
php_version.h
@@ -260,9 +260,9 @@ pear/phpize
260260
pear/run-tests
261261
pear/php-config
262262
pear/scripts
263-
sapi/apache/libphp5.module
264-
sapi/apache2handler/libphp5.module
265-
sapi/apache_hooks/libphp5.module
263+
sapi/apache/libphp7.module
264+
sapi/apache2handler/libphp7.module
265+
sapi/apache_hooks/libphp7.module
266266
sapi/cgi/php-cgi
267267
sapi/cgi/php-cgi.1
268268
sapi/cli/php.1

INSTALL

+32-32
Original file line numberDiff line numberDiff line change
@@ -223,12 +223,12 @@ Apache 1.3.x on Unix systems
223223
module on your system. The make install from above may have already
224224
added this for you, but be sure to check.
225225

226-
LoadModule php5_module libexec/libphp5.so
226+
LoadModule php7_module libexec/libphp7.so
227227

228228
15. And in the AddModule section of httpd.conf, somewhere under the
229229
ClearModuleList, add this:
230230

231-
AddModule mod_php5.c
231+
AddModule mod_php7.c
232232

233233
16. Tell Apache to parse certain extensions as PHP. For example,
234234
let's have Apache parse the .php extension as PHP. You could
@@ -263,8 +263,8 @@ Apache 1.3.x on Unix systems
263263

264264
10. cd ../apache_1.3.x
265265

266-
11. ./configure --prefix=/www --activate-module=src/modules/php5/libphp5.a
267-
(The above line is correct! Yes, we know libphp5.a does not exist at this
266+
11. ./configure --prefix=/www --activate-module=src/modules/php7/libphp7.a
267+
(The above line is correct! Yes, we know libphp7.a does not exist at this
268268
stage. It isn't supposed to. It will be created.)
269269

270270
12. make
@@ -309,24 +309,24 @@ stop and start:
309309
Different examples of compiling PHP for apache are as follows:
310310
./configure --with-apxs --with-pgsql
311311

312-
This will create a libphp5.so shared library that is loaded into Apache
312+
This will create a libphp7.so shared library that is loaded into Apache
313313
using a LoadModule line in Apache's httpd.conf file. The PostgreSQL
314314
support is embedded into this library.
315315

316316
./configure --with-apxs --with-pgsql=shared
317317

318-
This will create a libphp5.so shared library for Apache, but it will
318+
This will create a libphp7.so shared library for Apache, but it will
319319
also create a pgsql.so shared library that is loaded into PHP either by
320320
using the extension directive in php.ini file or by loading it
321321
explicitly in a script using the dl() function.
322322

323323
./configure --with-apache=/path/to/apache_source --with-pgsql
324324

325-
This will create a libmodphp5.a library, a mod_php5.c and some
326-
accompanying files and copy this into the src/modules/php5 directory in
325+
This will create a libmodphp7.a library, a mod_php7.c and some
326+
accompanying files and copy this into the src/modules/php7 directory in
327327
the Apache source tree. Then you compile Apache using
328-
--activate-module=src/modules/php5/libphp5.a and the Apache build
329-
system will create libphp5.a and link it statically into the httpd
328+
--activate-module=src/modules/php7/libphp7.a and the Apache build
329+
system will create libphp7.a and link it statically into the httpd
330330
binary. The PostgreSQL support is included directly into this httpd
331331
binary, so the final result here is a single httpd binary that includes
332332
all of Apache and all of PHP.
@@ -450,7 +450,7 @@ cp php.ini-development /usr/local/lib/php.ini
450450
hand side of the LoadModule statement must point to the path of the
451451
PHP module on your system. The make install from above may have
452452
already added this for you, but be sure to check.
453-
LoadModule php5_module modules/libphp5.so
453+
LoadModule php7_module modules/libphp7.so
454454
8. Tell Apache to parse certain extensions as PHP. For example, let's
455455
have Apache parse .php files as PHP. Instead of only using the
456456
Apache AddType directive, we want to avoid potentially dangerous
@@ -461,7 +461,7 @@ LoadModule php5_module modules/libphp5.so
461461
<FilesMatch \.php$>
462462
SetHandler application/x-httpd-php
463463
</FilesMatch>
464-
Or, if we wanted to allow .php, .php2, .php3, .php4, .php5, .php6,
464+
Or, if we wanted to allow .php, .php2, .php3, .php4, .php5, .php7,
465465
and .phtml files to be executed as PHP, but nothing else, we'd use
466466
this:
467467
<FilesMatch "\.ph(p[2-6]?|tml)$">
@@ -1004,16 +1004,16 @@ Debian GNU/Linux installation notes
10041004
Using APT
10051005

10061006
First, note that other related packages may be desired like
1007-
libapache2-mod-php5 to integrate with Apache 2, and php-pear for PEAR.
1007+
libapache2-mod-php7 to integrate with Apache 2, and php-pear for PEAR.
10081008

10091009
Second, before installing a package, it's wise to ensure the package
10101010
list is up to date. Typically, this is done by running the command
10111011
apt-get update.
10121012

10131013
Example #1 Debian Install Example with Apache 2
1014-
# apt-get install php5-common libapache2-mod-php5 php5-cli
1014+
# apt-get install php7-common libapache2-mod-php7 php7-cli
10151015

1016-
APT will automatically install the PHP 5 module for Apache 2 and all of
1016+
APT will automatically install the PHP 7 module for Apache 2 and all of
10171017
its dependencies, and then activate it. Apache should be restarted in
10181018
order for the changes take place. For example:
10191019

@@ -1027,23 +1027,23 @@ Better control of configuration
10271027
very likely that additional modules will be desired, such as MySQL,
10281028
cURL, GD, etc. These may also be installed via the apt-get command.
10291029

1030-
Example #3 Methods for listing additional PHP 5 packages
1031-
# apt-cache search php5
1032-
# aptitude search php5
1033-
# aptitude search php5 |grep -i mysql
1030+
Example #3 Methods for listing additional PHP 7 packages
1031+
# apt-cache search php7
1032+
# aptitude search php7
1033+
# aptitude search php7 |grep -i mysql
10341034

10351035
The examples will show a lot of packages including several PHP specific
1036-
ones like php5-cgi, php5-cli and php5-dev. Determine which are needed
1036+
ones like php7-cgi, php7-cli and php7-dev. Determine which are needed
10371037
and install them like any other with either apt-get or aptitude. And
10381038
because Debian performs dependency checks, it'll prompt for those so
10391039
for example to install MySQL and cURL:
10401040

10411041
Example #4 Install PHP with MySQL, cURL
1042-
# apt-get install php5-mysql php5-curl
1042+
# apt-get install php7-mysql php7-curl
10431043

10441044
APT will automatically add the appropriate lines to the different
1045-
php.ini related files like /etc/php5/apache2/php.ini,
1046-
/etc/php5/conf.d/pdo.ini, etc. and depending on the extension will add
1045+
php.ini related files like /etc/php7/apache2/php.ini,
1046+
/etc/php7/conf.d/pdo.ini, etc. and depending on the extension will add
10471047
entries similar to extension=foo.so. However, restarting the web server
10481048
(like Apache) is required before these changes take affect.
10491049

@@ -1137,9 +1137,9 @@ Using the bundled PHP
11371137
2. With a text editor, uncomment the lines (by removing the #) that
11381138
look similar to the following (these two lines are often not
11391139
together, locate them both in the file):
1140-
# LoadModule php5_module libexec/httpd/libphp5.so
1140+
# LoadModule php7_module libexec/httpd/libphp7.so
11411141

1142-
# AddModule mod_php5.c
1142+
# AddModule mod_php7.c
11431143

11441144
Notice the location/path. When building PHP in the future, the
11451145
above files should be replaced or commented out.
@@ -1148,7 +1148,7 @@ Using the bundled PHP
11481148
Due to the following statement already existing in httpd.conf (as
11491149
of Mac Panther), once PHP is enabled the .php files will
11501150
automatically parse as PHP.
1151-
<IfModule mod_php5.c>
1151+
<IfModule mod_php7.c>
11521152
# If php is turned on, we respect .php and .phps files.
11531153
AddType application/x-httpd-php .php
11541154
AddType application/x-httpd-php-source .phps
@@ -1740,7 +1740,7 @@ Running PHP as an Apache module
17401740
php_admin_flag can not be overridden by .htaccess or ini_set().
17411741

17421742
Example #1 Apache configuration example
1743-
<IfModule mod_php5.c>
1743+
<IfModule mod_php7.c>
17441744
php_value include_path ".:/usr/local/lib/php"
17451745
php_admin_flag engine on
17461746
</IfModule>
@@ -1810,7 +1810,7 @@ Installation
18101810
script file via my browser, I get a server 500 error.
18111811
8. Some operating systems: I have installed PHP without errors, but
18121812
when I try to start Apache I get undefined symbol errors:
1813-
[mybox:user /src/php5] root# apachectl configtest apachectl:
1813+
[mybox:user /src/php7] root# apachectl configtest apachectl:
18141814
/usr/local/apache/bin/httpd Undefined symbols: _compress
18151815
_uncompress
18161816
9. Windows: I have installed PHP, but when I try to access a PHP
@@ -1912,7 +1912,7 @@ AddModule mod_perl.c
19121912

19131913
# Extra Modules
19141914
LoadModule php_module modules/mod_php.so
1915-
LoadModule php5_module modules/libphp5.so
1915+
LoadModule php7_module modules/libphp7.so
19161916
LoadModule perl_module modules/libperl.so
19171917

19181918
And add:
@@ -1954,7 +1954,7 @@ AddType application/x-httpd-php .php
19541954
Some operating systems: I have installed PHP without errors, but when I
19551955
try to start Apache I get undefined symbol errors:
19561956

1957-
[mybox:user /src/php5] root# apachectl configtest
1957+
[mybox:user /src/php7] root# apachectl configtest
19581958
apachectl: /usr/local/apache/bin/httpd Undefined symbols:
19591959
_compress
19601960
_uncompress
@@ -1984,7 +1984,7 @@ cgi error:
19841984
script via the browser again. If it still fails then it could be
19851985
one of the following:
19861986

1987-
+ File permissions on your PHP script, php.exe, php5ts.dll,
1987+
+ File permissions on your PHP script, php.exe, php7ts.dll,
19881988
php.ini or any PHP extensions you are trying to load are such
19891989
that the anonymous internet user ISUR_<machinename> cannot
19901990
access them.
@@ -2103,7 +2103,7 @@ cgi error:
21032103
to choose PHP files from URL with no extension. In this case,
21042104
replace the line AddType application/x-httpd-php .php with:
21052105

2106-
AddHandler php5-script php
2106+
AddHandler php7-script php
21072107
AddType text/html php
21082108

21092109
This solution doesn't work for Apache 1 as PHP module doesn't

Makefile.global

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ clean:
119119

120120
distclean: clean
121121
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 stamp-h sapi/apache/libphp$(PHP_MAJOR_VERSION).module sapi/apache_hooks/libphp$(PHP_MAJOR_VERSION).module buildmk.stamp Zend/zend_dtrace_gen.h Zend/zend_dtrace_gen.h.bak Zend/zend_config.h TSRM/tsrm_config.h
122-
rm -f php5.spec main/build-defs.h scripts/phpize
122+
rm -f php7.spec main/build-defs.h scripts/phpize
123123
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
124124
rm -f scripts/man1/phpize.1 scripts/php-config scripts/man1/php-config.1 sapi/cli/php.1 sapi/cgi/php-cgi.1 ext/phar/phar.1 ext/phar/phar.phar.1
125125
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

README.PARAMETER_PARSING_API

-1
Original file line numberDiff line numberDiff line change
@@ -231,4 +231,3 @@ for (i = 0; i < num_varargs; i++) {
231231
if (varargs) {
232232
efree(varargs);
233233
}
234-

README.TESTING

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ Example script to be run by cron(1):
118118
========== qa-test.sh =============
119119
#!/bin/sh
120120

121-
CO_DIR=$HOME/cvs/php5
121+
CO_DIR=$HOME/cvs/php7
122122
MYMAIL=qa-test@domain.com
123123
TMPDIR=/var/tmp
124124
TODAY=`date +"%Y%m%d"`

README.UNIX-BUILD-SYSTEM

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ module, program, etc).
108108

109109
For example for APXS:
110110

111-
PHP_SELECT_SAPI(apache, shared, sapi_apache.c mod_php5.c php_apache.c)
111+
PHP_SELECT_SAPI(apache, shared, sapi_apache.c mod_php7.c php_apache.c)
112112

113113

114114

README.input_filter

-1
Original file line numberDiff line numberDiff line change
@@ -181,4 +181,3 @@ PHP_FUNCTION(my_get_raw)
181181
RETVAL_FALSE;
182182
}
183183
}
184-

acinclude.m4

+1-1
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,7 @@ AC_DEFUN([PHP_SHARED_MODULE],[
844844
;;
845845
*netware*[)]
846846
suffix=nlm
847-
link_cmd='$(LIBTOOL) --mode=link ifelse($4,,[$(CC)],[$(CXX)]) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o [$]@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $($2) ifelse($1, php5lib, , -L$(top_builddir)/netware -lphp5lib) $(translit(ifelse($1, php5lib, $1, m4_substr($1, 3)),a-z_-,A-Z__)_SHARED_LIBADD)'
847+
link_cmd='$(LIBTOOL) --mode=link ifelse($4,,[$(CC)],[$(CXX)]) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o [$]@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $($2) ifelse($1, php7lib, , -L$(top_builddir)/netware -lphp7lib) $(translit(ifelse($1, php7lib, $1, m4_substr($1, 3)),a-z_-,A-Z__)_SHARED_LIBADD)'
848848
;;
849849
*[)]
850850
suffix=la

build/build.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ $(STAMP): build/buildcheck.sh
3939
snapshot:
4040
distname='$(DISTNAME)'; \
4141
if test -z "$$distname"; then \
42-
distname='php5-snapshot'; \
42+
distname='php7-snapshot'; \
4343
fi; \
4444
myname=`basename \`pwd\`` ; \
4545
cd .. && cp -rp $$myname $$distname; \

configure.in

+4-4
Original file line numberDiff line numberDiff line change
@@ -335,10 +335,10 @@ case $host_alias in
335335
PHP_BUILD_PROGRAM
336336
PHP_ADD_SOURCES(/main, internal_functions.c,,PHP_GLOBAL_OBJS)
337337
PHP_ADD_SOURCES(win32, sendmail.c, -I$CFLAGS, PHP_GLOBAL_OBJS)
338-
PHP5LIB_SHARED_LIBADD=\$\(EXTRA_LIBS\)
338+
PHP7LIB_SHARED_LIBADD=\$\(EXTRA_LIBS\)
339339
EXTENSION_DIR=sys:/php$PHP_MAJOR_VERSION/ext
340-
PHP_SUBST(PHP5LIB_SHARED_LIBADD)
341-
PHP_SHARED_MODULE(php5lib, PHP_GLOBAL_OBJS, netware)
340+
PHP_SUBST(PHP7LIB_SHARED_LIBADD)
341+
PHP_SHARED_MODULE(php7lib, PHP_GLOBAL_OBJS, netware)
342342
;;
343343
esac
344344

@@ -1509,7 +1509,7 @@ $php_shtool mkdir -p pear/scripts
15091509
$php_shtool mkdir -p scripts
15101510
$php_shtool mkdir -p scripts/man1
15111511

1512-
ALL_OUTPUT_FILES="php5.spec main/build-defs.h \
1512+
ALL_OUTPUT_FILES="php7.spec main/build-defs.h \
15131513
scripts/phpize scripts/man1/phpize.1 \
15141514
scripts/php-config scripts/man1/php-config.1 \
15151515
$PHP_OUTPUT_FILES"

ext/bz2/bz2.dsp

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ext/ctype/ctype.dsp

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)