@@ -223,12 +223,12 @@ Apache 1.3.x on Unix systems
223
223
module on your system. The make install from above may have already
224
224
added this for you, but be sure to check.
225
225
226
- LoadModule php5_module libexec/libphp5 .so
226
+ LoadModule php7_module libexec/libphp7 .so
227
227
228
228
15. And in the AddModule section of httpd.conf, somewhere under the
229
229
ClearModuleList, add this:
230
230
231
- AddModule mod_php5 .c
231
+ AddModule mod_php7 .c
232
232
233
233
16. Tell Apache to parse certain extensions as PHP. For example,
234
234
let's have Apache parse the .php extension as PHP. You could
@@ -263,8 +263,8 @@ Apache 1.3.x on Unix systems
263
263
264
264
10. cd ../apache_1.3.x
265
265
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
268
268
stage. It isn't supposed to. It will be created.)
269
269
270
270
12. make
@@ -309,24 +309,24 @@ stop and start:
309
309
Different examples of compiling PHP for apache are as follows:
310
310
./configure --with-apxs --with-pgsql
311
311
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
313
313
using a LoadModule line in Apache's httpd.conf file. The PostgreSQL
314
314
support is embedded into this library.
315
315
316
316
./configure --with-apxs --with-pgsql=shared
317
317
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
319
319
also create a pgsql.so shared library that is loaded into PHP either by
320
320
using the extension directive in php.ini file or by loading it
321
321
explicitly in a script using the dl() function.
322
322
323
323
./configure --with-apache=/path/to/apache_source --with-pgsql
324
324
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
327
327
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
330
330
binary. The PostgreSQL support is included directly into this httpd
331
331
binary, so the final result here is a single httpd binary that includes
332
332
all of Apache and all of PHP.
@@ -450,7 +450,7 @@ cp php.ini-development /usr/local/lib/php.ini
450
450
hand side of the LoadModule statement must point to the path of the
451
451
PHP module on your system. The make install from above may have
452
452
already added this for you, but be sure to check.
453
- LoadModule php5_module modules/libphp5 .so
453
+ LoadModule php7_module modules/libphp7 .so
454
454
8. Tell Apache to parse certain extensions as PHP. For example, let's
455
455
have Apache parse .php files as PHP. Instead of only using the
456
456
Apache AddType directive, we want to avoid potentially dangerous
@@ -461,7 +461,7 @@ LoadModule php5_module modules/libphp5.so
461
461
<FilesMatch \.php$>
462
462
SetHandler application/x-httpd-php
463
463
</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 ,
465
465
and .phtml files to be executed as PHP, but nothing else, we'd use
466
466
this:
467
467
<FilesMatch "\.ph(p[2-6]?|tml)$">
@@ -1004,16 +1004,16 @@ Debian GNU/Linux installation notes
1004
1004
Using APT
1005
1005
1006
1006
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.
1008
1008
1009
1009
Second, before installing a package, it's wise to ensure the package
1010
1010
list is up to date. Typically, this is done by running the command
1011
1011
apt-get update.
1012
1012
1013
1013
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
1015
1015
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
1017
1017
its dependencies, and then activate it. Apache should be restarted in
1018
1018
order for the changes take place. For example:
1019
1019
@@ -1027,23 +1027,23 @@ Better control of configuration
1027
1027
very likely that additional modules will be desired, such as MySQL,
1028
1028
cURL, GD, etc. These may also be installed via the apt-get command.
1029
1029
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
1034
1034
1035
1035
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
1037
1037
and install them like any other with either apt-get or aptitude. And
1038
1038
because Debian performs dependency checks, it'll prompt for those so
1039
1039
for example to install MySQL and cURL:
1040
1040
1041
1041
Example #4 Install PHP with MySQL, cURL
1042
- # apt-get install php5 -mysql php5 -curl
1042
+ # apt-get install php7 -mysql php7 -curl
1043
1043
1044
1044
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
1047
1047
entries similar to extension=foo.so. However, restarting the web server
1048
1048
(like Apache) is required before these changes take affect.
1049
1049
@@ -1137,9 +1137,9 @@ Using the bundled PHP
1137
1137
2. With a text editor, uncomment the lines (by removing the #) that
1138
1138
look similar to the following (these two lines are often not
1139
1139
together, locate them both in the file):
1140
- # LoadModule php5_module libexec/httpd/libphp5 .so
1140
+ # LoadModule php7_module libexec/httpd/libphp7 .so
1141
1141
1142
- # AddModule mod_php5 .c
1142
+ # AddModule mod_php7 .c
1143
1143
1144
1144
Notice the location/path. When building PHP in the future, the
1145
1145
above files should be replaced or commented out.
@@ -1148,7 +1148,7 @@ Using the bundled PHP
1148
1148
Due to the following statement already existing in httpd.conf (as
1149
1149
of Mac Panther), once PHP is enabled the .php files will
1150
1150
automatically parse as PHP.
1151
- <IfModule mod_php5 .c>
1151
+ <IfModule mod_php7 .c>
1152
1152
# If php is turned on, we respect .php and .phps files.
1153
1153
AddType application/x-httpd-php .php
1154
1154
AddType application/x-httpd-php-source .phps
@@ -1740,7 +1740,7 @@ Running PHP as an Apache module
1740
1740
php_admin_flag can not be overridden by .htaccess or ini_set().
1741
1741
1742
1742
Example #1 Apache configuration example
1743
- <IfModule mod_php5 .c>
1743
+ <IfModule mod_php7 .c>
1744
1744
php_value include_path ".:/usr/local/lib/php"
1745
1745
php_admin_flag engine on
1746
1746
</IfModule>
@@ -1810,7 +1810,7 @@ Installation
1810
1810
script file via my browser, I get a server 500 error.
1811
1811
8. Some operating systems: I have installed PHP without errors, but
1812
1812
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:
1814
1814
/usr/local/apache/bin/httpd Undefined symbols: _compress
1815
1815
_uncompress
1816
1816
9. Windows: I have installed PHP, but when I try to access a PHP
@@ -1912,7 +1912,7 @@ AddModule mod_perl.c
1912
1912
1913
1913
# Extra Modules
1914
1914
LoadModule php_module modules/mod_php.so
1915
- LoadModule php5_module modules/libphp5 .so
1915
+ LoadModule php7_module modules/libphp7 .so
1916
1916
LoadModule perl_module modules/libperl.so
1917
1917
1918
1918
And add:
@@ -1954,7 +1954,7 @@ AddType application/x-httpd-php .php
1954
1954
Some operating systems: I have installed PHP without errors, but when I
1955
1955
try to start Apache I get undefined symbol errors:
1956
1956
1957
- [mybox:user /src/php5 ] root# apachectl configtest
1957
+ [mybox:user /src/php7 ] root# apachectl configtest
1958
1958
apachectl: /usr/local/apache/bin/httpd Undefined symbols:
1959
1959
_compress
1960
1960
_uncompress
@@ -1984,7 +1984,7 @@ cgi error:
1984
1984
script via the browser again. If it still fails then it could be
1985
1985
one of the following:
1986
1986
1987
- + File permissions on your PHP script, php.exe, php5ts .dll,
1987
+ + File permissions on your PHP script, php.exe, php7ts .dll,
1988
1988
php.ini or any PHP extensions you are trying to load are such
1989
1989
that the anonymous internet user ISUR_<machinename> cannot
1990
1990
access them.
@@ -2103,7 +2103,7 @@ cgi error:
2103
2103
to choose PHP files from URL with no extension. In this case,
2104
2104
replace the line AddType application/x-httpd-php .php with:
2105
2105
2106
- AddHandler php5 -script php
2106
+ AddHandler php7 -script php
2107
2107
AddType text/html php
2108
2108
2109
2109
This solution doesn't work for Apache 1 as PHP module doesn't
0 commit comments