Skip to content

Commit

Permalink
Replaces php5 with php7, without whitespace changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
ralt committed Sep 20, 2014
1 parent 25f5ba9 commit cf0303e
Show file tree
Hide file tree
Showing 173 changed files with 3,964 additions and 1,090 deletions.
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ mkinstalldirs
modules
php
php-*.tar.gz
php5.spec
php7.spec
php_lcov.info
php_test_results_*.txt
php_version.h
Expand Down Expand Up @@ -260,9 +260,9 @@ pear/phpize
pear/run-tests
pear/php-config
pear/scripts
sapi/apache/libphp5.module
sapi/apache2handler/libphp5.module
sapi/apache_hooks/libphp5.module
sapi/apache/libphp7.module
sapi/apache2handler/libphp7.module
sapi/apache_hooks/libphp7.module
sapi/cgi/php-cgi
sapi/cgi/php-cgi.1
sapi/cli/php.1
Expand Down
64 changes: 32 additions & 32 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,12 @@ Apache 1.3.x on Unix systems
module on your system. The make install from above may have already
added this for you, but be sure to check.

LoadModule php5_module libexec/libphp5.so
LoadModule php7_module libexec/libphp7.so

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

AddModule mod_php5.c
AddModule mod_php7.c

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

10. cd ../apache_1.3.x

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

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

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

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

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

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

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

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

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

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

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

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

Example #3 Methods for listing additional PHP 5 packages
# apt-cache search php5
# aptitude search php5
# aptitude search php5 |grep -i mysql
Example #3 Methods for listing additional PHP 7 packages
# apt-cache search php7
# aptitude search php7
# aptitude search php7 |grep -i mysql

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

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

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

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

# AddModule mod_php5.c
# AddModule mod_php7.c

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

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

# Extra Modules
LoadModule php_module modules/mod_php.so
LoadModule php5_module modules/libphp5.so
LoadModule php7_module modules/libphp7.so
LoadModule perl_module modules/libperl.so

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

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

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

AddHandler php5-script php
AddHandler php7-script php
AddType text/html php

This solution doesn't work for Apache 1 as PHP module doesn't
Expand Down
2 changes: 1 addition & 1 deletion Makefile.global
Original file line number Diff line number Diff line change
Expand Up @@ -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 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
rm -f php5.spec main/build-defs.h scripts/phpize
rm -f php7.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 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
Expand Down
1 change: 0 additions & 1 deletion README.PARAMETER_PARSING_API
Original file line number Diff line number Diff line change
Expand Up @@ -231,4 +231,3 @@ for (i = 0; i < num_varargs; i++) {
if (varargs) {
efree(varargs);
}

2 changes: 1 addition & 1 deletion README.TESTING
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ Example script to be run by cron(1):
========== qa-test.sh =============
#!/bin/sh

CO_DIR=$HOME/cvs/php5
CO_DIR=$HOME/cvs/php7
[email protected]
TMPDIR=/var/tmp
TODAY=`date +"%Y%m%d"`
Expand Down
2 changes: 1 addition & 1 deletion README.UNIX-BUILD-SYSTEM
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ module, program, etc).

For example for APXS:

PHP_SELECT_SAPI(apache, shared, sapi_apache.c mod_php5.c php_apache.c)
PHP_SELECT_SAPI(apache, shared, sapi_apache.c mod_php7.c php_apache.c)



Expand Down
1 change: 0 additions & 1 deletion README.input_filter
Original file line number Diff line number Diff line change
Expand Up @@ -181,4 +181,3 @@ PHP_FUNCTION(my_get_raw)
RETVAL_FALSE;
}
}

2 changes: 1 addition & 1 deletion acinclude.m4
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ AC_DEFUN([PHP_SHARED_MODULE],[
;;
*netware*[)]
suffix=nlm
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)'
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)'
;;
*[)]
suffix=la
Expand Down
2 changes: 1 addition & 1 deletion build/build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ $(STAMP): build/buildcheck.sh
snapshot:
distname='$(DISTNAME)'; \
if test -z "$$distname"; then \
distname='php5-snapshot'; \
distname='php7-snapshot'; \
fi; \
myname=`basename \`pwd\`` ; \
cd .. && cp -rp $$myname $$distname; \
Expand Down
8 changes: 4 additions & 4 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -335,10 +335,10 @@ case $host_alias in
PHP_BUILD_PROGRAM
PHP_ADD_SOURCES(/main, internal_functions.c,,PHP_GLOBAL_OBJS)
PHP_ADD_SOURCES(win32, sendmail.c, -I$CFLAGS, PHP_GLOBAL_OBJS)
PHP5LIB_SHARED_LIBADD=\$\(EXTRA_LIBS\)
PHP7LIB_SHARED_LIBADD=\$\(EXTRA_LIBS\)
EXTENSION_DIR=sys:/php$PHP_MAJOR_VERSION/ext
PHP_SUBST(PHP5LIB_SHARED_LIBADD)
PHP_SHARED_MODULE(php5lib, PHP_GLOBAL_OBJS, netware)
PHP_SUBST(PHP7LIB_SHARED_LIBADD)
PHP_SHARED_MODULE(php7lib, PHP_GLOBAL_OBJS, netware)
;;
esac

Expand Down Expand Up @@ -1509,7 +1509,7 @@ $php_shtool mkdir -p pear/scripts
$php_shtool mkdir -p scripts
$php_shtool mkdir -p scripts/man1

ALL_OUTPUT_FILES="php5.spec main/build-defs.h \
ALL_OUTPUT_FILES="php7.spec main/build-defs.h \
scripts/phpize scripts/man1/phpize.1 \
scripts/php-config scripts/man1/php-config.1 \
$PHP_OUTPUT_FILES"
Expand Down
4 changes: 2 additions & 2 deletions ext/bz2/bz2.dsp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions ext/ctype/ctype.dsp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit cf0303e

Please sign in to comment.