├── .gitignore
├── SOURCES
├── Makefile
├── httpd-fpm.conf
├── macros.php
├── nginx-fpm.conf
├── nginx-php.conf
├── opcache-default.blacklist
├── opcache.ini
├── php-5.3.0-recode.patch
├── php-5.4.0-phpize.patch
├── php-5.6.3-datetests.patch
├── php-5.6.3-embed.patch
├── php-5.6.3-fixheader.patch
├── php-5.6.3-includedir.patch
├── php-5.6.3-ldap_r.patch
├── php-5.6.3-phpinfo.patch
├── php-7.0.0-systzdata-v13.patch
├── php-7.0.14-curltls.patch
├── php-7.0.17-dlopen.patch
├── php-7.0.2-libdb.patch
├── php-fpm-www.conf
├── php-fpm.conf
├── php-fpm.init
├── php-fpm.logrotate
├── php-fpm.service
├── php.conf
├── php.ini
├── php.modconf
└── php.ztsmodconf
└── SPECS
└── php70u.spec
/.gitignore:
--------------------------------------------------------------------------------
1 | BUILD
2 | BUILDROOT
3 | MOCK
4 | RPMS
5 | SOURCES/*.tar.xz
6 | SRPMS
7 |
--------------------------------------------------------------------------------
/SOURCES/Makefile:
--------------------------------------------------------------------------------
1 | # Makefile for source rpm: php
2 | # $Id$
3 | NAME := php
4 | SPECFILE = $(firstword $(wildcard *.spec))
5 | UPSTREAM_CHECKS :=
6 |
7 | define find-makefile-common
8 | for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
9 | endef
10 |
11 | MAKEFILE_COMMON := $(shell $(find-makefile-common))
12 |
13 | ifeq ($(MAKEFILE_COMMON),)
14 | # attempt a checkout
15 | define checkout-makefile-common
16 | test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
17 | endef
18 |
19 | MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
20 | endif
21 |
22 | include $(MAKEFILE_COMMON)
23 |
--------------------------------------------------------------------------------
/SOURCES/httpd-fpm.conf:
--------------------------------------------------------------------------------
1 | # This configuration requires httpd 2.4 with support for UDS (Unix domain
2 | # sockets). This was added upstream in version 2.4.10, and was also backported
3 | # to 2.4.6 in EL7.
4 |
5 | # The following lines prevent .user.ini files from being viewed by Web clients.
6 |
7 | Require all denied
8 |
9 |
10 | # Allow php to handle Multiviews.
11 | AddType text/html .php
12 |
13 | # Add index.php to the list of files that will be served as directory indexes.
14 | DirectoryIndex index.php
15 |
16 | # Enable http authorization headers.
17 | SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
18 |
19 |
20 | SetHandler "proxy:fcgi://127.0.0.1:9000"
21 | #SetHandler "proxy:unix:/run/php-fpm/www.sock|fcgi://localhost"
22 |
23 |
--------------------------------------------------------------------------------
/SOURCES/macros.php:
--------------------------------------------------------------------------------
1 | #
2 | # Interface versions exposed by PHP:
3 | #
4 | %php_core_api @PHP_APIVER@
5 | %php_zend_api @PHP_ZENDVER@
6 | %php_pdo_api @PHP_PDOVER@
7 | %php_version @PHP_VERSION@
8 |
9 | %php_extdir %{_libdir}/php/modules
10 | %php_ztsextdir %{_libdir}/php-zts/modules
11 |
12 | %php_inidir %{_sysconfdir}/php.d
13 | %php_ztsinidir %{_sysconfdir}/php-zts.d
14 |
15 | %php_incldir %{_includedir}/php
16 | %php_ztsincldir %{_includedir}/php-zts/php
17 |
18 | %__php %{_bindir}/php
19 | %__ztsphp %{_bindir}/zts-php
20 |
--------------------------------------------------------------------------------
/SOURCES/nginx-fpm.conf:
--------------------------------------------------------------------------------
1 | # PHP-FPM FastCGI server
2 | # network or unix domain socket configuration
3 |
4 | upstream php-fpm {
5 | server 127.0.0.1:9000;
6 | #server unix:/run/php-fpm/www.sock;
7 | }
8 |
--------------------------------------------------------------------------------
/SOURCES/nginx-php.conf:
--------------------------------------------------------------------------------
1 | # pass the PHP scripts to FastCGI server
2 | #
3 | # See conf.d/php-fpm.conf for socket configuration
4 | #
5 | index index.php index.html index.htm;
6 |
7 | location ~ \.php$ {
8 | try_files $uri =404;
9 | fastcgi_intercept_errors on;
10 | fastcgi_index index.php;
11 | include fastcgi_params;
12 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
13 | fastcgi_pass php-fpm;
14 | }
15 |
--------------------------------------------------------------------------------
/SOURCES/opcache-default.blacklist:
--------------------------------------------------------------------------------
1 | ; The blacklist file is a text file that holds the names of files
2 | ; that should not be accelerated. The file format is to add each filename
3 | ; to a new line. The filename may be a full path or just a file prefix
4 | ; (i.e., /var/www/x blacklists all the files and directories in /var/www
5 | ; that start with 'x'). Line starting with a ; are ignored (comments).
6 | ; Files are usually triggered by one of the following three reasons:
7 | ; 1) Directories that contain auto generated code, like Smarty or ZFW cache.
8 | ; 2) Code that does not work well when accelerated, due to some delayed
9 | ; compile time evaluation.
10 | ; 3) Code that triggers an OPcache bug.
11 |
12 |
--------------------------------------------------------------------------------
/SOURCES/opcache.ini:
--------------------------------------------------------------------------------
1 | ; Enable Zend OPcache extension module
2 | zend_extension=opcache.so
3 |
4 | ; Determines if Zend OPCache is enabled
5 | opcache.enable=1
6 |
7 | ; Determines if Zend OPCache is enabled for the CLI version of PHP
8 | ;opcache.enable_cli=0
9 |
10 | ; The OPcache shared memory storage size.
11 | opcache.memory_consumption=128
12 |
13 | ; The amount of memory for interned strings in Mbytes.
14 | opcache.interned_strings_buffer=8
15 |
16 | ; The maximum number of keys (scripts) in the OPcache hash table.
17 | ; Only numbers between 200 and 100000 are allowed.
18 | opcache.max_accelerated_files=4000
19 |
20 | ; The maximum percentage of "wasted" memory until a restart is scheduled.
21 | ;opcache.max_wasted_percentage=5
22 |
23 | ; When this directive is enabled, the OPcache appends the current working
24 | ; directory to the script key, thus eliminating possible collisions between
25 | ; files with the same name (basename). Disabling the directive improves
26 | ; performance, but may break existing applications.
27 | ;opcache.use_cwd=1
28 |
29 | ; When disabled, you must reset the OPcache manually or restart the
30 | ; webserver for changes to the filesystem to take effect.
31 | ;opcache.validate_timestamps=1
32 |
33 | ; How often (in seconds) to check file timestamps for changes to the shared
34 | ; memory storage allocation. ("1" means validate once per second, but only
35 | ; once per request. "0" means always validate)
36 | ;opcache.revalidate_freq=2
37 |
38 | ; Enables or disables file search in include_path optimization
39 | ;opcache.revalidate_path=0
40 |
41 | ; If disabled, all PHPDoc comments are dropped from the code to reduce the
42 | ; size of the optimized code.
43 | ;opcache.save_comments=1
44 |
45 | ; If enabled, a fast shutdown sequence is used for the accelerated code
46 | ;opcache.fast_shutdown=0
47 |
48 | ; Allow file existence override (file_exists, etc.) performance feature.
49 | ;opcache.enable_file_override=0
50 |
51 | ; A bitmask, where each bit enables or disables the appropriate OPcache
52 | ; passes
53 | ;opcache.optimization_level=0xffffffff
54 |
55 | ;opcache.inherited_hack=1
56 | ;opcache.dups_fix=0
57 |
58 | ; The location of the OPcache blacklist file (wildcards allowed).
59 | ; Each OPcache blacklist file is a text file that holds the names of files
60 | ; that should not be accelerated.
61 | opcache.blacklist_filename=/etc/php.d/opcache*.blacklist
62 |
63 | ; Allows exclusion of large files from being cached. By default all files
64 | ; are cached.
65 | ;opcache.max_file_size=0
66 |
67 | ; Check the cache checksum each N requests.
68 | ; The default value of "0" means that the checks are disabled.
69 | ;opcache.consistency_checks=0
70 |
71 | ; How long to wait (in seconds) for a scheduled restart to begin if the cache
72 | ; is not being accessed.
73 | ;opcache.force_restart_timeout=180
74 |
75 | ; OPcache error_log file name. Empty string assumes "stderr".
76 | ;opcache.error_log=
77 |
78 | ; All OPcache errors go to the Web server log.
79 | ; By default, only fatal errors (level 0) or errors (level 1) are logged.
80 | ; You can also enable warnings (level 2), info messages (level 3) or
81 | ; debug messages (level 4).
82 | ;opcache.log_verbosity_level=1
83 |
84 | ; Preferred Shared Memory back-end. Leave empty and let the system decide.
85 | ;opcache.preferred_memory_model=
86 |
87 | ; Protect the shared memory from unexpected writing during script execution.
88 | ; Useful for internal debugging only.
89 | ;opcache.protect_memory=0
90 |
91 | ; Allows calling OPcache API functions only from PHP scripts which path is
92 | ; started from specified string. The default "" means no restriction
93 | ;opcache.restrict_api=
94 |
95 | ; Enables and sets the second level cache directory.
96 | ; It should improve performance when SHM memory is full, at server restart or
97 | ; SHM reset. The default "" disables file based caching.
98 | ; RPM note : file cache directory must be owned by process owner
99 | ; for mod_php, see /etc/httpd/conf.d/php.conf
100 | ; for php-fpm, see /etc/php-fpm.d/*conf
101 | ;opcache.file_cache=
102 |
103 | ; Enables or disables opcode caching in shared memory.
104 | ;opcache.file_cache_only=0
105 |
106 | ; Enables or disables checksum validation when script loaded from file cache.
107 | ;opcache.file_cache_consistency_checks=1
108 |
109 | ; Enables or disables copying of PHP code (text segment) into HUGE PAGES.
110 | ; This should improve performance, but requires appropriate OS configuration.
111 | ;opcache.huge_code_pages=1
112 |
--------------------------------------------------------------------------------
/SOURCES/php-5.3.0-recode.patch:
--------------------------------------------------------------------------------
1 | diff -up php-5.3.0beta1/ext/recode/config9.m4.recode php-5.3.0beta1/ext/recode/config9.m4
2 | --- php-5.3.0beta1/ext/recode/config9.m4.recode 2008-12-02 00:30:21.000000000 +0100
3 | +++ php-5.3.0beta1/ext/recode/config9.m4 2009-02-28 09:46:50.000000000 +0100
4 | @@ -4,13 +4,6 @@ dnl
5 |
6 | dnl Check for extensions with which Recode can not work
7 | if test "$PHP_RECODE" != "no"; then
8 | - test "$PHP_IMAP" != "no" && recode_conflict="$recode_conflict imap"
9 | -
10 | - if test -n "$MYSQL_LIBNAME"; then
11 | - PHP_CHECK_LIBRARY($MYSQL_LIBNAME, hash_insert, [
12 | - recode_conflict="$recode_conflict mysql"
13 | - ])
14 | - fi
15 |
16 | if test -n "$recode_conflict"; then
17 | AC_MSG_ERROR([recode extension can not be configured together with:$recode_conflict])
18 |
--------------------------------------------------------------------------------
/SOURCES/php-5.4.0-phpize.patch:
--------------------------------------------------------------------------------
1 | --- php-5.4.0RC5/scripts/phpize.in.orig 2012-01-18 17:13:54.018022983 +0100
2 | +++ php-5.4.0RC5/scripts/phpize.in 2012-01-18 17:14:40.614024941 +0100
3 | @@ -162,6 +162,15 @@
4 | $PHP_AUTOHEADER || exit 1
5 | }
6 |
7 | +phpize_check_headers()
8 | +{
9 | + if test ! -f $includedir/main/php.h; then
10 | + echo "Can't find PHP headers in $includedir"
11 | + echo "The php-devel package is required for use of this command."
12 | + exit 1
13 | + fi
14 | +}
15 | +
16 | # Main script
17 |
18 | case "$1" in
19 | @@ -180,12 +189,15 @@
20 |
21 | # Version
22 | --version|-v)
23 | + phpize_check_headers
24 | phpize_print_api_numbers
25 | exit 0
26 | ;;
27 |
28 | # Default
29 | *)
30 | + phpize_check_headers
31 | +
32 | phpize_check_configm4 0
33 |
34 | phpize_check_build_files
35 |
--------------------------------------------------------------------------------
/SOURCES/php-5.6.3-datetests.patch:
--------------------------------------------------------------------------------
1 | --- a/ext/date/tests/bug66985.phpt 2014-10-30 07:32:03.297693403 +0100
2 | +++ b/ext/date/tests/bug66985.phpt 2014-10-30 07:32:45.138877977 +0100
3 | @@ -3,7 +3,7 @@
4 | --FILE--
5 | 3
17 | - [timezone] => Factory
18 | -)
19 | -DateTimeZone Object
20 | -(
21 | [timezone_type] => 3
22 | [timezone] => GB-Eire
23 | )
24 |
--------------------------------------------------------------------------------
/SOURCES/php-5.6.3-embed.patch:
--------------------------------------------------------------------------------
1 | --- php-5.6.3/sapi/embed/config.m4.embed
2 | +++ php-5.6.3/sapi/embed/config.m4
3 | @@ -12,7 +12,8 @@ if test "$PHP_EMBED" != "no"; then
4 | case "$PHP_EMBED" in
5 | yes|shared)
6 | PHP_EMBED_TYPE=shared
7 | - INSTALL_IT="\$(mkinstalldirs) \$(INSTALL_ROOT)\$(prefix)/lib; \$(INSTALL) -m 0755 $SAPI_SHARED \$(INSTALL_ROOT)\$(prefix)/lib"
8 | + EXTRA_LDFLAGS="$EXTRA_LDFLAGS -release \$(PHP_MAJOR_VERSION).\$(PHP_MINOR_VERSION)"
9 | + INSTALL_IT="\$(mkinstalldirs) \$(INSTALL_ROOT)\$(libdir); \$(LIBTOOL) --mode=install \$(INSTALL) -m 0755 \$(OVERALL_TARGET) \$(INSTALL_ROOT)\$(libdir)"
10 | ;;
11 | static)
12 | PHP_EMBED_TYPE=static
13 | diff -up php-5.5.30/scripts/php-config.in.old php-5.5.30/scripts/php-config.in
14 | --- php-5.5.30/scripts/php-config.in.old 2015-10-19 15:17:31.944747715 +0200
15 | +++ php-5.5.30/scripts/php-config.in 2015-10-19 15:17:58.278858083 +0200
16 | @@ -18,7 +18,7 @@ exe_extension="@EXEEXT@"
17 | php_cli_binary=NONE
18 | php_cgi_binary=NONE
19 | configure_options="@CONFIGURE_OPTIONS@"
20 | -php_sapis="@PHP_INSTALLED_SAPIS@"
21 | +php_sapis="apache2handler embed fpm @PHP_INSTALLED_SAPIS@"
22 |
23 | # Set php_cli_binary and php_cgi_binary if available
24 | for sapi in $php_sapis; do
25 |
--------------------------------------------------------------------------------
/SOURCES/php-5.6.3-fixheader.patch:
--------------------------------------------------------------------------------
1 |
2 | Make generated php_config.h constant across rebuilds.
3 |
4 | --- php-5.4.9/configure.in.fixheader
5 | +++ php-5.4.9/configure.in
6 | @@ -1275,7 +1275,7 @@ fi
7 | EXTRA_LDFLAGS="$EXTRA_LDFLAGS $PHP_LDFLAGS"
8 | EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $PHP_LDFLAGS"
9 |
10 | -PHP_BUILD_DATE=`date '+%Y-%m-%d'`
11 | +PHP_BUILD_DATE=`date '+%Y-%m-%d' -r $srcdir/NEWS`
12 | AC_DEFINE_UNQUOTED(PHP_BUILD_DATE,"$PHP_BUILD_DATE",[PHP build date])
13 |
14 | case $host_alias in
15 | @@ -1286,7 +1286,7 @@ case $host_alias in
16 | AC_DEFINE_UNQUOTED(PHP_UNAME,"$PHP_UNAME",[hardcode for each of the cross compiler host])
17 | ;;
18 | *)
19 | - PHP_UNAME=`uname -a | xargs`
20 | + PHP_UNAME=`uname | xargs`
21 | AC_DEFINE_UNQUOTED(PHP_UNAME,"$PHP_UNAME",[uname -a output])
22 | PHP_OS=`uname | xargs`
23 | AC_DEFINE_UNQUOTED(PHP_OS,"$PHP_OS",[uname output])
24 |
--------------------------------------------------------------------------------
/SOURCES/php-5.6.3-includedir.patch:
--------------------------------------------------------------------------------
1 | --- php-5.2.0/configure.in.includedir
2 | +++ php-5.2.0/configure.in
3 | @@ -1242,7 +1242,7 @@
4 | EXPANDED_DATADIR=$datadir
5 | EXPANDED_PHP_CONFIG_FILE_PATH=`eval echo "$PHP_CONFIG_FILE_PATH"`
6 | EXPANDED_PHP_CONFIG_FILE_SCAN_DIR=`eval echo "$PHP_CONFIG_FILE_SCAN_DIR"`
7 | -INCLUDE_PATH=.:$EXPANDED_PEAR_INSTALLDIR
8 | +INCLUDE_PATH=.:$EXPANDED_PEAR_INSTALLDIR:${EXPANDED_DATADIR}/php
9 |
10 | exec_prefix=$old_exec_prefix
11 | libdir=$old_libdir
12 |
--------------------------------------------------------------------------------
/SOURCES/php-5.6.3-ldap_r.patch:
--------------------------------------------------------------------------------
1 |
2 | Use -lldap_r by default.
3 |
4 | --- php-5.4.8/ext/ldap/config.m4.ldap_r
5 | +++ php-5.4.8/ext/ldap/config.m4
6 | @@ -117,7 +117,10 @@ if test "$PHP_LDAP" != "no"; then
7 | LDAP_PTHREAD=
8 | fi
9 |
10 | - if test -f $LDAP_LIBDIR/liblber.a || test -f $LDAP_LIBDIR/liblber.$SHLIB_SUFFIX_NAME; then
11 | + if test -f $LDAP_LIBDIR/libldap_r.$SHLIB_SUFFIX_NAME; then
12 | + PHP_ADD_LIBRARY_WITH_PATH(lber, $LDAP_LIBDIR, LDAP_SHARED_LIBADD)
13 | + PHP_ADD_LIBRARY_WITH_PATH(ldap_r, $LDAP_LIBDIR, LDAP_SHARED_LIBADD)
14 | + elif test -f $LDAP_LIBDIR/liblber.a || test -f $LDAP_LIBDIR/liblber.$SHLIB_SUFFIX_NAME; then
15 | PHP_ADD_LIBRARY_WITH_PATH(lber, $LDAP_LIBDIR, LDAP_SHARED_LIBADD)
16 | PHP_ADD_LIBRARY_WITH_PATH(ldap, $LDAP_LIBDIR, LDAP_SHARED_LIBADD)
17 |
18 |
--------------------------------------------------------------------------------
/SOURCES/php-5.6.3-phpinfo.patch:
--------------------------------------------------------------------------------
1 |
2 | Drop "Configure Command" from phpinfo as it doesn't
3 | provide any useful information.
4 | The available extensions are not related to this command.
5 |
6 | --- php-5.4.9/ext/standard/info.c.orig 2012-12-11 10:43:02.450578276 +0100
7 | +++ php-5.4.9/ext/standard/info.c 2012-12-11 10:44:12.530820821 +0100
8 | @@ -743,9 +743,6 @@
9 | #ifdef ARCHITECTURE
10 | php_info_print_table_row(2, "Architecture", ARCHITECTURE);
11 | #endif
12 | -#ifdef CONFIGURE_COMMAND
13 | - php_info_print_table_row(2, "Configure Command", CONFIGURE_COMMAND );
14 | -#endif
15 |
16 | if (sapi_module.pretty_name) {
17 | php_info_print_table_row(2, "Server API", sapi_module.pretty_name );
18 | --- php-5.4.9/ext/standard/tests/general_functions/phpinfo.phpt.orig 2012-12-11 11:07:26.959156091 +0100
19 | +++ php-5.4.9/ext/standard/tests/general_functions/phpinfo.phpt 2012-12-11 11:07:30.899170970 +0100
20 | @@ -20,7 +20,6 @@
21 |
22 | System => %s
23 | Build Date => %s%a
24 | -Configure Command => %s
25 | Server API => Command Line Interface
26 | Virtual Directory Support => %s
27 | Configuration File (php.ini) Path => %s
28 |
--------------------------------------------------------------------------------
/SOURCES/php-7.0.0-systzdata-v13.patch:
--------------------------------------------------------------------------------
1 | Add support for use of the system timezone database, rather
2 | than embedding a copy. Discussed upstream but was not desired.
3 |
4 | History:
5 | r13: adapt for upstream changes to use PHP allocator
6 | r12: adapt for upstream changes for new zic
7 | r11: use canonical names to avoid more case sensitivity issues
8 | round lat/long from zone.tab towards zero per builtin db
9 | r10: make timezone case insensitive
10 | r9: fix another compile error without --with-system-tzdata configured (Michael Heimpold)
11 | r8: fix compile error without --with-system-tzdata configured
12 | r7: improve check for valid timezone id to exclude directories
13 | r6: fix fd leak in r5, fix country code/BC flag use in
14 | timezone_identifiers_list() using system db,
15 | fix use of PECL timezonedb to override system db,
16 | r5: reverts addition of "System/Localtime" fake tzname.
17 | updated for 5.3.0, parses zone.tab to pick up mapping between
18 | timezone name, country code and long/lat coords
19 | r4: added "System/Localtime" tzname which uses /etc/localtime
20 | r3: fix a crash if /usr/share/zoneinfo doesn't exist (Raphael Geissert)
21 | r2: add filesystem trawl to set up name alias index
22 | r1: initial revision
23 |
24 | diff -up php-7.0.0RC1/ext/date/lib/parse_tz.c.systzdata php-7.0.0RC1/ext/date/lib/parse_tz.c
25 | --- php-7.0.0RC1/ext/date/lib/parse_tz.c.systzdata 2015-08-18 23:39:24.000000000 +0200
26 | +++ php-7.0.0RC1/ext/date/lib/parse_tz.c 2015-08-22 07:54:38.097258458 +0200
27 | @@ -20,6 +20,16 @@
28 |
29 | #include "timelib.h"
30 |
31 | +#ifdef HAVE_SYSTEM_TZDATA
32 | +#include
33 | +#include
34 | +#include
35 | +#include
36 | +#include
37 | +
38 | +#include "php_scandir.h"
39 | +#endif
40 | +
41 | #include
42 |
43 | #ifdef HAVE_LOCALE_H
44 | @@ -32,8 +42,12 @@
45 | #include
46 | #endif
47 |
48 | +#ifndef HAVE_SYSTEM_TZDATA
49 | #define TIMELIB_SUPPORTS_V2DATA
50 | #include "timezonedb.h"
51 | +#endif
52 | +
53 | +#include
54 |
55 | #if (defined(__APPLE__) || defined(__APPLE_CC__)) && (defined(__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__))
56 | # if defined(__LITTLE_ENDIAN__)
57 | @@ -55,6 +69,11 @@ static int read_preamble(const unsigned
58 | {
59 | uint32_t version;
60 |
61 | + if (memcmp(*tzf, "TZif", 4) == 0) {
62 | + *tzf += 20;
63 | + return 0;
64 | + }
65 | +
66 | /* read ID */
67 | version = (*tzf)[3] - '0';
68 | *tzf += 4;
69 | @@ -298,7 +317,418 @@ void timelib_dump_tzinfo(timelib_tzinfo
70 | }
71 | }
72 |
73 | -static int seek_to_tz_position(const unsigned char **tzf, char *timezone, const timelib_tzdb *tzdb)
74 | +#ifdef HAVE_SYSTEM_TZDATA
75 | +
76 | +#ifdef HAVE_SYSTEM_TZDATA_PREFIX
77 | +#define ZONEINFO_PREFIX HAVE_SYSTEM_TZDATA_PREFIX
78 | +#else
79 | +#define ZONEINFO_PREFIX "/usr/share/zoneinfo"
80 | +#endif
81 | +
82 | +/* System timezone database pointer. */
83 | +static const timelib_tzdb *timezonedb_system;
84 | +
85 | +/* Hash table entry for the cache of the zone.tab mapping table. */
86 | +struct location_info {
87 | + char code[2];
88 | + double latitude, longitude;
89 | + char name[64];
90 | + char *comment;
91 | + struct location_info *next;
92 | +};
93 | +
94 | +/* Cache of zone.tab. */
95 | +static struct location_info **system_location_table;
96 | +
97 | +/* Size of the zone.tab hash table; a random-ish prime big enough to
98 | + * prevent too many collisions. */
99 | +#define LOCINFO_HASH_SIZE (1021)
100 | +
101 | +/* Compute a case insensitive hash of str */
102 | +static uint32_t tz_hash(const char *str)
103 | +{
104 | + const unsigned char *p = (const unsigned char *)str;
105 | + uint32_t hash = 5381;
106 | + int c;
107 | +
108 | + while ((c = tolower(*p++)) != '\0') {
109 | + hash = (hash << 5) ^ hash ^ c;
110 | + }
111 | +
112 | + return hash % LOCINFO_HASH_SIZE;
113 | +}
114 | +
115 | +/* Parse an ISO-6709 date as used in zone.tab. Returns end of the
116 | + * parsed string on success, or NULL on parse error. On success,
117 | + * writes the parsed number to *result. */
118 | +static char *parse_iso6709(char *p, double *result)
119 | +{
120 | + double v, sign;
121 | + char *pend;
122 | + size_t len;
123 | +
124 | + if (*p == '+')
125 | + sign = 1.0;
126 | + else if (*p == '-')
127 | + sign = -1.0;
128 | + else
129 | + return NULL;
130 | +
131 | + p++;
132 | + for (pend = p; *pend >= '0' && *pend <= '9'; pend++)
133 | + ;;
134 | +
135 | + /* Annoying encoding used by zone.tab has no decimal point, so use
136 | + * the length to determine the format:
137 | + *
138 | + * 4 = DDMM
139 | + * 5 = DDDMM
140 | + * 6 = DDMMSS
141 | + * 7 = DDDMMSS
142 | + */
143 | + len = pend - p;
144 | + if (len < 4 || len > 7) {
145 | + return NULL;
146 | + }
147 | +
148 | + /* p => [D]DD */
149 | + v = (p[0] - '0') * 10.0 + (p[1] - '0');
150 | + p += 2;
151 | + if (len == 5 || len == 7)
152 | + v = v * 10.0 + (*p++ - '0');
153 | + /* p => MM[SS] */
154 | + v += (10.0 * (p[0] - '0')
155 | + + p[1] - '0') / 60.0;
156 | + p += 2;
157 | + /* p => [SS] */
158 | + if (len > 5) {
159 | + v += (10.0 * (p[0] - '0')
160 | + + p[1] - '0') / 3600.0;
161 | + p += 2;
162 | + }
163 | +
164 | + /* Round to five decimal place, not because it's a good idea,
165 | + * but, because the builtin data uses rounded data, so, match
166 | + * that. */
167 | + *result = trunc(v * sign * 100000.0) / 100000.0;
168 | +
169 | + return p;
170 | +}
171 | +
172 | +/* This function parses the zone.tab file to build up the mapping of
173 | + * timezone to country code and geographic location, and returns a
174 | + * hash table. The hash table is indexed by the function:
175 | + *
176 | + * tz_hash(timezone-name)
177 | + */
178 | +static struct location_info **create_location_table(void)
179 | +{
180 | + struct location_info **li, *i;
181 | + char zone_tab[PATH_MAX];
182 | + char line[512];
183 | + FILE *fp;
184 | +
185 | + strncpy(zone_tab, ZONEINFO_PREFIX "/zone.tab", sizeof zone_tab);
186 | +
187 | + fp = fopen(zone_tab, "r");
188 | + if (!fp) {
189 | + return NULL;
190 | + }
191 | +
192 | + li = calloc(LOCINFO_HASH_SIZE, sizeof *li);
193 | +
194 | + while (fgets(line, sizeof line, fp)) {
195 | + char *p = line, *code, *name, *comment;
196 | + uint32_t hash;
197 | + double latitude, longitude;
198 | +
199 | + while (isspace(*p))
200 | + p++;
201 | +
202 | + if (*p == '#' || *p == '\0' || *p == '\n')
203 | + continue;
204 | +
205 | + if (!isalpha(p[0]) || !isalpha(p[1]) || p[2] != '\t')
206 | + continue;
207 | +
208 | + /* code => AA */
209 | + code = p;
210 | + p[2] = 0;
211 | + p += 3;
212 | +
213 | + /* coords => [+-][D]DDMM[SS][+-][D]DDMM[SS] */
214 | + p = parse_iso6709(p, &latitude);
215 | + if (!p) {
216 | + continue;
217 | + }
218 | + p = parse_iso6709(p, &longitude);
219 | + if (!p) {
220 | + continue;
221 | + }
222 | +
223 | + if (!p || *p != '\t') {
224 | + continue;
225 | + }
226 | +
227 | + /* name = string */
228 | + name = ++p;
229 | + while (*p != '\t' && *p && *p != '\n')
230 | + p++;
231 | +
232 | + *p++ = '\0';
233 | +
234 | + /* comment = string */
235 | + comment = p;
236 | + while (*p != '\t' && *p && *p != '\n')
237 | + p++;
238 | +
239 | + if (*p == '\n' || *p == '\t')
240 | + *p = '\0';
241 | +
242 | + hash = tz_hash(name);
243 | + i = malloc(sizeof *i);
244 | + memcpy(i->code, code, 2);
245 | + strncpy(i->name, name, sizeof i->name);
246 | + i->comment = strdup(comment);
247 | + i->longitude = longitude;
248 | + i->latitude = latitude;
249 | + i->next = li[hash];
250 | + li[hash] = i;
251 | + /* printf("%s [%u, %f, %f]\n", name, hash, latitude, longitude); */
252 | + }
253 | +
254 | + fclose(fp);
255 | +
256 | + return li;
257 | +}
258 | +
259 | +/* Return location info from hash table, using given timezone name.
260 | + * Returns NULL if the name could not be found. */
261 | +const struct location_info *find_zone_info(struct location_info **li,
262 | + const char *name)
263 | +{
264 | + uint32_t hash = tz_hash(name);
265 | + const struct location_info *l;
266 | +
267 | + if (!li) {
268 | + return NULL;
269 | + }
270 | +
271 | + for (l = li[hash]; l; l = l->next) {
272 | + if (strcasecmp(l->name, name) == 0)
273 | + return l;
274 | + }
275 | +
276 | + return NULL;
277 | +}
278 | +
279 | +/* Filter out some non-tzdata files and the posix/right databases, if
280 | + * present. */
281 | +static int index_filter(const struct dirent *ent)
282 | +{
283 | + return strcmp(ent->d_name, ".") != 0
284 | + && strcmp(ent->d_name, "..") != 0
285 | + && strcmp(ent->d_name, "posix") != 0
286 | + && strcmp(ent->d_name, "posixrules") != 0
287 | + && strcmp(ent->d_name, "right") != 0
288 | + && strstr(ent->d_name, ".tab") == NULL;
289 | +}
290 | +
291 | +static int sysdbcmp(const void *first, const void *second)
292 | +{
293 | + const timelib_tzdb_index_entry *alpha = first, *beta = second;
294 | +
295 | + return strcasecmp(alpha->id, beta->id);
296 | +}
297 | +
298 | +
299 | +/* Create the zone identifier index by trawling the filesystem. */
300 | +static void create_zone_index(timelib_tzdb *db)
301 | +{
302 | + size_t dirstack_size, dirstack_top;
303 | + size_t index_size, index_next;
304 | + timelib_tzdb_index_entry *db_index;
305 | + char **dirstack;
306 | +
307 | + /* LIFO stack to hold directory entries to scan; each slot is a
308 | + * directory name relative to the zoneinfo prefix. */
309 | + dirstack_size = 32;
310 | + dirstack = malloc(dirstack_size * sizeof *dirstack);
311 | + dirstack_top = 1;
312 | + dirstack[0] = strdup("");
313 | +
314 | + /* Index array. */
315 | + index_size = 64;
316 | + db_index = malloc(index_size * sizeof *db_index);
317 | + index_next = 0;
318 | +
319 | + do {
320 | + struct dirent **ents;
321 | + char name[PATH_MAX], *top;
322 | + int count;
323 | +
324 | + /* Pop the top stack entry, and iterate through its contents. */
325 | + top = dirstack[--dirstack_top];
326 | + snprintf(name, sizeof name, ZONEINFO_PREFIX "/%s", top);
327 | +
328 | + count = php_scandir(name, &ents, index_filter, php_alphasort);
329 | +
330 | + while (count > 0) {
331 | + struct stat st;
332 | + const char *leaf = ents[count - 1]->d_name;
333 | +
334 | + snprintf(name, sizeof name, ZONEINFO_PREFIX "/%s/%s",
335 | + top, leaf);
336 | +
337 | + if (strlen(name) && stat(name, &st) == 0) {
338 | + /* Name, relative to the zoneinfo prefix. */
339 | + const char *root = top;
340 | +
341 | + if (root[0] == '/') root++;
342 | +
343 | + snprintf(name, sizeof name, "%s%s%s", root,
344 | + *root ? "/": "", leaf);
345 | +
346 | + if (S_ISDIR(st.st_mode)) {
347 | + if (dirstack_top == dirstack_size) {
348 | + dirstack_size *= 2;
349 | + dirstack = realloc(dirstack,
350 | + dirstack_size * sizeof *dirstack);
351 | + }
352 | + dirstack[dirstack_top++] = strdup(name);
353 | + }
354 | + else {
355 | + if (index_next == index_size) {
356 | + index_size *= 2;
357 | + db_index = realloc(db_index,
358 | + index_size * sizeof *db_index);
359 | + }
360 | +
361 | + db_index[index_next++].id = strdup(name);
362 | + }
363 | + }
364 | +
365 | + free(ents[--count]);
366 | + }
367 | +
368 | + if (count != -1) free(ents);
369 | + free(top);
370 | + } while (dirstack_top);
371 | +
372 | + qsort(db_index, index_next, sizeof *db_index, sysdbcmp);
373 | +
374 | + db->index = db_index;
375 | + db->index_size = index_next;
376 | +
377 | + free(dirstack);
378 | +}
379 | +
380 | +#define FAKE_HEADER "1234\0??\1??"
381 | +#define FAKE_UTC_POS (7 - 4)
382 | +
383 | +/* Create a fake data segment for database 'sysdb'. */
384 | +static void fake_data_segment(timelib_tzdb *sysdb,
385 | + struct location_info **info)
386 | +{
387 | + size_t n;
388 | + char *data, *p;
389 | +
390 | + data = malloc(3 * sysdb->index_size + 7);
391 | +
392 | + p = mempcpy(data, FAKE_HEADER, sizeof(FAKE_HEADER) - 1);
393 | +
394 | + for (n = 0; n < sysdb->index_size; n++) {
395 | + const struct location_info *li;
396 | + timelib_tzdb_index_entry *ent;
397 | +
398 | + ent = (timelib_tzdb_index_entry *)&sysdb->index[n];
399 | +
400 | + /* Lookup the timezone name in the hash table. */
401 | + if (strcmp(ent->id, "UTC") == 0) {
402 | + ent->pos = FAKE_UTC_POS;
403 | + continue;
404 | + }
405 | +
406 | + li = find_zone_info(info, ent->id);
407 | + if (li) {
408 | + /* If found, append the BC byte and the
409 | + * country code; set the position for this
410 | + * section of timezone data. */
411 | + ent->pos = (p - data) - 4;
412 | + *p++ = '\1';
413 | + *p++ = li->code[0];
414 | + *p++ = li->code[1];
415 | + }
416 | + else {
417 | + /* If not found, the timezone data can
418 | + * point at the header. */
419 | + ent->pos = 0;
420 | + }
421 | + }
422 | +
423 | + sysdb->data = (unsigned char *)data;
424 | +}
425 | +
426 | +/* Returns true if the passed-in stat structure describes a
427 | + * probably-valid timezone file. */
428 | +static int is_valid_tzfile(const struct stat *st)
429 | +{
430 | + return S_ISREG(st->st_mode) && st->st_size > 20;
431 | +}
432 | +
433 | +/* To allow timezone names to be used case-insensitively, find the
434 | + * canonical name for this timezone, if possible. */
435 | +static const char *canonical_tzname(const char *timezone)
436 | +{
437 | + if (timezonedb_system) {
438 | + timelib_tzdb_index_entry *ent, lookup;
439 | +
440 | + lookup.id = (char *)timezone;
441 | +
442 | + ent = bsearch(&lookup, timezonedb_system->index,
443 | + timezonedb_system->index_size, sizeof lookup,
444 | + sysdbcmp);
445 | + if (ent) {
446 | + return ent->id;
447 | + }
448 | + }
449 | +
450 | + return timezone;
451 | +}
452 | +
453 | +/* Return the mmap()ed tzfile if found, else NULL. On success, the
454 | + * length of the mapped data is placed in *length. */
455 | +static char *map_tzfile(const char *timezone, size_t *length)
456 | +{
457 | + char fname[PATH_MAX];
458 | + struct stat st;
459 | + char *p;
460 | + int fd;
461 | +
462 | + if (timezone[0] == '\0' || strstr(timezone, "..") != NULL) {
463 | + return NULL;
464 | + }
465 | +
466 | + snprintf(fname, sizeof fname, ZONEINFO_PREFIX "/%s", canonical_tzname(timezone));
467 | +
468 | + fd = open(fname, O_RDONLY);
469 | + if (fd == -1) {
470 | + return NULL;
471 | + } else if (fstat(fd, &st) != 0 || !is_valid_tzfile(&st)) {
472 | + close(fd);
473 | + return NULL;
474 | + }
475 | +
476 | + *length = st.st_size;
477 | + p = mmap(NULL, st.st_size, PROT_READ, MAP_SHARED, fd, 0);
478 | + close(fd);
479 | +
480 | + return p != MAP_FAILED ? p : NULL;
481 | +}
482 | +
483 | +#endif
484 | +
485 | +static int inmem_seek_to_tz_position(const unsigned char **tzf, char *timezone, const timelib_tzdb *tzdb)
486 | {
487 | int left = 0, right = tzdb->index_size - 1;
488 | #ifdef HAVE_SETLOCALE
489 | @@ -337,21 +767,88 @@ static int seek_to_tz_position(const uns
490 | return 0;
491 | }
492 |
493 | +static int seek_to_tz_position(const unsigned char **tzf, char *timezone,
494 | + char **map, size_t *maplen,
495 | + const timelib_tzdb *tzdb)
496 | +{
497 | +#ifdef HAVE_SYSTEM_TZDATA
498 | + if (tzdb == timezonedb_system) {
499 | + char *orig;
500 | +
501 | + orig = map_tzfile(timezone, maplen);
502 | + if (orig == NULL) {
503 | + return 0;
504 | + }
505 | +
506 | + (*tzf) = (unsigned char *)orig;
507 | + *map = orig;
508 | + return 1;
509 | + }
510 | + else
511 | +#endif
512 | + {
513 | + return inmem_seek_to_tz_position(tzf, timezone, tzdb);
514 | + }
515 | +}
516 | +
517 | const timelib_tzdb *timelib_builtin_db(void)
518 | {
519 | +#ifdef HAVE_SYSTEM_TZDATA
520 | + if (timezonedb_system == NULL) {
521 | + timelib_tzdb *tmp = malloc(sizeof *tmp);
522 | +
523 | + tmp->version = "0.system";
524 | + tmp->data = NULL;
525 | + create_zone_index(tmp);
526 | + system_location_table = create_location_table();
527 | + fake_data_segment(tmp, system_location_table);
528 | + timezonedb_system = tmp;
529 | + }
530 | +
531 | + return timezonedb_system;
532 | +#else
533 | return &timezonedb_builtin;
534 | +#endif
535 | }
536 |
537 | const timelib_tzdb_index_entry *timelib_timezone_builtin_identifiers_list(int *count)
538 | {
539 | +#ifdef HAVE_SYSTEM_TZDATA
540 | + *count = timezonedb_system->index_size;
541 | + return timezonedb_system->index;
542 | +#else
543 | *count = sizeof(timezonedb_idx_builtin) / sizeof(*timezonedb_idx_builtin);
544 | return timezonedb_idx_builtin;
545 | +#endif
546 | }
547 |
548 | int timelib_timezone_id_is_valid(char *timezone, const timelib_tzdb *tzdb)
549 | {
550 | const unsigned char *tzf;
551 | - return (seek_to_tz_position(&tzf, timezone, tzdb));
552 | +
553 | +#ifdef HAVE_SYSTEM_TZDATA
554 | + if (tzdb == timezonedb_system) {
555 | + char fname[PATH_MAX];
556 | + struct stat st;
557 | +
558 | + if (timezone[0] == '\0' || strstr(timezone, "..") != NULL) {
559 | + return 0;
560 | + }
561 | +
562 | + if (system_location_table) {
563 | + if (find_zone_info(system_location_table, timezone) != NULL) {
564 | + /* found in cache */
565 | + return 1;
566 | + }
567 | + }
568 | +
569 | + snprintf(fname, sizeof fname, ZONEINFO_PREFIX "/%s", canonical_tzname(timezone));
570 | +
571 | + return stat(fname, &st) == 0 && is_valid_tzfile(&st);
572 | + }
573 | +#endif
574 | +
575 | + return (inmem_seek_to_tz_position(&tzf, timezone, tzdb));
576 | }
577 |
578 | static void skip_64bit_preamble(const unsigned char **tzf, timelib_tzinfo *tz)
579 | @@ -376,24 +873,54 @@ static void read_64bit_header(const unsi
580 | timelib_tzinfo *timelib_parse_tzfile(char *timezone, const timelib_tzdb *tzdb)
581 | {
582 | const unsigned char *tzf;
583 | + char *memmap = NULL;
584 | + size_t maplen;
585 | timelib_tzinfo *tmp;
586 | int version;
587 |
588 | - if (seek_to_tz_position(&tzf, timezone, tzdb)) {
589 | + if (seek_to_tz_position(&tzf, timezone, &memmap, &maplen, tzdb)) {
590 | tmp = timelib_tzinfo_ctor(timezone);
591 |
592 | version = read_preamble(&tzf, tmp);
593 | read_header(&tzf, tmp);
594 | read_transistions(&tzf, tmp);
595 | read_types(&tzf, tmp);
596 | - if (version == 2) {
597 | - skip_64bit_preamble(&tzf, tmp);
598 | - read_64bit_header(&tzf, tmp);
599 | - skip_64bit_transistions(&tzf, tmp);
600 | - skip_64bit_types(&tzf, tmp);
601 | - skip_posix_string(&tzf, tmp);
602 | - }
603 | - read_location(&tzf, tmp);
604 | +
605 | +#ifdef HAVE_SYSTEM_TZDATA
606 | + if (memmap) {
607 | + const struct location_info *li;
608 | +
609 | + /* TZif-style - grok the location info from the system database,
610 | + * if possible. */
611 | +
612 | + if ((li = find_zone_info(system_location_table, timezone)) != NULL) {
613 | + tmp->location.comments = timelib_strdup(li->comment);
614 | + strncpy(tmp->location.country_code, li->code, 2);
615 | + tmp->location.longitude = li->longitude;
616 | + tmp->location.latitude = li->latitude;
617 | + tmp->bc = 1;
618 | + }
619 | + else {
620 | + strcpy(tmp->location.country_code, "??");
621 | + tmp->bc = 0;
622 | + tmp->location.comments = timelib_strdup("");
623 | + }
624 | +
625 | + /* Now done with the mmap segment - discard it. */
626 | + munmap(memmap, maplen);
627 | + } else
628 | +#endif
629 | + {
630 | + /* PHP-style - use the embedded info. */
631 | + if (version == 2) {
632 | + skip_64bit_preamble(&tzf, tmp);
633 | + read_64bit_header(&tzf, tmp);
634 | + skip_64bit_transistions(&tzf, tmp);
635 | + skip_64bit_types(&tzf, tmp);
636 | + skip_posix_string(&tzf, tmp);
637 | + }
638 | + read_location(&tzf, tmp);
639 | + }
640 | } else {
641 | tmp = NULL;
642 | }
643 | diff -up php-7.0.0RC1/ext/date/lib/timelib.m4.systzdata php-7.0.0RC1/ext/date/lib/timelib.m4
644 | --- php-7.0.0RC1/ext/date/lib/timelib.m4.systzdata 2015-08-18 23:39:24.000000000 +0200
645 | +++ php-7.0.0RC1/ext/date/lib/timelib.m4 2015-08-22 07:47:34.854055364 +0200
646 | @@ -78,3 +78,17 @@ stdlib.h
647 |
648 | dnl Check for strtoll, atoll
649 | AC_CHECK_FUNCS(strtoll atoll strftime)
650 | +
651 | +PHP_ARG_WITH(system-tzdata, for use of system timezone data,
652 | +[ --with-system-tzdata[=DIR] to specify use of system timezone data],
653 | +no, no)
654 | +
655 | +if test "$PHP_SYSTEM_TZDATA" != "no"; then
656 | + AC_DEFINE(HAVE_SYSTEM_TZDATA, 1, [Define if system timezone data is used])
657 | +
658 | + if test "$PHP_SYSTEM_TZDATA" != "yes"; then
659 | + AC_DEFINE_UNQUOTED(HAVE_SYSTEM_TZDATA_PREFIX, "$PHP_SYSTEM_TZDATA",
660 | + [Define for location of system timezone data])
661 | + fi
662 | +fi
663 | +
664 |
--------------------------------------------------------------------------------
/SOURCES/php-7.0.14-curltls.patch:
--------------------------------------------------------------------------------
1 | From 0fd03337a2d686e4b55396c5d37dbd43ac311192 Mon Sep 17 00:00:00 2001
2 | From: Carl George
3 | Date: Fri, 23 Dec 2016 20:11:32 -0600
4 | Subject: [PATCH] enable TLS 1.1/1.2 support
5 |
6 | Patch adapted from RHEL7's php-5.4.16-curltls.patch.
7 |
8 | See also:
9 | https://access.redhat.com/blogs/766093/posts/1976123
10 | https://bugzilla.redhat.com/show_bug.cgi?id=1255920
11 | https://bugzilla.redhat.com/show_bug.cgi?id=1291667
12 | https://git.centos.org/blob/rpms!php.git/c7/SOURCES!php-5.4.16-curltls.patch
13 | ---
14 | ext/curl/interface.c | 7 +++----
15 | 1 file changed, 3 insertions(+), 4 deletions(-)
16 |
17 | diff --git a/ext/curl/interface.c b/ext/curl/interface.c
18 | index 65539d1..0f4f38f 100644
19 | --- a/ext/curl/interface.c
20 | +++ b/ext/curl/interface.c
21 | @@ -882,6 +882,9 @@ PHP_MINIT_FUNCTION(curl)
22 | REGISTER_CURL_CONSTANT(CURL_SSLVERSION_SSLv2);
23 | REGISTER_CURL_CONSTANT(CURL_SSLVERSION_SSLv3);
24 | REGISTER_CURL_CONSTANT(CURL_SSLVERSION_TLSv1);
25 | + REGISTER_CURL_CONSTANT(CURL_SSLVERSION_TLSv1_0);
26 | + REGISTER_CURL_CONSTANT(CURL_SSLVERSION_TLSv1_1);
27 | + REGISTER_CURL_CONSTANT(CURL_SSLVERSION_TLSv1_2);
28 |
29 | /* Curl TIMECOND constants (CURLOPT_TIMECONDITION) */
30 | REGISTER_CURL_CONSTANT(CURL_TIMECOND_IFMODSINCE);
31 | @@ -1260,10 +1263,6 @@ PHP_MINIT_FUNCTION(curl)
32 |
33 | #if LIBCURL_VERSION_NUM >= 0x072200 /* Available since 7.34.0 */
34 | REGISTER_CURL_CONSTANT(CURLOPT_LOGIN_OPTIONS);
35 | -
36 | - REGISTER_CURL_CONSTANT(CURL_SSLVERSION_TLSv1_0);
37 | - REGISTER_CURL_CONSTANT(CURL_SSLVERSION_TLSv1_1);
38 | - REGISTER_CURL_CONSTANT(CURL_SSLVERSION_TLSv1_2);
39 | #endif
40 |
41 | #if LIBCURL_VERSION_NUM >= 0x072400 /* Available since 7.36.0 */
42 | --
43 | 2.11.0
44 |
--------------------------------------------------------------------------------
/SOURCES/php-7.0.17-dlopen.patch:
--------------------------------------------------------------------------------
1 | diff -Naurp a/sapi/litespeed/lsapilib.c b/sapi/litespeed/lsapilib.c
2 | --- a/sapi/litespeed/lsapilib.c 2017-03-14 06:26:05.000000000 -0500
3 | +++ b/sapi/litespeed/lsapilib.c 2017-03-15 13:29:59.047187802 -0500
4 | @@ -616,7 +616,7 @@ static int (*fp_lve_leave)(struct liblve
5 | static int (*fp_lve_jail)( struct passwd *, char *) = NULL;
6 | static int lsapi_load_lve_lib()
7 | {
8 | - s_liblve = dlopen("liblve.so.0", RTLD_LAZY);
9 | + s_liblve = dlopen("liblve.so.0", RTLD_NOW);
10 | if (s_liblve)
11 | {
12 | fp_lve_is_available = dlsym(s_liblve, "lve_is_available");
13 | diff -Naurp a/Zend/zend_portability.h b/Zend/zend_portability.h
14 | --- a/Zend/zend_portability.h 2017-03-14 06:26:04.000000000 -0500
15 | +++ b/Zend/zend_portability.h 2017-03-15 13:31:32.183825810 -0500
16 | @@ -146,11 +146,11 @@
17 | # endif
18 |
19 | # if defined(RTLD_GROUP) && defined(RTLD_WORLD) && defined(RTLD_PARENT)
20 | -# define DL_LOAD(libname) dlopen(libname, RTLD_LAZY | RTLD_GLOBAL | RTLD_GROUP | RTLD_WORLD | RTLD_PARENT)
21 | +# define DL_LOAD(libname) dlopen(libname, RTLD_NOW | RTLD_GLOBAL | RTLD_GROUP | RTLD_WORLD | RTLD_PARENT)
22 | # elif defined(RTLD_DEEPBIND) && !defined(__SANITIZE_ADDRESS__)
23 | -# define DL_LOAD(libname) dlopen(libname, RTLD_LAZY | RTLD_GLOBAL | RTLD_DEEPBIND)
24 | +# define DL_LOAD(libname) dlopen(libname, RTLD_NOW | RTLD_GLOBAL | RTLD_DEEPBIND)
25 | # else
26 | -# define DL_LOAD(libname) dlopen(libname, RTLD_LAZY | RTLD_GLOBAL)
27 | +# define DL_LOAD(libname) dlopen(libname, RTLD_NOW | RTLD_GLOBAL)
28 | # endif
29 | # define DL_UNLOAD dlclose
30 | # if defined(DLSYM_NEEDS_UNDERSCORE)
31 |
--------------------------------------------------------------------------------
/SOURCES/php-7.0.2-libdb.patch:
--------------------------------------------------------------------------------
1 | diff -Naurp a/ext/dba/config.m4 b/ext/dba/config.m4
2 | --- a/ext/dba/config.m4 2016-01-06 04:05:14.000000000 -0600
3 | +++ b/ext/dba/config.m4 2016-01-07 13:35:23.661275075 -0600
4 | @@ -312,61 +312,13 @@ if test "$PHP_DB4" != "no"; then
5 | dbdp4="/usr/local/BerkeleyDB.4."
6 | dbdp5="/usr/local/BerkeleyDB.5."
7 | for i in $PHP_DB4 ${dbdp5}1 ${dbdp5}0 ${dbdp4}8 ${dbdp4}7 ${dbdp4}6 ${dbdp4}5 ${dbdp4}4 ${dbdp4}3 ${dbdp4}2 ${dbdp4}1 ${dbdp}0 /usr/local /usr; do
8 | - if test -f "$i/db5/db.h"; then
9 | - THIS_PREFIX=$i
10 | - THIS_INCLUDE=$i/db5/db.h
11 | - break
12 | - elif test -f "$i/db4/db.h"; then
13 | - THIS_PREFIX=$i
14 | - THIS_INCLUDE=$i/db4/db.h
15 | - break
16 | - elif test -f "$i/include/db5.3/db.h"; then
17 | - THIS_PREFIX=$i
18 | - THIS_INCLUDE=$i/include/db5.3/db.h
19 | - break
20 | - elif test -f "$i/include/db5.1/db.h"; then
21 | - THIS_PREFIX=$i
22 | - THIS_INCLUDE=$i/include/db5.1/db.h
23 | - break
24 | - elif test -f "$i/include/db5.0/db.h"; then
25 | - THIS_PREFIX=$i
26 | - THIS_INCLUDE=$i/include/db5.0/db.h
27 | - break
28 | - elif test -f "$i/include/db4.8/db.h"; then
29 | - THIS_PREFIX=$i
30 | - THIS_INCLUDE=$i/include/db4.8/db.h
31 | - break
32 | - elif test -f "$i/include/db4.7/db.h"; then
33 | - THIS_PREFIX=$i
34 | - THIS_INCLUDE=$i/include/db4.7/db.h
35 | - break
36 | - elif test -f "$i/include/db4.6/db.h"; then
37 | - THIS_PREFIX=$i
38 | - THIS_INCLUDE=$i/include/db4.6/db.h
39 | - break
40 | - elif test -f "$i/include/db4.5/db.h"; then
41 | - THIS_PREFIX=$i
42 | - THIS_INCLUDE=$i/include/db4.5/db.h
43 | - break
44 | - elif test -f "$i/include/db4/db.h"; then
45 | - THIS_PREFIX=$i
46 | - THIS_INCLUDE=$i/include/db4/db.h
47 | - break
48 | - elif test -f "$i/include/db/db4.h"; then
49 | - THIS_PREFIX=$i
50 | - THIS_INCLUDE=$i/include/db/db4.h
51 | - break
52 | - elif test -f "$i/include/db4.h"; then
53 | - THIS_PREFIX=$i
54 | - THIS_INCLUDE=$i/include/db4.h
55 | - break
56 | - elif test -f "$i/include/db.h"; then
57 | + if test -f "$i/include/db.h"; then
58 | THIS_PREFIX=$i
59 | THIS_INCLUDE=$i/include/db.h
60 | break
61 | fi
62 | done
63 | - PHP_DBA_DB_CHECK(4, db-5.3 db-5.1 db-5.0 db-4.8 db-4.7 db-4.6 db-4.5 db-4.4 db-4.3 db-4.2 db-4.1 db-4.0 db-4 db4 db, [(void)db_create((DB**)0, (DB_ENV*)0, 0)])
64 | + PHP_DBA_DB_CHECK(4, db, [(void)db_create((DB**)0, (DB_ENV*)0, 0)])
65 | fi
66 | PHP_DBA_STD_RESULT(db4,Berkeley DB4)
67 |
68 | diff -Naurp a/ext/dba/dba.c b/ext/dba/dba.c
69 | --- a/ext/dba/dba.c 2016-01-06 04:05:14.000000000 -0600
70 | +++ b/ext/dba/dba.c 2016-01-07 13:30:37.589342730 -0600
71 | @@ -52,6 +52,10 @@
72 | #include "php_qdbm.h"
73 | #include "php_tcadb.h"
74 |
75 | +#ifdef DB4_INCLUDE_FILE
76 | +#include DB4_INCLUDE_FILE
77 | +#endif
78 | +
79 | /* {{{ arginfo */
80 | ZEND_BEGIN_ARG_INFO_EX(arginfo_dba_popen, 0, 0, 2)
81 | ZEND_ARG_INFO(0, path)
82 | @@ -552,6 +556,10 @@ PHP_MINFO_FUNCTION(dba)
83 |
84 | php_info_print_table_start();
85 | php_info_print_table_row(2, "DBA support", "enabled");
86 | +#ifdef DB_VERSION_STRING
87 | + php_info_print_table_row(2, "libdb header version", DB_VERSION_STRING);
88 | + php_info_print_table_row(2, "libdb library version", db_version(NULL, NULL, NULL));
89 | +#endif
90 | if (handlers.s) {
91 | smart_str_0(&handlers);
92 | php_info_print_table_row(2, "Supported handlers", ZSTR_VAL(handlers.s));
93 |
--------------------------------------------------------------------------------
/SOURCES/php-fpm-www.conf:
--------------------------------------------------------------------------------
1 | ; Start a new pool named 'www'.
2 | ; the variable $pool can we used in any directive and will be replaced by the
3 | ; pool name ('www' here)
4 | [www]
5 |
6 | ; Per pool prefix
7 | ; It only applies on the following directives:
8 | ; - 'access.log'
9 | ; - 'slowlog'
10 | ; - 'listen' (unixsocket)
11 | ; - 'chroot'
12 | ; - 'chdir'
13 | ; - 'php_values'
14 | ; - 'php_admin_values'
15 | ; When not set, the global prefix (or @php_fpm_prefix@) applies instead.
16 | ; Note: This directive can also be relative to the global prefix.
17 | ; Default Value: none
18 | ;prefix = /path/to/pools/$pool
19 |
20 | ; Unix user/group of processes
21 | ; Note: The user is mandatory. If the group is not set, the default user's group
22 | ; will be used.
23 | user = php-fpm
24 | group = php-fpm
25 |
26 | ; The address on which to accept FastCGI requests.
27 | ; Valid syntaxes are:
28 | ; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on
29 | ; a specific port;
30 | ; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on
31 | ; a specific port;
32 | ; 'port' - to listen on a TCP socket to all addresses
33 | ; (IPv6 and IPv4-mapped) on a specific port;
34 | ; '/path/to/unix/socket' - to listen on a unix socket.
35 | ; Note: This value is mandatory.
36 | listen = 127.0.0.1:9000
37 | ; WARNING: If you switch to a unix socket, you have to grant your webserver user
38 | ; access to that socket by setting listen.acl_users to the webserver user.
39 | ;listen = /run/php-fpm/www.sock
40 |
41 | ; Set listen(2) backlog.
42 | ; Default Value: 511
43 | ;listen.backlog = 511
44 |
45 | ; Set permissions for unix socket, if one is used. In Linux, read/write
46 | ; permissions must be set in order to allow connections from a web server.
47 | ; Default Values: user and group are set as the running user
48 | ; mode is set to 0660
49 | ;listen.owner = root
50 | ;listen.group = root
51 | ;listen.mode = 0660
52 |
53 | ; When POSIX Access Control Lists are supported you can set them using
54 | ; these options, value is a comma separated list of user/group names.
55 | ; When set, listen.owner and listen.group are ignored
56 | ;listen.acl_users = apache,nginx
57 | ;listen.acl_users = apache
58 | ;listen.acl_users = nginx
59 | ;listen.acl_groups =
60 |
61 | ; List of addresses (IPv4/IPv6) of FastCGI clients which are allowed to connect.
62 | ; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
63 | ; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
64 | ; must be separated by a comma. If this value is left blank, connections will be
65 | ; accepted from any ip address.
66 | ; Default Value: any
67 | listen.allowed_clients = 127.0.0.1
68 |
69 | ; Specify the nice(2) priority to apply to the pool processes (only if set)
70 | ; The value can vary from -19 (highest priority) to 20 (lower priority)
71 | ; Note: - It will only work if the FPM master process is launched as root
72 | ; - The pool processes will inherit the master process priority
73 | ; unless it specified otherwise
74 | ; Default Value: no set
75 | ; process.priority = -19
76 |
77 | ; Choose how the process manager will control the number of child processes.
78 | ; Possible Values:
79 | ; static - a fixed number (pm.max_children) of child processes;
80 | ; dynamic - the number of child processes are set dynamically based on the
81 | ; following directives. With this process management, there will be
82 | ; always at least 1 children.
83 | ; pm.max_children - the maximum number of children that can
84 | ; be alive at the same time.
85 | ; pm.start_servers - the number of children created on startup.
86 | ; pm.min_spare_servers - the minimum number of children in 'idle'
87 | ; state (waiting to process). If the number
88 | ; of 'idle' processes is less than this
89 | ; number then some children will be created.
90 | ; pm.max_spare_servers - the maximum number of children in 'idle'
91 | ; state (waiting to process). If the number
92 | ; of 'idle' processes is greater than this
93 | ; number then some children will be killed.
94 | ; ondemand - no children are created at startup. Children will be forked when
95 | ; new requests will connect. The following parameter are used:
96 | ; pm.max_children - the maximum number of children that
97 | ; can be alive at the same time.
98 | ; pm.process_idle_timeout - The number of seconds after which
99 | ; an idle process will be killed.
100 | ; Note: This value is mandatory.
101 | pm = dynamic
102 |
103 | ; The number of child processes to be created when pm is set to 'static' and the
104 | ; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.
105 | ; This value sets the limit on the number of simultaneous requests that will be
106 | ; served. Equivalent to the ApacheMaxClients directive with mpm_prefork.
107 | ; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP
108 | ; CGI. The below defaults are based on a server without much resources. Don't
109 | ; forget to tweak pm.* to fit your needs.
110 | ; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'
111 | ; Note: This value is mandatory.
112 | pm.max_children = 50
113 |
114 | ; The number of child processes created on startup.
115 | ; Note: Used only when pm is set to 'dynamic'
116 | ; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
117 | pm.start_servers = 5
118 |
119 | ; The desired minimum number of idle server processes.
120 | ; Note: Used only when pm is set to 'dynamic'
121 | ; Note: Mandatory when pm is set to 'dynamic'
122 | pm.min_spare_servers = 5
123 |
124 | ; The desired maximum number of idle server processes.
125 | ; Note: Used only when pm is set to 'dynamic'
126 | ; Note: Mandatory when pm is set to 'dynamic'
127 | pm.max_spare_servers = 35
128 |
129 | ; The number of seconds after which an idle process will be killed.
130 | ; Note: Used only when pm is set to 'ondemand'
131 | ; Default Value: 10s
132 | ;pm.process_idle_timeout = 10s;
133 |
134 | ; The number of requests each child process should execute before respawning.
135 | ; This can be useful to work around memory leaks in 3rd party libraries. For
136 | ; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
137 | ; Default Value: 0
138 | ;pm.max_requests = 500
139 |
140 | ; The URI to view the FPM status page. If this value is not set, no URI will be
141 | ; recognized as a status page. It shows the following informations:
142 | ; pool - the name of the pool;
143 | ; process manager - static, dynamic or ondemand;
144 | ; start time - the date and time FPM has started;
145 | ; start since - number of seconds since FPM has started;
146 | ; accepted conn - the number of request accepted by the pool;
147 | ; listen queue - the number of request in the queue of pending
148 | ; connections (see backlog in listen(2));
149 | ; max listen queue - the maximum number of requests in the queue
150 | ; of pending connections since FPM has started;
151 | ; listen queue len - the size of the socket queue of pending connections;
152 | ; idle processes - the number of idle processes;
153 | ; active processes - the number of active processes;
154 | ; total processes - the number of idle + active processes;
155 | ; max active processes - the maximum number of active processes since FPM
156 | ; has started;
157 | ; max children reached - number of times, the process limit has been reached,
158 | ; when pm tries to start more children (works only for
159 | ; pm 'dynamic' and 'ondemand');
160 | ; Value are updated in real time.
161 | ; Example output:
162 | ; pool: www
163 | ; process manager: static
164 | ; start time: 01/Jul/2011:17:53:49 +0200
165 | ; start since: 62636
166 | ; accepted conn: 190460
167 | ; listen queue: 0
168 | ; max listen queue: 1
169 | ; listen queue len: 42
170 | ; idle processes: 4
171 | ; active processes: 11
172 | ; total processes: 15
173 | ; max active processes: 12
174 | ; max children reached: 0
175 | ;
176 | ; By default the status page output is formatted as text/plain. Passing either
177 | ; 'html', 'xml' or 'json' in the query string will return the corresponding
178 | ; output syntax. Example:
179 | ; http://www.foo.bar/status
180 | ; http://www.foo.bar/status?json
181 | ; http://www.foo.bar/status?html
182 | ; http://www.foo.bar/status?xml
183 | ;
184 | ; By default the status page only outputs short status. Passing 'full' in the
185 | ; query string will also return status for each pool process.
186 | ; Example:
187 | ; http://www.foo.bar/status?full
188 | ; http://www.foo.bar/status?json&full
189 | ; http://www.foo.bar/status?html&full
190 | ; http://www.foo.bar/status?xml&full
191 | ; The Full status returns for each process:
192 | ; pid - the PID of the process;
193 | ; state - the state of the process (Idle, Running, ...);
194 | ; start time - the date and time the process has started;
195 | ; start since - the number of seconds since the process has started;
196 | ; requests - the number of requests the process has served;
197 | ; request duration - the duration in µs of the requests;
198 | ; request method - the request method (GET, POST, ...);
199 | ; request URI - the request URI with the query string;
200 | ; content length - the content length of the request (only with POST);
201 | ; user - the user (PHP_AUTH_USER) (or '-' if not set);
202 | ; script - the main script called (or '-' if not set);
203 | ; last request cpu - the %cpu the last request consumed
204 | ; it's always 0 if the process is not in Idle state
205 | ; because CPU calculation is done when the request
206 | ; processing has terminated;
207 | ; last request memory - the max amount of memory the last request consumed
208 | ; it's always 0 if the process is not in Idle state
209 | ; because memory calculation is done when the request
210 | ; processing has terminated;
211 | ; If the process is in Idle state, then informations are related to the
212 | ; last request the process has served. Otherwise informations are related to
213 | ; the current request being served.
214 | ; Example output:
215 | ; ************************
216 | ; pid: 31330
217 | ; state: Running
218 | ; start time: 01/Jul/2011:17:53:49 +0200
219 | ; start since: 63087
220 | ; requests: 12808
221 | ; request duration: 1250261
222 | ; request method: GET
223 | ; request URI: /test_mem.php?N=10000
224 | ; content length: 0
225 | ; user: -
226 | ; script: /home/fat/web/docs/php/test_mem.php
227 | ; last request cpu: 0.00
228 | ; last request memory: 0
229 | ;
230 | ; Note: There is a real-time FPM status monitoring sample web page available
231 | ; It's available in: @EXPANDED_DATADIR@/fpm/status.html
232 | ;
233 | ; Note: The value must start with a leading slash (/). The value can be
234 | ; anything, but it may not be a good idea to use the .php extension or it
235 | ; may conflict with a real PHP file.
236 | ; Default Value: not set
237 | ;pm.status_path = /status
238 |
239 | ; The ping URI to call the monitoring page of FPM. If this value is not set, no
240 | ; URI will be recognized as a ping page. This could be used to test from outside
241 | ; that FPM is alive and responding, or to
242 | ; - create a graph of FPM availability (rrd or such);
243 | ; - remove a server from a group if it is not responding (load balancing);
244 | ; - trigger alerts for the operating team (24/7).
245 | ; Note: The value must start with a leading slash (/). The value can be
246 | ; anything, but it may not be a good idea to use the .php extension or it
247 | ; may conflict with a real PHP file.
248 | ; Default Value: not set
249 | ;ping.path = /ping
250 |
251 | ; This directive may be used to customize the response of a ping request. The
252 | ; response is formatted as text/plain with a 200 response code.
253 | ; Default Value: pong
254 | ;ping.response = pong
255 |
256 | ; The access log file
257 | ; Default: not set
258 | ;access.log = log/$pool.access.log
259 |
260 | ; The access log format.
261 | ; The following syntax is allowed
262 | ; %%: the '%' character
263 | ; %C: %CPU used by the request
264 | ; it can accept the following format:
265 | ; - %{user}C for user CPU only
266 | ; - %{system}C for system CPU only
267 | ; - %{total}C for user + system CPU (default)
268 | ; %d: time taken to serve the request
269 | ; it can accept the following format:
270 | ; - %{seconds}d (default)
271 | ; - %{miliseconds}d
272 | ; - %{mili}d
273 | ; - %{microseconds}d
274 | ; - %{micro}d
275 | ; %e: an environment variable (same as $_ENV or $_SERVER)
276 | ; it must be associated with embraces to specify the name of the env
277 | ; variable. Some exemples:
278 | ; - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e
279 | ; - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e
280 | ; %f: script filename
281 | ; %l: content-length of the request (for POST request only)
282 | ; %m: request method
283 | ; %M: peak of memory allocated by PHP
284 | ; it can accept the following format:
285 | ; - %{bytes}M (default)
286 | ; - %{kilobytes}M
287 | ; - %{kilo}M
288 | ; - %{megabytes}M
289 | ; - %{mega}M
290 | ; %n: pool name
291 | ; %o: output header
292 | ; it must be associated with embraces to specify the name of the header:
293 | ; - %{Content-Type}o
294 | ; - %{X-Powered-By}o
295 | ; - %{Transfert-Encoding}o
296 | ; - ....
297 | ; %p: PID of the child that serviced the request
298 | ; %P: PID of the parent of the child that serviced the request
299 | ; %q: the query string
300 | ; %Q: the '?' character if query string exists
301 | ; %r: the request URI (without the query string, see %q and %Q)
302 | ; %R: remote IP address
303 | ; %s: status (response code)
304 | ; %t: server time the request was received
305 | ; it can accept a strftime(3) format:
306 | ; %d/%b/%Y:%H:%M:%S %z (default)
307 | ; The strftime(3) format must be encapsuled in a %{}t tag
308 | ; e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t
309 | ; %T: time the log has been written (the request has finished)
310 | ; it can accept a strftime(3) format:
311 | ; %d/%b/%Y:%H:%M:%S %z (default)
312 | ; The strftime(3) format must be encapsuled in a %{}t tag
313 | ; e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t
314 | ; %u: remote user
315 | ;
316 | ; Default: "%R - %u %t \"%m %r\" %s"
317 | ;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%"
318 |
319 | ; The log file for slow requests
320 | ; Default Value: not set
321 | ; Note: slowlog is mandatory if request_slowlog_timeout is set
322 | slowlog = /var/log/php-fpm/www-slow.log
323 |
324 | ; The timeout for serving a single request after which a PHP backtrace will be
325 | ; dumped to the 'slowlog' file. A value of '0s' means 'off'.
326 | ; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
327 | ; Default Value: 0
328 | ;request_slowlog_timeout = 0
329 |
330 | ; The timeout for serving a single request after which the worker process will
331 | ; be killed. This option should be used when the 'max_execution_time' ini option
332 | ; does not stop script execution for some reason. A value of '0' means 'off'.
333 | ; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
334 | ; Default Value: 0
335 | ;request_terminate_timeout = 0
336 |
337 | ; Set open file descriptor rlimit.
338 | ; Default Value: system defined value
339 | ;rlimit_files = 1024
340 |
341 | ; Set max core size rlimit.
342 | ; Possible Values: 'unlimited' or an integer greater or equal to 0
343 | ; Default Value: system defined value
344 | ;rlimit_core = 0
345 |
346 | ; Chroot to this directory at the start. This value must be defined as an
347 | ; absolute path. When this value is not set, chroot is not used.
348 | ; Note: you can prefix with '$prefix' to chroot to the pool prefix or one
349 | ; of its subdirectories. If the pool prefix is not set, the global prefix
350 | ; will be used instead.
351 | ; Note: chrooting is a great security feature and should be used whenever
352 | ; possible. However, all PHP paths will be relative to the chroot
353 | ; (error_log, sessions.save_path, ...).
354 | ; Default Value: not set
355 | ;chroot =
356 |
357 | ; Chdir to this directory at the start.
358 | ; Note: relative path can be used.
359 | ; Default Value: current directory or / when chroot
360 | ;chdir = /var/www
361 |
362 | ; Redirect worker stdout and stderr into main error log. If not set, stdout and
363 | ; stderr will be redirected to /dev/null according to FastCGI specs.
364 | ; Note: on highloaded environement, this can cause some delay in the page
365 | ; process time (several ms).
366 | ; Default Value: no
367 | ;catch_workers_output = yes
368 |
369 | ; Clear environment in FPM workers
370 | ; Prevents arbitrary environment variables from reaching FPM worker processes
371 | ; by clearing the environment in workers before env vars specified in this
372 | ; pool configuration are added.
373 | ; Setting to "no" will make all environment variables available to PHP code
374 | ; via getenv(), $_ENV and $_SERVER.
375 | ; Default Value: yes
376 | ;clear_env = no
377 |
378 | ; Limits the extensions of the main script FPM will allow to parse. This can
379 | ; prevent configuration mistakes on the web server side. You should only limit
380 | ; FPM to .php extensions to prevent malicious users to use other extensions to
381 | ; exectute php code.
382 | ; Note: set an empty value to allow all extensions.
383 | ; Default Value: .php
384 | ;security.limit_extensions = .php .php3 .php4 .php5 .php7
385 |
386 | ; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from
387 | ; the current environment.
388 | ; Default Value: clean env
389 | ;env[HOSTNAME] = $HOSTNAME
390 | ;env[PATH] = /usr/local/bin:/usr/bin:/bin
391 | ;env[TMP] = /tmp
392 | ;env[TMPDIR] = /tmp
393 | ;env[TEMP] = /tmp
394 |
395 | ; Additional php.ini defines, specific to this pool of workers. These settings
396 | ; overwrite the values previously defined in the php.ini. The directives are the
397 | ; same as the PHP SAPI:
398 | ; php_value/php_flag - you can set classic ini defines which can
399 | ; be overwritten from PHP call 'ini_set'.
400 | ; php_admin_value/php_admin_flag - these directives won't be overwritten by
401 | ; PHP call 'ini_set'
402 | ; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no.
403 |
404 | ; Defining 'extension' will load the corresponding shared extension from
405 | ; extension_dir. Defining 'disable_functions' or 'disable_classes' will not
406 | ; overwrite previously defined php.ini values, but will append the new value
407 | ; instead.
408 |
409 | ; Note: path INI options can be relative and will be expanded with the prefix
410 | ; (pool, global or @prefix@)
411 |
412 | ; Default Value: nothing is defined by default except the values in php.ini and
413 | ; specified at startup with the -d argument
414 | ;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com
415 | ;php_flag[display_errors] = off
416 | php_admin_value[error_log] = /var/log/php-fpm/www-error.log
417 | php_admin_flag[log_errors] = on
418 | ;php_admin_value[memory_limit] = 128M
419 |
420 | ; Set data paths to directories owned by process user
421 | php_value[session.save_handler] = files
422 | php_value[session.save_path] = /var/lib/php/fpm/session
423 | php_value[soap.wsdl_cache_dir] = /var/lib/php/fpm/wsdlcache
424 | ;php_value[opcache.file_cache] = /var/lib/php/fpm/opcache
425 |
426 |
--------------------------------------------------------------------------------
/SOURCES/php-fpm.conf:
--------------------------------------------------------------------------------
1 | ;;;;;;;;;;;;;;;;;;;;;
2 | ; FPM Configuration ;
3 | ;;;;;;;;;;;;;;;;;;;;;
4 |
5 | ; All relative paths in this configuration file are relative to PHP's install
6 | ; prefix.
7 |
8 | ; Include one or more files. If glob(3) exists, it is used to include a bunch of
9 | ; files from a glob(3) pattern. This directive can be used everywhere in the
10 | ; file.
11 | include=/etc/php-fpm.d/*.conf
12 |
13 | ;;;;;;;;;;;;;;;;;;
14 | ; Global Options ;
15 | ;;;;;;;;;;;;;;;;;;
16 |
17 | [global]
18 | ; Pid file
19 | ; Default Value: none
20 | pid = /run/php-fpm/php-fpm.pid
21 |
22 | ; Error log file
23 | ; If it's set to "syslog", log is sent to syslogd instead of being written
24 | ; in a local file.
25 | ; Default Value: /var/log/php-fpm.log
26 | error_log = /var/log/php-fpm/error.log
27 |
28 | ; syslog_facility is used to specify what type of program is logging the
29 | ; message. This lets syslogd specify that messages from different facilities
30 | ; will be handled differently.
31 | ; See syslog(3) for possible values (ex daemon equiv LOG_DAEMON)
32 | ; Default Value: daemon
33 | ;syslog.facility = daemon
34 |
35 | ; syslog_ident is prepended to every message. If you have multiple FPM
36 | ; instances running on the same server, you can change the default value
37 | ; which must suit common needs.
38 | ; Default Value: php-fpm
39 | ;syslog.ident = php-fpm
40 |
41 | ; Log level
42 | ; Possible Values: alert, error, warning, notice, debug
43 | ; Default Value: notice
44 | ;log_level = notice
45 |
46 | ; If this number of child processes exit with SIGSEGV or SIGBUS within the time
47 | ; interval set by emergency_restart_interval then FPM will restart. A value
48 | ; of '0' means 'Off'.
49 | ; Default Value: 0
50 | ;emergency_restart_threshold = 0
51 |
52 | ; Interval of time used by emergency_restart_interval to determine when
53 | ; a graceful restart will be initiated. This can be useful to work around
54 | ; accidental corruptions in an accelerator's shared memory.
55 | ; Available Units: s(econds), m(inutes), h(ours), or d(ays)
56 | ; Default Unit: seconds
57 | ; Default Value: 0
58 | ;emergency_restart_interval = 0
59 |
60 | ; Time limit for child processes to wait for a reaction on signals from master.
61 | ; Available units: s(econds), m(inutes), h(ours), or d(ays)
62 | ; Default Unit: seconds
63 | ; Default Value: 0
64 | ;process_control_timeout = 0
65 |
66 | ; The maximum number of processes FPM will fork. This has been design to control
67 | ; the global number of processes when using dynamic PM within a lot of pools.
68 | ; Use it with caution.
69 | ; Note: A value of 0 indicates no limit
70 | ; Default Value: 0
71 | ;process.max = 128
72 |
73 | ; Specify the nice(2) priority to apply to the master process (only if set)
74 | ; The value can vary from -19 (highest priority) to 20 (lower priority)
75 | ; Note: - It will only work if the FPM master process is launched as root
76 | ; - The pool process will inherit the master process priority
77 | ; unless it specified otherwise
78 | ; Default Value: no set
79 | ;process.priority = -19
80 |
81 | ; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging.
82 | ; Default Value: yes
83 | daemonize = yes
84 |
85 | ; Set open file descriptor rlimit for the master process.
86 | ; Default Value: system defined value
87 | ;rlimit_files = 1024
88 |
89 | ; Set max core size rlimit for the master process.
90 | ; Possible Values: 'unlimited' or an integer greater or equal to 0
91 | ; Default Value: system defined value
92 | ;rlimit_core = 0
93 |
94 | ; Specify the event mechanism FPM will use. The following is available:
95 | ; - select (any POSIX os)
96 | ; - poll (any POSIX os)
97 | ; - epoll (linux >= 2.5.44)
98 | ; Default Value: not set (auto detection)
99 | ;events.mechanism = epoll
100 |
101 | ; When FPM is build with systemd integration, specify the interval,
102 | ; in second, between health report notification to systemd.
103 | ; Set to 0 to disable.
104 | ; Available Units: s(econds), m(inutes), h(ours)
105 | ; Default Unit: seconds
106 | ; Default value: 10
107 | ;systemd_interval = 10
108 |
109 | ;;;;;;;;;;;;;;;;;;;;
110 | ; Pool Definitions ;
111 | ;;;;;;;;;;;;;;;;;;;;
112 |
113 | ; Multiple pools of child processes may be started with different listening
114 | ; ports and different management options. The name of the pool will be
115 | ; used in logs and stats. There is no limitation on the number of pools which
116 | ; FPM can handle. Your system will tell you anyway :)
117 |
118 | ; See /etc/php-fpm.d/*.conf
119 |
120 |
--------------------------------------------------------------------------------
/SOURCES/php-fpm.init:
--------------------------------------------------------------------------------
1 | #! /bin/sh
2 | #
3 | # chkconfig: - 84 16
4 | # description: PHP FastCGI Process Manager
5 | # processname: php-fpm
6 | # config: /etc/php-fpm.conf
7 | # pidfile: /var/run/php-fpm/php-fpm.pid
8 |
9 | # Standard LSB functions
10 | #. /lib/lsb/init-functions
11 |
12 | # Source function library.
13 | . /etc/init.d/functions
14 |
15 | # Check that networking is up.
16 | . /etc/sysconfig/network
17 |
18 | # Additional environment file
19 | if [ -f /etc/sysconfig/php-fpm ]; then
20 | . /etc/sysconfig/php-fpm
21 | fi
22 |
23 | if [ "$NETWORKING" = "no" ]
24 | then
25 | exit 0
26 | fi
27 |
28 | RETVAL=0
29 | prog="php-fpm"
30 | pidfile=${PIDFILE-/var/run/php-fpm/php-fpm.pid}
31 | lockfile=${LOCKFILE-/var/lock/subsys/php-fpm}
32 |
33 | start () {
34 | echo -n $"Starting $prog: "
35 | dir=$(dirname ${pidfile})
36 | [ -d $dir ] || mkdir $dir
37 | daemon --pidfile ${pidfile} php-fpm --daemonize
38 | RETVAL=$?
39 | echo
40 | [ $RETVAL -eq 0 ] && touch ${lockfile}
41 | }
42 | stop () {
43 | echo -n $"Stopping $prog: "
44 | killproc -p ${pidfile} php-fpm
45 | RETVAL=$?
46 | echo
47 | if [ $RETVAL -eq 0 ] ; then
48 | rm -f ${lockfile} ${pidfile}
49 | fi
50 | }
51 |
52 | restart () {
53 | stop
54 | start
55 | }
56 |
57 | reload () {
58 | echo -n $"Reloading $prog: "
59 | killproc -p ${pidfile} php-fpm -USR2
60 | RETVAL=$?
61 | echo
62 | }
63 |
64 |
65 | # See how we were called.
66 | case "$1" in
67 | start)
68 | start
69 | ;;
70 | stop)
71 | stop
72 | ;;
73 | status)
74 | status -p ${pidfile} php-fpm
75 | RETVAL=$?
76 | ;;
77 | restart)
78 | restart
79 | ;;
80 | reload|force-reload)
81 | reload
82 | ;;
83 | condrestart|try-restart)
84 | [ -f ${lockfile} ] && restart || :
85 | ;;
86 | *)
87 | echo $"Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart|try-restart}"
88 | RETVAL=2
89 | ;;
90 | esac
91 |
92 | exit $RETVAL
93 |
--------------------------------------------------------------------------------
/SOURCES/php-fpm.logrotate:
--------------------------------------------------------------------------------
1 | /var/log/php-fpm/*log {
2 | missingok
3 | notifempty
4 | sharedscripts
5 | delaycompress
6 | postrotate
7 | /bin/kill -SIGUSR1 `cat /run/php-fpm/php-fpm.pid 2>/dev/null` 2>/dev/null || true
8 | endscript
9 | }
10 |
--------------------------------------------------------------------------------
/SOURCES/php-fpm.service:
--------------------------------------------------------------------------------
1 | # It's not recommended to modify this file in-place, because it
2 | # will be overwritten during upgrades. If you want to customize,
3 | # the best way is to use the "systemctl edit" command.
4 |
5 | [Unit]
6 | Description=The PHP FastCGI Process Manager
7 | After=syslog.target network.target
8 |
9 | [Service]
10 | Type=notify
11 | ExecStart=/usr/sbin/php-fpm --nodaemonize
12 | ExecReload=/bin/kill -USR2 $MAINPID
13 | PrivateTmp=true
14 |
15 | [Install]
16 | WantedBy=multi-user.target
17 |
18 |
--------------------------------------------------------------------------------
/SOURCES/php.conf:
--------------------------------------------------------------------------------
1 | #
2 | # The following lines prevent .user.ini files from being viewed by Web clients.
3 | #
4 |
5 |
6 | Require all denied
7 |
8 |
9 | Order allow,deny
10 | Deny from all
11 | Satisfy All
12 |
13 |
14 |
15 | #
16 | # Allow php to handle Multiviews
17 | #
18 | AddType text/html .php
19 |
20 | #
21 | # Add index.php to the list of files that will be served as directory
22 | # indexes.
23 | #
24 | DirectoryIndex index.php
25 |
26 | # mod_php options
27 |
28 | #
29 | # Cause the PHP interpreter to handle files with a .php extension.
30 | #
31 |
32 | SetHandler application/x-httpd-php
33 |
34 |
35 | #
36 | # Uncomment the following lines to allow PHP to pretty-print .phps
37 | # files as PHP source code:
38 | #
39 | #
40 | # SetHandler application/x-httpd-php-source
41 | #
42 |
43 | #
44 | # Apache specific PHP configuration options
45 | # those can be override in each configured vhost
46 | #
47 | php_value session.save_handler "files"
48 | php_value session.save_path "/var/lib/php/mod_php/session"
49 | php_value soap.wsdl_cache_dir "/var/lib/php/mod_php/wsdlcache"
50 | #php_value opcache.file_cache "/var/lib/php/mod_php/opcache"
51 |
52 |
--------------------------------------------------------------------------------
/SOURCES/php.ini:
--------------------------------------------------------------------------------
1 | [PHP]
2 |
3 | ;;;;;;;;;;;;;;;;;;;
4 | ; About php.ini ;
5 | ;;;;;;;;;;;;;;;;;;;
6 | ; PHP's initialization file, generally called php.ini, is responsible for
7 | ; configuring many of the aspects of PHP's behavior.
8 |
9 | ; PHP attempts to find and load this configuration from a number of locations.
10 | ; The following is a summary of its search order:
11 | ; 1. SAPI module specific location.
12 | ; 2. The PHPRC environment variable. (As of PHP 5.2.0)
13 | ; 3. A number of predefined registry keys on Windows (As of PHP 5.2.0)
14 | ; 4. Current working directory (except CLI)
15 | ; 5. The web server's directory (for SAPI modules), or directory of PHP
16 | ; (otherwise in Windows)
17 | ; 6. The directory from the --with-config-file-path compile time option, or the
18 | ; Windows directory (C:\windows or C:\winnt)
19 | ; See the PHP docs for more specific information.
20 | ; http://php.net/configuration.file
21 |
22 | ; The syntax of the file is extremely simple. Whitespace and lines
23 | ; beginning with a semicolon are silently ignored (as you probably guessed).
24 | ; Section headers (e.g. [Foo]) are also silently ignored, even though
25 | ; they might mean something in the future.
26 |
27 | ; Directives following the section heading [PATH=/www/mysite] only
28 | ; apply to PHP files in the /www/mysite directory. Directives
29 | ; following the section heading [HOST=www.example.com] only apply to
30 | ; PHP files served from www.example.com. Directives set in these
31 | ; special sections cannot be overridden by user-defined INI files or
32 | ; at runtime. Currently, [PATH=] and [HOST=] sections only work under
33 | ; CGI/FastCGI.
34 | ; http://php.net/ini.sections
35 |
36 | ; Directives are specified using the following syntax:
37 | ; directive = value
38 | ; Directive names are *case sensitive* - foo=bar is different from FOO=bar.
39 | ; Directives are variables used to configure PHP or PHP extensions.
40 | ; There is no name validation. If PHP can't find an expected
41 | ; directive because it is not set or is mistyped, a default value will be used.
42 |
43 | ; The value can be a string, a number, a PHP constant (e.g. E_ALL or M_PI), one
44 | ; of the INI constants (On, Off, True, False, Yes, No and None) or an expression
45 | ; (e.g. E_ALL & ~E_NOTICE), a quoted string ("bar"), or a reference to a
46 | ; previously set variable or directive (e.g. ${foo})
47 |
48 | ; Expressions in the INI file are limited to bitwise operators and parentheses:
49 | ; | bitwise OR
50 | ; ^ bitwise XOR
51 | ; & bitwise AND
52 | ; ~ bitwise NOT
53 | ; ! boolean NOT
54 |
55 | ; Boolean flags can be turned on using the values 1, On, True or Yes.
56 | ; They can be turned off using the values 0, Off, False or No.
57 |
58 | ; An empty string can be denoted by simply not writing anything after the equal
59 | ; sign, or by using the None keyword:
60 |
61 | ; foo = ; sets foo to an empty string
62 | ; foo = None ; sets foo to an empty string
63 | ; foo = "None" ; sets foo to the string 'None'
64 |
65 | ; If you use constants in your value, and these constants belong to a
66 | ; dynamically loaded extension (either a PHP extension or a Zend extension),
67 | ; you may only use these constants *after* the line that loads the extension.
68 |
69 | ;;;;;;;;;;;;;;;;;;;
70 | ; About this file ;
71 | ;;;;;;;;;;;;;;;;;;;
72 | ; PHP comes packaged with two INI files. One that is recommended to be used
73 | ; in production environments and one that is recommended to be used in
74 | ; development environments.
75 |
76 | ; php.ini-production contains settings which hold security, performance and
77 | ; best practices at its core. But please be aware, these settings may break
78 | ; compatibility with older or less security conscience applications. We
79 | ; recommending using the production ini in production and testing environments.
80 |
81 | ; php.ini-development is very similar to its production variant, except it is
82 | ; much more verbose when it comes to errors. We recommend using the
83 | ; development version only in development environments, as errors shown to
84 | ; application users can inadvertently leak otherwise secure information.
85 |
86 | ; This is php.ini-production INI file.
87 |
88 | ;;;;;;;;;;;;;;;;;;;
89 | ; Quick Reference ;
90 | ;;;;;;;;;;;;;;;;;;;
91 | ; The following are all the settings which are different in either the production
92 | ; or development versions of the INIs with respect to PHP's default behavior.
93 | ; Please see the actual settings later in the document for more details as to why
94 | ; we recommend these changes in PHP's behavior.
95 |
96 | ; display_errors
97 | ; Default Value: On
98 | ; Development Value: On
99 | ; Production Value: Off
100 |
101 | ; display_startup_errors
102 | ; Default Value: Off
103 | ; Development Value: On
104 | ; Production Value: Off
105 |
106 | ; error_reporting
107 | ; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
108 | ; Development Value: E_ALL
109 | ; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT
110 |
111 | ; html_errors
112 | ; Default Value: On
113 | ; Development Value: On
114 | ; Production value: On
115 |
116 | ; log_errors
117 | ; Default Value: Off
118 | ; Development Value: On
119 | ; Production Value: On
120 |
121 | ; max_input_time
122 | ; Default Value: -1 (Unlimited)
123 | ; Development Value: 60 (60 seconds)
124 | ; Production Value: 60 (60 seconds)
125 |
126 | ; output_buffering
127 | ; Default Value: Off
128 | ; Development Value: 4096
129 | ; Production Value: 4096
130 |
131 | ; register_argc_argv
132 | ; Default Value: On
133 | ; Development Value: Off
134 | ; Production Value: Off
135 |
136 | ; request_order
137 | ; Default Value: None
138 | ; Development Value: "GP"
139 | ; Production Value: "GP"
140 |
141 | ; session.gc_divisor
142 | ; Default Value: 100
143 | ; Development Value: 1000
144 | ; Production Value: 1000
145 |
146 | ; session.hash_bits_per_character
147 | ; Default Value: 4
148 | ; Development Value: 5
149 | ; Production Value: 5
150 |
151 | ; short_open_tag
152 | ; Default Value: On
153 | ; Development Value: Off
154 | ; Production Value: Off
155 |
156 | ; track_errors
157 | ; Default Value: Off
158 | ; Development Value: On
159 | ; Production Value: Off
160 |
161 | ; url_rewriter.tags
162 | ; Default Value: "a=href,area=href,frame=src,form=,fieldset="
163 | ; Development Value: "a=href,area=href,frame=src,input=src,form=fakeentry"
164 | ; Production Value: "a=href,area=href,frame=src,input=src,form=fakeentry"
165 |
166 | ; variables_order
167 | ; Default Value: "EGPCS"
168 | ; Development Value: "GPCS"
169 | ; Production Value: "GPCS"
170 |
171 | ;;;;;;;;;;;;;;;;;;;;
172 | ; php.ini Options ;
173 | ;;;;;;;;;;;;;;;;;;;;
174 | ; Name for user-defined php.ini (.htaccess) files. Default is ".user.ini"
175 | ;user_ini.filename = ".user.ini"
176 |
177 | ; To disable this feature set this option to empty value
178 | ;user_ini.filename =
179 |
180 | ; TTL for user-defined php.ini files (time-to-live) in seconds. Default is 300 seconds (5 minutes)
181 | ;user_ini.cache_ttl = 300
182 |
183 | ;;;;;;;;;;;;;;;;;;;;
184 | ; Language Options ;
185 | ;;;;;;;;;;;;;;;;;;;;
186 |
187 | ; Enable the PHP scripting language engine under Apache.
188 | ; http://php.net/engine
189 | engine = On
190 |
191 | ; This directive determines whether or not PHP will recognize code between
192 | ; and ?> tags as PHP source which should be processed as such. It is
193 | ; generally recommended that should be used and that this feature
194 | ; should be disabled, as enabling it may result in issues when generating XML
195 | ; documents, however this remains supported for backward compatibility reasons.
196 | ; Note that this directive does not control the = shorthand tag, which can be
197 | ; used regardless of this directive.
198 | ; Default Value: On
199 | ; Development Value: Off
200 | ; Production Value: Off
201 | ; http://php.net/short-open-tag
202 | short_open_tag = Off
203 |
204 | ; The number of significant digits displayed in floating point numbers.
205 | ; http://php.net/precision
206 | precision = 14
207 |
208 | ; Output buffering is a mechanism for controlling how much output data
209 | ; (excluding headers and cookies) PHP should keep internally before pushing that
210 | ; data to the client. If your application's output exceeds this setting, PHP
211 | ; will send that data in chunks of roughly the size you specify.
212 | ; Turning on this setting and managing its maximum buffer size can yield some
213 | ; interesting side-effects depending on your application and web server.
214 | ; You may be able to send headers and cookies after you've already sent output
215 | ; through print or echo. You also may see performance benefits if your server is
216 | ; emitting less packets due to buffered output versus PHP streaming the output
217 | ; as it gets it. On production servers, 4096 bytes is a good setting for performance
218 | ; reasons.
219 | ; Note: Output buffering can also be controlled via Output Buffering Control
220 | ; functions.
221 | ; Possible Values:
222 | ; On = Enabled and buffer is unlimited. (Use with caution)
223 | ; Off = Disabled
224 | ; Integer = Enables the buffer and sets its maximum size in bytes.
225 | ; Note: This directive is hardcoded to Off for the CLI SAPI
226 | ; Default Value: Off
227 | ; Development Value: 4096
228 | ; Production Value: 4096
229 | ; http://php.net/output-buffering
230 | output_buffering = 4096
231 |
232 | ; You can redirect all of the output of your scripts to a function. For
233 | ; example, if you set output_handler to "mb_output_handler", character
234 | ; encoding will be transparently converted to the specified encoding.
235 | ; Setting any output handler automatically turns on output buffering.
236 | ; Note: People who wrote portable scripts should not depend on this ini
237 | ; directive. Instead, explicitly set the output handler using ob_start().
238 | ; Using this ini directive may cause problems unless you know what script
239 | ; is doing.
240 | ; Note: You cannot use both "mb_output_handler" with "ob_iconv_handler"
241 | ; and you cannot use both "ob_gzhandler" and "zlib.output_compression".
242 | ; Note: output_handler must be empty if this is set 'On' !!!!
243 | ; Instead you must use zlib.output_handler.
244 | ; http://php.net/output-handler
245 | ;output_handler =
246 |
247 | ; Transparent output compression using the zlib library
248 | ; Valid values for this option are 'off', 'on', or a specific buffer size
249 | ; to be used for compression (default is 4KB)
250 | ; Note: Resulting chunk size may vary due to nature of compression. PHP
251 | ; outputs chunks that are few hundreds bytes each as a result of
252 | ; compression. If you prefer a larger chunk size for better
253 | ; performance, enable output_buffering in addition.
254 | ; Note: You need to use zlib.output_handler instead of the standard
255 | ; output_handler, or otherwise the output will be corrupted.
256 | ; http://php.net/zlib.output-compression
257 | zlib.output_compression = Off
258 |
259 | ; http://php.net/zlib.output-compression-level
260 | ;zlib.output_compression_level = -1
261 |
262 | ; You cannot specify additional output handlers if zlib.output_compression
263 | ; is activated here. This setting does the same as output_handler but in
264 | ; a different order.
265 | ; http://php.net/zlib.output-handler
266 | ;zlib.output_handler =
267 |
268 | ; Implicit flush tells PHP to tell the output layer to flush itself
269 | ; automatically after every output block. This is equivalent to calling the
270 | ; PHP function flush() after each and every call to print() or echo() and each
271 | ; and every HTML block. Turning this option on has serious performance
272 | ; implications and is generally recommended for debugging purposes only.
273 | ; http://php.net/implicit-flush
274 | ; Note: This directive is hardcoded to On for the CLI SAPI
275 | implicit_flush = Off
276 |
277 | ; The unserialize callback function will be called (with the undefined class'
278 | ; name as parameter), if the unserializer finds an undefined class
279 | ; which should be instantiated. A warning appears if the specified function is
280 | ; not defined, or if the function doesn't include/implement the missing class.
281 | ; So only set this entry, if you really want to implement such a
282 | ; callback-function.
283 | unserialize_callback_func =
284 |
285 | ; When floats & doubles are serialized store serialize_precision significant
286 | ; digits after the floating point. The default value ensures that when floats
287 | ; are decoded with unserialize, the data will remain the same.
288 | serialize_precision = 17
289 |
290 | ; open_basedir, if set, limits all file operations to the defined directory
291 | ; and below. This directive makes most sense if used in a per-directory
292 | ; or per-virtualhost web server configuration file.
293 | ; http://php.net/open-basedir
294 | ;open_basedir =
295 |
296 | ; This directive allows you to disable certain functions for security reasons.
297 | ; It receives a comma-delimited list of function names.
298 | ; http://php.net/disable-functions
299 | disable_functions =
300 |
301 | ; This directive allows you to disable certain classes for security reasons.
302 | ; It receives a comma-delimited list of class names.
303 | ; http://php.net/disable-classes
304 | disable_classes =
305 |
306 | ; Colors for Syntax Highlighting mode. Anything that's acceptable in
307 | ; would work.
308 | ; http://php.net/syntax-highlighting
309 | ;highlight.string = #DD0000
310 | ;highlight.comment = #FF9900
311 | ;highlight.keyword = #007700
312 | ;highlight.default = #0000BB
313 | ;highlight.html = #000000
314 |
315 | ; If enabled, the request will be allowed to complete even if the user aborts
316 | ; the request. Consider enabling it if executing long requests, which may end up
317 | ; being interrupted by the user or a browser timing out. PHP's default behavior
318 | ; is to disable this feature.
319 | ; http://php.net/ignore-user-abort
320 | ;ignore_user_abort = On
321 |
322 | ; Determines the size of the realpath cache to be used by PHP. This value should
323 | ; be increased on systems where PHP opens many files to reflect the quantity of
324 | ; the file operations performed.
325 | ; http://php.net/realpath-cache-size
326 | ;realpath_cache_size = 16k
327 |
328 | ; Duration of time, in seconds for which to cache realpath information for a given
329 | ; file or directory. For systems with rarely changing files, consider increasing this
330 | ; value.
331 | ; http://php.net/realpath-cache-ttl
332 | ;realpath_cache_ttl = 120
333 |
334 | ; Enables or disables the circular reference collector.
335 | ; http://php.net/zend.enable-gc
336 | zend.enable_gc = On
337 |
338 | ; If enabled, scripts may be written in encodings that are incompatible with
339 | ; the scanner. CP936, Big5, CP949 and Shift_JIS are the examples of such
340 | ; encodings. To use this feature, mbstring extension must be enabled.
341 | ; Default: Off
342 | ;zend.multibyte = Off
343 |
344 | ; Allows to set the default encoding for the scripts. This value will be used
345 | ; unless "declare(encoding=...)" directive appears at the top of the script.
346 | ; Only affects if zend.multibyte is set.
347 | ; Default: ""
348 | ;zend.script_encoding =
349 |
350 | ;;;;;;;;;;;;;;;;;
351 | ; Miscellaneous ;
352 | ;;;;;;;;;;;;;;;;;
353 |
354 | ; Decides whether PHP may expose the fact that it is installed on the server
355 | ; (e.g. by adding its signature to the Web server header). It is no security
356 | ; threat in any way, but it makes it possible to determine whether you use PHP
357 | ; on your server or not.
358 | ; http://php.net/expose-php
359 | expose_php = On
360 |
361 | ;;;;;;;;;;;;;;;;;;;
362 | ; Resource Limits ;
363 | ;;;;;;;;;;;;;;;;;;;
364 |
365 | ; Maximum execution time of each script, in seconds
366 | ; http://php.net/max-execution-time
367 | ; Note: This directive is hardcoded to 0 for the CLI SAPI
368 | max_execution_time = 30
369 |
370 | ; Maximum amount of time each script may spend parsing request data. It's a good
371 | ; idea to limit this time on productions servers in order to eliminate unexpectedly
372 | ; long running scripts.
373 | ; Note: This directive is hardcoded to -1 for the CLI SAPI
374 | ; Default Value: -1 (Unlimited)
375 | ; Development Value: 60 (60 seconds)
376 | ; Production Value: 60 (60 seconds)
377 | ; http://php.net/max-input-time
378 | max_input_time = 60
379 |
380 | ; Maximum input variable nesting level
381 | ; http://php.net/max-input-nesting-level
382 | ;max_input_nesting_level = 64
383 |
384 | ; How many GET/POST/COOKIE input variables may be accepted
385 | ; max_input_vars = 1000
386 |
387 | ; Maximum amount of memory a script may consume (128MB)
388 | ; http://php.net/memory-limit
389 | memory_limit = 128M
390 |
391 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
392 | ; Error handling and logging ;
393 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
394 |
395 | ; This directive informs PHP of which errors, warnings and notices you would like
396 | ; it to take action for. The recommended way of setting values for this
397 | ; directive is through the use of the error level constants and bitwise
398 | ; operators. The error level constants are below here for convenience as well as
399 | ; some common settings and their meanings.
400 | ; By default, PHP is set to take action on all errors, notices and warnings EXCEPT
401 | ; those related to E_NOTICE and E_STRICT, which together cover best practices and
402 | ; recommended coding standards in PHP. For performance reasons, this is the
403 | ; recommend error reporting setting. Your production server shouldn't be wasting
404 | ; resources complaining about best practices and coding standards. That's what
405 | ; development servers and development settings are for.
406 | ; Note: The php.ini-development file has this setting as E_ALL. This
407 | ; means it pretty much reports everything which is exactly what you want during
408 | ; development and early testing.
409 | ;
410 | ; Error Level Constants:
411 | ; E_ALL - All errors and warnings (includes E_STRICT as of PHP 5.4.0)
412 | ; E_ERROR - fatal run-time errors
413 | ; E_RECOVERABLE_ERROR - almost fatal run-time errors
414 | ; E_WARNING - run-time warnings (non-fatal errors)
415 | ; E_PARSE - compile-time parse errors
416 | ; E_NOTICE - run-time notices (these are warnings which often result
417 | ; from a bug in your code, but it's possible that it was
418 | ; intentional (e.g., using an uninitialized variable and
419 | ; relying on the fact it is automatically initialized to an
420 | ; empty string)
421 | ; E_STRICT - run-time notices, enable to have PHP suggest changes
422 | ; to your code which will ensure the best interoperability
423 | ; and forward compatibility of your code
424 | ; E_CORE_ERROR - fatal errors that occur during PHP's initial startup
425 | ; E_CORE_WARNING - warnings (non-fatal errors) that occur during PHP's
426 | ; initial startup
427 | ; E_COMPILE_ERROR - fatal compile-time errors
428 | ; E_COMPILE_WARNING - compile-time warnings (non-fatal errors)
429 | ; E_USER_ERROR - user-generated error message
430 | ; E_USER_WARNING - user-generated warning message
431 | ; E_USER_NOTICE - user-generated notice message
432 | ; E_DEPRECATED - warn about code that will not work in future versions
433 | ; of PHP
434 | ; E_USER_DEPRECATED - user-generated deprecation warnings
435 | ;
436 | ; Common Values:
437 | ; E_ALL (Show all errors, warnings and notices including coding standards.)
438 | ; E_ALL & ~E_NOTICE (Show all errors, except for notices)
439 | ; E_ALL & ~E_NOTICE & ~E_STRICT (Show all errors, except for notices and coding standards warnings.)
440 | ; E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR (Show only errors)
441 | ; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
442 | ; Development Value: E_ALL
443 | ; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT
444 | ; http://php.net/error-reporting
445 | error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
446 |
447 | ; This directive controls whether or not and where PHP will output errors,
448 | ; notices and warnings too. Error output is very useful during development, but
449 | ; it could be very dangerous in production environments. Depending on the code
450 | ; which is triggering the error, sensitive information could potentially leak
451 | ; out of your application such as database usernames and passwords or worse.
452 | ; For production environments, we recommend logging errors rather than
453 | ; sending them to STDOUT.
454 | ; Possible Values:
455 | ; Off = Do not display any errors
456 | ; stderr = Display errors to STDERR (affects only CGI/CLI binaries!)
457 | ; On or stdout = Display errors to STDOUT
458 | ; Default Value: On
459 | ; Development Value: On
460 | ; Production Value: Off
461 | ; http://php.net/display-errors
462 | display_errors = Off
463 |
464 | ; The display of errors which occur during PHP's startup sequence are handled
465 | ; separately from display_errors. PHP's default behavior is to suppress those
466 | ; errors from clients. Turning the display of startup errors on can be useful in
467 | ; debugging configuration problems. We strongly recommend you
468 | ; set this to 'off' for production servers.
469 | ; Default Value: Off
470 | ; Development Value: On
471 | ; Production Value: Off
472 | ; http://php.net/display-startup-errors
473 | display_startup_errors = Off
474 |
475 | ; Besides displaying errors, PHP can also log errors to locations such as a
476 | ; server-specific log, STDERR, or a location specified by the error_log
477 | ; directive found below. While errors should not be displayed on productions
478 | ; servers they should still be monitored and logging is a great way to do that.
479 | ; Default Value: Off
480 | ; Development Value: On
481 | ; Production Value: On
482 | ; http://php.net/log-errors
483 | log_errors = On
484 |
485 | ; Set maximum length of log_errors. In error_log information about the source is
486 | ; added. The default is 1024 and 0 allows to not apply any maximum length at all.
487 | ; http://php.net/log-errors-max-len
488 | log_errors_max_len = 1024
489 |
490 | ; Do not log repeated messages. Repeated errors must occur in same file on same
491 | ; line unless ignore_repeated_source is set true.
492 | ; http://php.net/ignore-repeated-errors
493 | ignore_repeated_errors = Off
494 |
495 | ; Ignore source of message when ignoring repeated messages. When this setting
496 | ; is On you will not log errors with repeated messages from different files or
497 | ; source lines.
498 | ; http://php.net/ignore-repeated-source
499 | ignore_repeated_source = Off
500 |
501 | ; If this parameter is set to Off, then memory leaks will not be shown (on
502 | ; stdout or in the log). This has only effect in a debug compile, and if
503 | ; error reporting includes E_WARNING in the allowed list
504 | ; http://php.net/report-memleaks
505 | report_memleaks = On
506 |
507 | ; This setting is on by default.
508 | ;report_zend_debug = 0
509 |
510 | ; Store the last error/warning message in $php_errormsg (boolean). Setting this value
511 | ; to On can assist in debugging and is appropriate for development servers. It should
512 | ; however be disabled on production servers.
513 | ; Default Value: Off
514 | ; Development Value: On
515 | ; Production Value: Off
516 | ; http://php.net/track-errors
517 | track_errors = Off
518 |
519 | ; Turn off normal error reporting and emit XML-RPC error XML
520 | ; http://php.net/xmlrpc-errors
521 | ;xmlrpc_errors = 0
522 |
523 | ; An XML-RPC faultCode
524 | ;xmlrpc_error_number = 0
525 |
526 | ; When PHP displays or logs an error, it has the capability of formatting the
527 | ; error message as HTML for easier reading. This directive controls whether
528 | ; the error message is formatted as HTML or not.
529 | ; Note: This directive is hardcoded to Off for the CLI SAPI
530 | ; Default Value: On
531 | ; Development Value: On
532 | ; Production value: On
533 | ; http://php.net/html-errors
534 | html_errors = On
535 |
536 | ; If html_errors is set to On *and* docref_root is not empty, then PHP
537 | ; produces clickable error messages that direct to a page describing the error
538 | ; or function causing the error in detail.
539 | ; You can download a copy of the PHP manual from http://php.net/docs
540 | ; and change docref_root to the base URL of your local copy including the
541 | ; leading '/'. You must also specify the file extension being used including
542 | ; the dot. PHP's default behavior is to leave these settings empty, in which
543 | ; case no links to documentation are generated.
544 | ; Note: Never use this feature for production boxes.
545 | ; http://php.net/docref-root
546 | ; Examples
547 | ;docref_root = "/phpmanual/"
548 |
549 | ; http://php.net/docref-ext
550 | ;docref_ext = .html
551 |
552 | ; String to output before an error message. PHP's default behavior is to leave
553 | ; this setting blank.
554 | ; http://php.net/error-prepend-string
555 | ; Example:
556 | ;error_prepend_string = ""
557 |
558 | ; String to output after an error message. PHP's default behavior is to leave
559 | ; this setting blank.
560 | ; http://php.net/error-append-string
561 | ; Example:
562 | ;error_append_string = ""
563 |
564 | ; Log errors to specified file. PHP's default behavior is to leave this value
565 | ; empty.
566 | ; http://php.net/error-log
567 | ; Example:
568 | ;error_log = php_errors.log
569 | ; Log errors to syslog.
570 | ;error_log = syslog
571 |
572 | ;windows.show_crt_warning
573 | ; Default value: 0
574 | ; Development value: 0
575 | ; Production value: 0
576 |
577 | ;;;;;;;;;;;;;;;;;
578 | ; Data Handling ;
579 | ;;;;;;;;;;;;;;;;;
580 |
581 | ; The separator used in PHP generated URLs to separate arguments.
582 | ; PHP's default setting is "&".
583 | ; http://php.net/arg-separator.output
584 | ; Example:
585 | ;arg_separator.output = "&"
586 |
587 | ; List of separator(s) used by PHP to parse input URLs into variables.
588 | ; PHP's default setting is "&".
589 | ; NOTE: Every character in this directive is considered as separator!
590 | ; http://php.net/arg-separator.input
591 | ; Example:
592 | ;arg_separator.input = ";&"
593 |
594 | ; This directive determines which super global arrays are registered when PHP
595 | ; starts up. G,P,C,E & S are abbreviations for the following respective super
596 | ; globals: GET, POST, COOKIE, ENV and SERVER. There is a performance penalty
597 | ; paid for the registration of these arrays and because ENV is not as commonly
598 | ; used as the others, ENV is not recommended on productions servers. You
599 | ; can still get access to the environment variables through getenv() should you
600 | ; need to.
601 | ; Default Value: "EGPCS"
602 | ; Development Value: "GPCS"
603 | ; Production Value: "GPCS";
604 | ; http://php.net/variables-order
605 | variables_order = "GPCS"
606 |
607 | ; This directive determines which super global data (G,P & C) should be
608 | ; registered into the super global array REQUEST. If so, it also determines
609 | ; the order in which that data is registered. The values for this directive
610 | ; are specified in the same manner as the variables_order directive,
611 | ; EXCEPT one. Leaving this value empty will cause PHP to use the value set
612 | ; in the variables_order directive. It does not mean it will leave the super
613 | ; globals array REQUEST empty.
614 | ; Default Value: None
615 | ; Development Value: "GP"
616 | ; Production Value: "GP"
617 | ; http://php.net/request-order
618 | request_order = "GP"
619 |
620 | ; This directive determines whether PHP registers $argv & $argc each time it
621 | ; runs. $argv contains an array of all the arguments passed to PHP when a script
622 | ; is invoked. $argc contains an integer representing the number of arguments
623 | ; that were passed when the script was invoked. These arrays are extremely
624 | ; useful when running scripts from the command line. When this directive is
625 | ; enabled, registering these variables consumes CPU cycles and memory each time
626 | ; a script is executed. For performance reasons, this feature should be disabled
627 | ; on production servers.
628 | ; Note: This directive is hardcoded to On for the CLI SAPI
629 | ; Default Value: On
630 | ; Development Value: Off
631 | ; Production Value: Off
632 | ; http://php.net/register-argc-argv
633 | register_argc_argv = Off
634 |
635 | ; When enabled, the ENV, REQUEST and SERVER variables are created when they're
636 | ; first used (Just In Time) instead of when the script starts. If these
637 | ; variables are not used within a script, having this directive on will result
638 | ; in a performance gain. The PHP directive register_argc_argv must be disabled
639 | ; for this directive to have any affect.
640 | ; http://php.net/auto-globals-jit
641 | auto_globals_jit = On
642 |
643 | ; Whether PHP will read the POST data.
644 | ; This option is enabled by default.
645 | ; Most likely, you won't want to disable this option globally. It causes $_POST
646 | ; and $_FILES to always be empty; the only way you will be able to read the
647 | ; POST data will be through the php://input stream wrapper. This can be useful
648 | ; to proxy requests or to process the POST data in a memory efficient fashion.
649 | ; http://php.net/enable-post-data-reading
650 | ;enable_post_data_reading = Off
651 |
652 | ; Maximum size of POST data that PHP will accept.
653 | ; Its value may be 0 to disable the limit. It is ignored if POST data reading
654 | ; is disabled through enable_post_data_reading.
655 | ; http://php.net/post-max-size
656 | post_max_size = 8M
657 |
658 | ; Automatically add files before PHP document.
659 | ; http://php.net/auto-prepend-file
660 | auto_prepend_file =
661 |
662 | ; Automatically add files after PHP document.
663 | ; http://php.net/auto-append-file
664 | auto_append_file =
665 |
666 | ; By default, PHP will output a character encoding using
667 | ; the Content-type: header. To disable sending of the charset, simply
668 | ; set it to be empty.
669 | ;
670 | ; PHP's built-in default is text/html
671 | ; http://php.net/default-mimetype
672 | default_mimetype = "text/html"
673 |
674 | ; PHP's default character set is set to UTF-8.
675 | ; http://php.net/default-charset
676 | default_charset = "UTF-8"
677 |
678 | ; PHP internal character encoding is set to empty.
679 | ; If empty, default_charset is used.
680 | ; http://php.net/internal-encoding
681 | ;internal_encoding =
682 |
683 | ; PHP input character encoding is set to empty.
684 | ; If empty, default_charset is used.
685 | ; http://php.net/input-encoding
686 | ;input_encoding =
687 |
688 | ; PHP output character encoding is set to empty.
689 | ; If empty, default_charset is used.
690 | ; mbstring or iconv output handler is used.
691 | ; See also output_buffer.
692 | ; http://php.net/output-encoding
693 | ;output_encoding =
694 |
695 | ;;;;;;;;;;;;;;;;;;;;;;;;;
696 | ; Paths and Directories ;
697 | ;;;;;;;;;;;;;;;;;;;;;;;;;
698 |
699 | ; UNIX: "/path1:/path2"
700 | ;include_path = ".:/php/includes"
701 | ;
702 | ; Windows: "\path1;\path2"
703 | ;include_path = ".;c:\php\includes"
704 | ;
705 | ; PHP's default setting for include_path is ".;/path/to/php/pear"
706 | ; http://php.net/include-path
707 |
708 | ; The root of the PHP pages, used only if nonempty.
709 | ; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root
710 | ; if you are running php as a CGI under any web server (other than IIS)
711 | ; see documentation for security issues. The alternate is to use the
712 | ; cgi.force_redirect configuration below
713 | ; http://php.net/doc-root
714 | doc_root =
715 |
716 | ; The directory under which PHP opens the script using /~username used only
717 | ; if nonempty.
718 | ; http://php.net/user-dir
719 | user_dir =
720 |
721 | ; Directory in which the loadable extensions (modules) reside.
722 | ; http://php.net/extension-dir
723 | ; extension_dir = "./"
724 | ; On windows:
725 | ; extension_dir = "ext"
726 |
727 | ; Directory where the temporary files should be placed.
728 | ; Defaults to the system default (see sys_get_temp_dir)
729 | ; sys_temp_dir = "/tmp"
730 |
731 | ; Whether or not to enable the dl() function. The dl() function does NOT work
732 | ; properly in multithreaded servers, such as IIS or Zeus, and is automatically
733 | ; disabled on them.
734 | ; http://php.net/enable-dl
735 | enable_dl = Off
736 |
737 | ; cgi.force_redirect is necessary to provide security running PHP as a CGI under
738 | ; most web servers. Left undefined, PHP turns this on by default. You can
739 | ; turn it off here AT YOUR OWN RISK
740 | ; **You CAN safely turn this off for IIS, in fact, you MUST.**
741 | ; http://php.net/cgi.force-redirect
742 | ;cgi.force_redirect = 1
743 |
744 | ; if cgi.nph is enabled it will force cgi to always sent Status: 200 with
745 | ; every request. PHP's default behavior is to disable this feature.
746 | ;cgi.nph = 1
747 |
748 | ; if cgi.force_redirect is turned on, and you are not running under Apache or Netscape
749 | ; (iPlanet) web servers, you MAY need to set an environment variable name that PHP
750 | ; will look for to know it is OK to continue execution. Setting this variable MAY
751 | ; cause security issues, KNOW WHAT YOU ARE DOING FIRST.
752 | ; http://php.net/cgi.redirect-status-env
753 | ;cgi.redirect_status_env =
754 |
755 | ; cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI. PHP's
756 | ; previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok
757 | ; what PATH_INFO is. For more information on PATH_INFO, see the cgi specs. Setting
758 | ; this to 1 will cause PHP CGI to fix its paths to conform to the spec. A setting
759 | ; of zero causes PHP to behave as before. Default is 1. You should fix your scripts
760 | ; to use SCRIPT_FILENAME rather than PATH_TRANSLATED.
761 | ; http://php.net/cgi.fix-pathinfo
762 | ;cgi.fix_pathinfo=1
763 |
764 | ; FastCGI under IIS (on WINNT based OS) supports the ability to impersonate
765 | ; security tokens of the calling client. This allows IIS to define the
766 | ; security context that the request runs under. mod_fastcgi under Apache
767 | ; does not currently support this feature (03/17/2002)
768 | ; Set to 1 if running under IIS. Default is zero.
769 | ; http://php.net/fastcgi.impersonate
770 | ;fastcgi.impersonate = 1
771 |
772 | ; Disable logging through FastCGI connection. PHP's default behavior is to enable
773 | ; this feature.
774 | ;fastcgi.logging = 0
775 |
776 | ; cgi.rfc2616_headers configuration option tells PHP what type of headers to
777 | ; use when sending HTTP response code. If set to 0, PHP sends Status: header that
778 | ; is supported by Apache. When this option is set to 1, PHP will send
779 | ; RFC2616 compliant header.
780 | ; Default is zero.
781 | ; http://php.net/cgi.rfc2616-headers
782 | ;cgi.rfc2616_headers = 0
783 |
784 | ;;;;;;;;;;;;;;;;
785 | ; File Uploads ;
786 | ;;;;;;;;;;;;;;;;
787 |
788 | ; Whether to allow HTTP file uploads.
789 | ; http://php.net/file-uploads
790 | file_uploads = On
791 |
792 | ; Temporary directory for HTTP uploaded files (will use system default if not
793 | ; specified).
794 | ; http://php.net/upload-tmp-dir
795 | ;upload_tmp_dir =
796 |
797 | ; Maximum allowed size for uploaded files.
798 | ; http://php.net/upload-max-filesize
799 | upload_max_filesize = 2M
800 |
801 | ; Maximum number of files that can be uploaded via a single request
802 | max_file_uploads = 20
803 |
804 | ;;;;;;;;;;;;;;;;;;
805 | ; Fopen wrappers ;
806 | ;;;;;;;;;;;;;;;;;;
807 |
808 | ; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
809 | ; http://php.net/allow-url-fopen
810 | allow_url_fopen = On
811 |
812 | ; Whether to allow include/require to open URLs (like http:// or ftp://) as files.
813 | ; http://php.net/allow-url-include
814 | allow_url_include = Off
815 |
816 | ; Define the anonymous ftp password (your email address). PHP's default setting
817 | ; for this is empty.
818 | ; http://php.net/from
819 | ;from="john@doe.com"
820 |
821 | ; Define the User-Agent string. PHP's default setting for this is empty.
822 | ; http://php.net/user-agent
823 | ;user_agent="PHP"
824 |
825 | ; Default timeout for socket based streams (seconds)
826 | ; http://php.net/default-socket-timeout
827 | default_socket_timeout = 60
828 |
829 | ; If your scripts have to deal with files from Macintosh systems,
830 | ; or you are running on a Mac and need to deal with files from
831 | ; unix or win32 systems, setting this flag will cause PHP to
832 | ; automatically detect the EOL character in those files so that
833 | ; fgets() and file() will work regardless of the source of the file.
834 | ; http://php.net/auto-detect-line-endings
835 | ;auto_detect_line_endings = Off
836 |
837 | ;;;;;;;;;;;;;;;;;;;;;;
838 | ; Dynamic Extensions ;
839 | ;;;;;;;;;;;;;;;;;;;;;;
840 |
841 | ; If you wish to have an extension loaded automatically, use the following
842 | ; syntax:
843 | ;
844 | ; extension=modulename.extension
845 | ;
846 | ; For example, on Windows:
847 | ;
848 | ; extension=msql.dll
849 | ;
850 | ; ... or under UNIX:
851 | ;
852 | ; extension=msql.so
853 | ;
854 | ; ... or with a path:
855 | ;
856 | ; extension=/path/to/extension/msql.so
857 | ;
858 | ; If you only provide the name of the extension, PHP will look for it in its
859 | ; default extension directory.
860 |
861 | ;;;;
862 | ; Note: packaged extension modules are now loaded via the .ini files
863 | ; found in the directory /etc/php.d; these are loaded by default.
864 | ;;;;
865 |
866 | ;;;;;;;;;;;;;;;;;;;
867 | ; Module Settings ;
868 | ;;;;;;;;;;;;;;;;;;;
869 |
870 | [CLI Server]
871 | ; Whether the CLI web server uses ANSI color coding in its terminal output.
872 | cli_server.color = On
873 |
874 | [Date]
875 | ; Defines the default timezone used by the date functions
876 | ; http://php.net/date.timezone
877 | ;date.timezone =
878 |
879 | ; http://php.net/date.default-latitude
880 | ;date.default_latitude = 31.7667
881 |
882 | ; http://php.net/date.default-longitude
883 | ;date.default_longitude = 35.2333
884 |
885 | ; http://php.net/date.sunrise-zenith
886 | ;date.sunrise_zenith = 90.583333
887 |
888 | ; http://php.net/date.sunset-zenith
889 | ;date.sunset_zenith = 90.583333
890 |
891 | [filter]
892 | ; http://php.net/filter.default
893 | ;filter.default = unsafe_raw
894 |
895 | ; http://php.net/filter.default-flags
896 | ;filter.default_flags =
897 |
898 | [iconv]
899 | ; Use of this INI entry is deprecated, use global input_encoding instead.
900 | ; If empty, default_charset or input_encoding or iconv.input_encoding is used.
901 | ; The precedence is: default_charset < intput_encoding < iconv.input_encoding
902 | ;iconv.input_encoding =
903 |
904 | ; Use of this INI entry is deprecated, use global internal_encoding instead.
905 | ; If empty, default_charset or internal_encoding or iconv.internal_encoding is used.
906 | ; The precedence is: default_charset < internal_encoding < iconv.internal_encoding
907 | ;iconv.internal_encoding =
908 |
909 | ; Use of this INI entry is deprecated, use global output_encoding instead.
910 | ; If empty, default_charset or output_encoding or iconv.output_encoding is used.
911 | ; The precedence is: default_charset < output_encoding < iconv.output_encoding
912 | ; To use an output encoding conversion, iconv's output handler must be set
913 | ; otherwise output encoding conversion cannot be performed.
914 | ;iconv.output_encoding =
915 |
916 | [intl]
917 | ;intl.default_locale =
918 | ; This directive allows you to produce PHP errors when some error
919 | ; happens within intl functions. The value is the level of the error produced.
920 | ; Default is 0, which does not produce any errors.
921 | ;intl.error_level = E_WARNING
922 |
923 | [sqlite]
924 | ; http://php.net/sqlite.assoc-case
925 | ;sqlite.assoc_case = 0
926 |
927 | [sqlite3]
928 | ;sqlite3.extension_dir =
929 |
930 | [Pcre]
931 | ;PCRE library backtracking limit.
932 | ; http://php.net/pcre.backtrack-limit
933 | ;pcre.backtrack_limit=100000
934 |
935 | ;PCRE library recursion limit.
936 | ;Please note that if you set this value to a high number you may consume all
937 | ;the available process stack and eventually crash PHP (due to reaching the
938 | ;stack size limit imposed by the Operating System).
939 | ; http://php.net/pcre.recursion-limit
940 | ;pcre.recursion_limit=100000
941 |
942 | ;Enables or disables JIT compilation of patterns. This requires the PCRE
943 | ;library to be compiled with JIT support.
944 | pcre.jit=0
945 |
946 | [Pdo]
947 | ; Whether to pool ODBC connections. Can be one of "strict", "relaxed" or "off"
948 | ; http://php.net/pdo-odbc.connection-pooling
949 | ;pdo_odbc.connection_pooling=strict
950 |
951 | ;pdo_odbc.db2_instance_name
952 |
953 | [Pdo_mysql]
954 | ; If mysqlnd is used: Number of cache slots for the internal result set cache
955 | ; http://php.net/pdo_mysql.cache_size
956 | pdo_mysql.cache_size = 2000
957 |
958 | ; Default socket name for local MySQL connects. If empty, uses the built-in
959 | ; MySQL defaults.
960 | ; http://php.net/pdo_mysql.default-socket
961 | pdo_mysql.default_socket=
962 |
963 | [Phar]
964 | ; http://php.net/phar.readonly
965 | ;phar.readonly = On
966 |
967 | ; http://php.net/phar.require-hash
968 | ;phar.require_hash = On
969 |
970 | ;phar.cache_list =
971 |
972 | [mail function]
973 | ; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
974 | ; http://php.net/sendmail-path
975 | sendmail_path = /usr/sbin/sendmail -t -i
976 |
977 | ; Force the addition of the specified parameters to be passed as extra parameters
978 | ; to the sendmail binary. These parameters will always replace the value of
979 | ; the 5th parameter to mail().
980 | ;mail.force_extra_parameters =
981 |
982 | ; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename
983 | mail.add_x_header = On
984 |
985 | ; The path to a log file that will log all mail() calls. Log entries include
986 | ; the full path of the script, line number, To address and headers.
987 | ;mail.log =
988 | ; Log mail to syslog;
989 | ;mail.log = syslog
990 |
991 | [SQL]
992 | ; http://php.net/sql.safe-mode
993 | sql.safe_mode = Off
994 |
995 | [ODBC]
996 | ; http://php.net/odbc.default-db
997 | ;odbc.default_db = Not yet implemented
998 |
999 | ; http://php.net/odbc.default-user
1000 | ;odbc.default_user = Not yet implemented
1001 |
1002 | ; http://php.net/odbc.default-pw
1003 | ;odbc.default_pw = Not yet implemented
1004 |
1005 | ; Controls the ODBC cursor model.
1006 | ; Default: SQL_CURSOR_STATIC (default).
1007 | ;odbc.default_cursortype
1008 |
1009 | ; Allow or prevent persistent links.
1010 | ; http://php.net/odbc.allow-persistent
1011 | odbc.allow_persistent = On
1012 |
1013 | ; Check that a connection is still valid before reuse.
1014 | ; http://php.net/odbc.check-persistent
1015 | odbc.check_persistent = On
1016 |
1017 | ; Maximum number of persistent links. -1 means no limit.
1018 | ; http://php.net/odbc.max-persistent
1019 | odbc.max_persistent = -1
1020 |
1021 | ; Maximum number of links (persistent + non-persistent). -1 means no limit.
1022 | ; http://php.net/odbc.max-links
1023 | odbc.max_links = -1
1024 |
1025 | ; Handling of LONG fields. Returns number of bytes to variables. 0 means
1026 | ; passthru.
1027 | ; http://php.net/odbc.defaultlrl
1028 | odbc.defaultlrl = 4096
1029 |
1030 | ; Handling of binary data. 0 means passthru, 1 return as is, 2 convert to char.
1031 | ; See the documentation on odbc_binmode and odbc_longreadlen for an explanation
1032 | ; of odbc.defaultlrl and odbc.defaultbinmode
1033 | ; http://php.net/odbc.defaultbinmode
1034 | odbc.defaultbinmode = 1
1035 |
1036 | ;birdstep.max_links = -1
1037 |
1038 | [Interbase]
1039 | ; Allow or prevent persistent links.
1040 | ibase.allow_persistent = 1
1041 |
1042 | ; Maximum number of persistent links. -1 means no limit.
1043 | ibase.max_persistent = -1
1044 |
1045 | ; Maximum number of links (persistent + non-persistent). -1 means no limit.
1046 | ibase.max_links = -1
1047 |
1048 | ; Default database name for ibase_connect().
1049 | ;ibase.default_db =
1050 |
1051 | ; Default username for ibase_connect().
1052 | ;ibase.default_user =
1053 |
1054 | ; Default password for ibase_connect().
1055 | ;ibase.default_password =
1056 |
1057 | ; Default charset for ibase_connect().
1058 | ;ibase.default_charset =
1059 |
1060 | ; Default timestamp format.
1061 | ibase.timestampformat = "%Y-%m-%d %H:%M:%S"
1062 |
1063 | ; Default date format.
1064 | ibase.dateformat = "%Y-%m-%d"
1065 |
1066 | ; Default time format.
1067 | ibase.timeformat = "%H:%M:%S"
1068 |
1069 | [MySQLi]
1070 |
1071 | ; Maximum number of persistent links. -1 means no limit.
1072 | ; http://php.net/mysqli.max-persistent
1073 | mysqli.max_persistent = -1
1074 |
1075 | ; Allow accessing, from PHP's perspective, local files with LOAD DATA statements
1076 | ; http://php.net/mysqli.allow_local_infile
1077 | ;mysqli.allow_local_infile = On
1078 |
1079 | ; Allow or prevent persistent links.
1080 | ; http://php.net/mysqli.allow-persistent
1081 | mysqli.allow_persistent = On
1082 |
1083 | ; Maximum number of links. -1 means no limit.
1084 | ; http://php.net/mysqli.max-links
1085 | mysqli.max_links = -1
1086 |
1087 | ; If mysqlnd is used: Number of cache slots for the internal result set cache
1088 | ; http://php.net/mysqli.cache_size
1089 | mysqli.cache_size = 2000
1090 |
1091 | ; Default port number for mysqli_connect(). If unset, mysqli_connect() will use
1092 | ; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
1093 | ; compile-time value defined MYSQL_PORT (in that order). Win32 will only look
1094 | ; at MYSQL_PORT.
1095 | ; http://php.net/mysqli.default-port
1096 | mysqli.default_port = 3306
1097 |
1098 | ; Default socket name for local MySQL connects. If empty, uses the built-in
1099 | ; MySQL defaults.
1100 | ; http://php.net/mysqli.default-socket
1101 | mysqli.default_socket =
1102 |
1103 | ; Default host for mysql_connect() (doesn't apply in safe mode).
1104 | ; http://php.net/mysqli.default-host
1105 | mysqli.default_host =
1106 |
1107 | ; Default user for mysql_connect() (doesn't apply in safe mode).
1108 | ; http://php.net/mysqli.default-user
1109 | mysqli.default_user =
1110 |
1111 | ; Default password for mysqli_connect() (doesn't apply in safe mode).
1112 | ; Note that this is generally a *bad* idea to store passwords in this file.
1113 | ; *Any* user with PHP access can run 'echo get_cfg_var("mysqli.default_pw")
1114 | ; and reveal this password! And of course, any users with read access to this
1115 | ; file will be able to reveal the password as well.
1116 | ; http://php.net/mysqli.default-pw
1117 | mysqli.default_pw =
1118 |
1119 | ; Allow or prevent reconnect
1120 | mysqli.reconnect = Off
1121 |
1122 | [mysqlnd]
1123 | ; Enable / Disable collection of general statistics by mysqlnd which can be
1124 | ; used to tune and monitor MySQL operations.
1125 | ; http://php.net/mysqlnd.collect_statistics
1126 | mysqlnd.collect_statistics = On
1127 |
1128 | ; Enable / Disable collection of memory usage statistics by mysqlnd which can be
1129 | ; used to tune and monitor MySQL operations.
1130 | ; http://php.net/mysqlnd.collect_memory_statistics
1131 | mysqlnd.collect_memory_statistics = Off
1132 |
1133 | ; Size of a pre-allocated buffer used when sending commands to MySQL in bytes.
1134 | ; http://php.net/mysqlnd.net_cmd_buffer_size
1135 | ;mysqlnd.net_cmd_buffer_size = 2048
1136 |
1137 | ; Size of a pre-allocated buffer used for reading data sent by the server in
1138 | ; bytes.
1139 | ; http://php.net/mysqlnd.net_read_buffer_size
1140 | ;mysqlnd.net_read_buffer_size = 32768
1141 |
1142 | [PostgreSQL]
1143 | ; Allow or prevent persistent links.
1144 | ; http://php.net/pgsql.allow-persistent
1145 | pgsql.allow_persistent = On
1146 |
1147 | ; Detect broken persistent links always with pg_pconnect().
1148 | ; Auto reset feature requires a little overheads.
1149 | ; http://php.net/pgsql.auto-reset-persistent
1150 | pgsql.auto_reset_persistent = Off
1151 |
1152 | ; Maximum number of persistent links. -1 means no limit.
1153 | ; http://php.net/pgsql.max-persistent
1154 | pgsql.max_persistent = -1
1155 |
1156 | ; Maximum number of links (persistent+non persistent). -1 means no limit.
1157 | ; http://php.net/pgsql.max-links
1158 | pgsql.max_links = -1
1159 |
1160 | ; Ignore PostgreSQL backends Notice message or not.
1161 | ; Notice message logging require a little overheads.
1162 | ; http://php.net/pgsql.ignore-notice
1163 | pgsql.ignore_notice = 0
1164 |
1165 | ; Log PostgreSQL backends Notice message or not.
1166 | ; Unless pgsql.ignore_notice=0, module cannot log notice message.
1167 | ; http://php.net/pgsql.log-notice
1168 | pgsql.log_notice = 0
1169 |
1170 | [bcmath]
1171 | ; Number of decimal digits for all bcmath functions.
1172 | ; http://php.net/bcmath.scale
1173 | bcmath.scale = 0
1174 |
1175 | [browscap]
1176 | ; http://php.net/browscap
1177 | ;browscap = extra/browscap.ini
1178 |
1179 | [Session]
1180 | ; Handler used to store/retrieve data.
1181 | ; http://php.net/session.save-handler
1182 | session.save_handler = files
1183 |
1184 | ; Argument passed to save_handler. In the case of files, this is the path
1185 | ; where data files are stored. Note: Windows users have to change this
1186 | ; variable in order to use PHP's session functions.
1187 | ;
1188 | ; The path can be defined as:
1189 | ;
1190 | ; session.save_path = "N;/path"
1191 | ;
1192 | ; where N is an integer. Instead of storing all the session files in
1193 | ; /path, what this will do is use subdirectories N-levels deep, and
1194 | ; store the session data in those directories. This is useful if
1195 | ; your OS has problems with many files in one directory, and is
1196 | ; a more efficient layout for servers that handle many sessions.
1197 | ;
1198 | ; NOTE 1: PHP will not create this directory structure automatically.
1199 | ; You can use the script in the ext/session dir for that purpose.
1200 | ; NOTE 2: See the section on garbage collection below if you choose to
1201 | ; use subdirectories for session storage
1202 | ;
1203 | ; The file storage module creates files using mode 600 by default.
1204 | ; You can change that by using
1205 | ;
1206 | ; session.save_path = "N;MODE;/path"
1207 | ;
1208 | ; where MODE is the octal representation of the mode. Note that this
1209 | ; does not overwrite the process's umask.
1210 | ; http://php.net/session.save-path
1211 |
1212 | ; RPM note : session directory must be owned by process owner
1213 | ; for mod_php, see /etc/httpd/conf.d/php.conf
1214 | ; for php-fpm, see /etc/php-fpm.d/*conf
1215 | ;session.save_path = "/tmp"
1216 |
1217 | ; Whether to use strict session mode.
1218 | ; Strict session mode does not accept uninitialized session ID and regenerate
1219 | ; session ID if browser sends uninitialized session ID. Strict mode protects
1220 | ; applications from session fixation via session adoption vulnerability. It is
1221 | ; disabled by default for maximum compatibility, but enabling it is encouraged.
1222 | ; https://wiki.php.net/rfc/strict_sessions
1223 | session.use_strict_mode = 0
1224 |
1225 | ; Whether to use cookies.
1226 | ; http://php.net/session.use-cookies
1227 | session.use_cookies = 1
1228 |
1229 | ; http://php.net/session.cookie-secure
1230 | ;session.cookie_secure =
1231 |
1232 | ; This option forces PHP to fetch and use a cookie for storing and maintaining
1233 | ; the session id. We encourage this operation as it's very helpful in combating
1234 | ; session hijacking when not specifying and managing your own session id. It is
1235 | ; not the be-all and end-all of session hijacking defense, but it's a good start.
1236 | ; http://php.net/session.use-only-cookies
1237 | session.use_only_cookies = 1
1238 |
1239 | ; Name of the session (used as cookie name).
1240 | ; http://php.net/session.name
1241 | session.name = PHPSESSID
1242 |
1243 | ; Initialize session on request startup.
1244 | ; http://php.net/session.auto-start
1245 | session.auto_start = 0
1246 |
1247 | ; Lifetime in seconds of cookie or, if 0, until browser is restarted.
1248 | ; http://php.net/session.cookie-lifetime
1249 | session.cookie_lifetime = 0
1250 |
1251 | ; The path for which the cookie is valid.
1252 | ; http://php.net/session.cookie-path
1253 | session.cookie_path = /
1254 |
1255 | ; The domain for which the cookie is valid.
1256 | ; http://php.net/session.cookie-domain
1257 | session.cookie_domain =
1258 |
1259 | ; Whether or not to add the httpOnly flag to the cookie, which makes it inaccessible to browser scripting languages such as JavaScript.
1260 | ; http://php.net/session.cookie-httponly
1261 | session.cookie_httponly =
1262 |
1263 | ; Handler used to serialize data. php is the standard serializer of PHP.
1264 | ; http://php.net/session.serialize-handler
1265 | session.serialize_handler = php
1266 |
1267 | ; Defines the probability that the 'garbage collection' process is started
1268 | ; on every session initialization. The probability is calculated by using
1269 | ; gc_probability/gc_divisor. Where session.gc_probability is the numerator
1270 | ; and gc_divisor is the denominator in the equation. Setting this value to 1
1271 | ; when the session.gc_divisor value is 100 will give you approximately a 1% chance
1272 | ; the gc will run on any give request.
1273 | ; Default Value: 1
1274 | ; Development Value: 1
1275 | ; Production Value: 1
1276 | ; http://php.net/session.gc-probability
1277 | session.gc_probability = 1
1278 |
1279 | ; Defines the probability that the 'garbage collection' process is started on every
1280 | ; session initialization. The probability is calculated by using the following equation:
1281 | ; gc_probability/gc_divisor. Where session.gc_probability is the numerator and
1282 | ; session.gc_divisor is the denominator in the equation. Setting this value to 1
1283 | ; when the session.gc_divisor value is 100 will give you approximately a 1% chance
1284 | ; the gc will run on any give request. Increasing this value to 1000 will give you
1285 | ; a 0.1% chance the gc will run on any give request. For high volume production servers,
1286 | ; this is a more efficient approach.
1287 | ; Default Value: 100
1288 | ; Development Value: 1000
1289 | ; Production Value: 1000
1290 | ; http://php.net/session.gc-divisor
1291 | session.gc_divisor = 1000
1292 |
1293 | ; After this number of seconds, stored data will be seen as 'garbage' and
1294 | ; cleaned up by the garbage collection process.
1295 | ; http://php.net/session.gc-maxlifetime
1296 | session.gc_maxlifetime = 1440
1297 |
1298 | ; NOTE: If you are using the subdirectory option for storing session files
1299 | ; (see session.save_path above), then garbage collection does *not*
1300 | ; happen automatically. You will need to do your own garbage
1301 | ; collection through a shell script, cron entry, or some other method.
1302 | ; For example, the following script would is the equivalent of
1303 | ; setting session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes):
1304 | ; find /path/to/sessions -cmin +24 -type f | xargs rm
1305 |
1306 | ; Check HTTP Referer to invalidate externally stored URLs containing ids.
1307 | ; HTTP_REFERER has to contain this substring for the session to be
1308 | ; considered as valid.
1309 | ; http://php.net/session.referer-check
1310 | session.referer_check =
1311 |
1312 | ; How many bytes to read from the file.
1313 | ; http://php.net/session.entropy-length
1314 | ;session.entropy_length = 32
1315 |
1316 | ; Specified here to create the session id.
1317 | ; http://php.net/session.entropy-file
1318 | ; Defaults to /dev/urandom
1319 | ; On systems that don't have /dev/urandom but do have /dev/arandom, this will default to /dev/arandom
1320 | ; If neither are found at compile time, the default is no entropy file.
1321 | ; On windows, setting the entropy_length setting will activate the
1322 | ; Windows random source (using the CryptoAPI)
1323 | ;session.entropy_file = /dev/urandom
1324 |
1325 | ; Set to {nocache,private,public,} to determine HTTP caching aspects
1326 | ; or leave this empty to avoid sending anti-caching headers.
1327 | ; http://php.net/session.cache-limiter
1328 | session.cache_limiter = nocache
1329 |
1330 | ; Document expires after n minutes.
1331 | ; http://php.net/session.cache-expire
1332 | session.cache_expire = 180
1333 |
1334 | ; trans sid support is disabled by default.
1335 | ; Use of trans sid may risk your users' security.
1336 | ; Use this option with caution.
1337 | ; - User may send URL contains active session ID
1338 | ; to other person via. email/irc/etc.
1339 | ; - URL that contains active session ID may be stored
1340 | ; in publicly accessible computer.
1341 | ; - User may access your site with the same session ID
1342 | ; always using URL stored in browser's history or bookmarks.
1343 | ; http://php.net/session.use-trans-sid
1344 | session.use_trans_sid = 0
1345 |
1346 | ; Select a hash function for use in generating session ids.
1347 | ; Possible Values
1348 | ; 0 (MD5 128 bits)
1349 | ; 1 (SHA-1 160 bits)
1350 | ; This option may also be set to the name of any hash function supported by
1351 | ; the hash extension. A list of available hashes is returned by the hash_algos()
1352 | ; function.
1353 | ; http://php.net/session.hash-function
1354 | session.hash_function = 0
1355 |
1356 | ; Define how many bits are stored in each character when converting
1357 | ; the binary hash data to something readable.
1358 | ; Possible values:
1359 | ; 4 (4 bits: 0-9, a-f)
1360 | ; 5 (5 bits: 0-9, a-v)
1361 | ; 6 (6 bits: 0-9, a-z, A-Z, "-", ",")
1362 | ; Default Value: 4
1363 | ; Development Value: 5
1364 | ; Production Value: 5
1365 | ; http://php.net/session.hash-bits-per-character
1366 | session.hash_bits_per_character = 5
1367 |
1368 | ; The URL rewriter will look for URLs in a defined set of HTML tags.
1369 | ; form/fieldset are special; if you include them here, the rewriter will
1370 | ; add a hidden field with the info which is otherwise appended
1371 | ; to URLs. If you want XHTML conformity, remove the form entry.
1372 | ; Note that all valid entries require a "=", even if no value follows.
1373 | ; Default Value: "a=href,area=href,frame=src,form=,fieldset="
1374 | ; Development Value: "a=href,area=href,frame=src,input=src,form=fakeentry"
1375 | ; Production Value: "a=href,area=href,frame=src,input=src,form=fakeentry"
1376 | ; http://php.net/url-rewriter.tags
1377 | url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"
1378 |
1379 | ; Enable upload progress tracking in $_SESSION
1380 | ; Default Value: On
1381 | ; Development Value: On
1382 | ; Production Value: On
1383 | ; http://php.net/session.upload-progress.enabled
1384 | ;session.upload_progress.enabled = On
1385 |
1386 | ; Cleanup the progress information as soon as all POST data has been read
1387 | ; (i.e. upload completed).
1388 | ; Default Value: On
1389 | ; Development Value: On
1390 | ; Production Value: On
1391 | ; http://php.net/session.upload-progress.cleanup
1392 | ;session.upload_progress.cleanup = On
1393 |
1394 | ; A prefix used for the upload progress key in $_SESSION
1395 | ; Default Value: "upload_progress_"
1396 | ; Development Value: "upload_progress_"
1397 | ; Production Value: "upload_progress_"
1398 | ; http://php.net/session.upload-progress.prefix
1399 | ;session.upload_progress.prefix = "upload_progress_"
1400 |
1401 | ; The index name (concatenated with the prefix) in $_SESSION
1402 | ; containing the upload progress information
1403 | ; Default Value: "PHP_SESSION_UPLOAD_PROGRESS"
1404 | ; Development Value: "PHP_SESSION_UPLOAD_PROGRESS"
1405 | ; Production Value: "PHP_SESSION_UPLOAD_PROGRESS"
1406 | ; http://php.net/session.upload-progress.name
1407 | ;session.upload_progress.name = "PHP_SESSION_UPLOAD_PROGRESS"
1408 |
1409 | ; How frequently the upload progress should be updated.
1410 | ; Given either in percentages (per-file), or in bytes
1411 | ; Default Value: "1%"
1412 | ; Development Value: "1%"
1413 | ; Production Value: "1%"
1414 | ; http://php.net/session.upload-progress.freq
1415 | ;session.upload_progress.freq = "1%"
1416 |
1417 | ; The minimum delay between updates, in seconds
1418 | ; Default Value: 1
1419 | ; Development Value: 1
1420 | ; Production Value: 1
1421 | ; http://php.net/session.upload-progress.min-freq
1422 | ;session.upload_progress.min_freq = "1"
1423 |
1424 | [Assertion]
1425 | ; Switch whether to compile assertions at all (to have no overhead at run-time)
1426 | ; -1: Do not compile at all
1427 | ; 0: Jump over assertion at run-time
1428 | ; 1: Execute assertions
1429 | ; Changing from or to a negative value is only possible in php.ini! (For turning assertions on and off at run-time, see assert.active, when zend.assertions = 1)
1430 | ; Default Value: 1
1431 | ; Development Value: 1
1432 | ; Production Value: -1
1433 | ; http://php.net/zend.assertions
1434 | zend.assertions = -1
1435 |
1436 | ; Assert(expr); active by default.
1437 | ; http://php.net/assert.active
1438 | ;assert.active = On
1439 |
1440 | ; Throw an AssertationException on failed assertions
1441 | ; http://php.net/assert.exception
1442 | ;assert.exception = On
1443 |
1444 | ; Issue a PHP warning for each failed assertion. (Overridden by assert.exception if active)
1445 | ; http://php.net/assert.warning
1446 | ;assert.warning = On
1447 |
1448 | ; Don't bail out by default.
1449 | ; http://php.net/assert.bail
1450 | ;assert.bail = Off
1451 |
1452 | ; User-function to be called if an assertion fails.
1453 | ; http://php.net/assert.callback
1454 | ;assert.callback = 0
1455 |
1456 | ; Eval the expression with current error_reporting(). Set to true if you want
1457 | ; error_reporting(0) around the eval().
1458 | ; http://php.net/assert.quiet-eval
1459 | ;assert.quiet_eval = 0
1460 |
1461 | [mbstring]
1462 | ; language for internal character representation.
1463 | ; This affects mb_send_mail() and mbstring.detect_order.
1464 | ; http://php.net/mbstring.language
1465 | ;mbstring.language = Japanese
1466 |
1467 | ; Use of this INI entry is deprecated, use global internal_encoding instead.
1468 | ; internal/script encoding.
1469 | ; Some encoding cannot work as internal encoding. (e.g. SJIS, BIG5, ISO-2022-*)
1470 | ; If empty, default_charset or internal_encoding or iconv.internal_encoding is used.
1471 | ; The precedence is: default_charset < internal_encoding < iconv.internal_encoding
1472 | ;mbstring.internal_encoding =
1473 |
1474 | ; Use of this INI entry is deprecated, use global input_encoding instead.
1475 | ; http input encoding.
1476 | ; mbstring.encoding_traslation = On is needed to use this setting.
1477 | ; If empty, default_charset or input_encoding or mbstring.input is used.
1478 | ; The precedence is: default_charset < intput_encoding < mbsting.http_input
1479 | ; http://php.net/mbstring.http-input
1480 | ;mbstring.http_input =
1481 |
1482 | ; Use of this INI entry is deprecated, use global output_encoding instead.
1483 | ; http output encoding.
1484 | ; mb_output_handler must be registered as output buffer to function.
1485 | ; If empty, default_charset or output_encoding or mbstring.http_output is used.
1486 | ; The precedence is: default_charset < output_encoding < mbstring.http_output
1487 | ; To use an output encoding conversion, mbstring's output handler must be set
1488 | ; otherwise output encoding conversion cannot be performed.
1489 | ; http://php.net/mbstring.http-output
1490 | ;mbstring.http_output =
1491 |
1492 | ; enable automatic encoding translation according to
1493 | ; mbstring.internal_encoding setting. Input chars are
1494 | ; converted to internal encoding by setting this to On.
1495 | ; Note: Do _not_ use automatic encoding translation for
1496 | ; portable libs/applications.
1497 | ; http://php.net/mbstring.encoding-translation
1498 | ;mbstring.encoding_translation = Off
1499 |
1500 | ; automatic encoding detection order.
1501 | ; "auto" detect order is changed according to mbstring.language
1502 | ; http://php.net/mbstring.detect-order
1503 | ;mbstring.detect_order = auto
1504 |
1505 | ; substitute_character used when character cannot be converted
1506 | ; one from another
1507 | ; http://php.net/mbstring.substitute-character
1508 | ;mbstring.substitute_character = none
1509 |
1510 | ; overload(replace) single byte functions by mbstring functions.
1511 | ; mail(), ereg(), etc are overloaded by mb_send_mail(), mb_ereg(),
1512 | ; etc. Possible values are 0,1,2,4 or combination of them.
1513 | ; For example, 7 for overload everything.
1514 | ; 0: No overload
1515 | ; 1: Overload mail() function
1516 | ; 2: Overload str*() functions
1517 | ; 4: Overload ereg*() functions
1518 | ; http://php.net/mbstring.func-overload
1519 | ;mbstring.func_overload = 0
1520 |
1521 | ; enable strict encoding detection.
1522 | ; Default: Off
1523 | ;mbstring.strict_detection = On
1524 |
1525 | ; This directive specifies the regex pattern of content types for which mb_output_handler()
1526 | ; is activated.
1527 | ; Default: mbstring.http_output_conv_mimetype=^(text/|application/xhtml\+xml)
1528 | ;mbstring.http_output_conv_mimetype=
1529 |
1530 | [gd]
1531 | ; Tell the jpeg decode to ignore warnings and try to create
1532 | ; a gd image. The warning will then be displayed as notices
1533 | ; disabled by default
1534 | ; http://php.net/gd.jpeg-ignore-warning
1535 | ;gd.jpeg_ignore_warning = 0
1536 |
1537 | [exif]
1538 | ; Exif UNICODE user comments are handled as UCS-2BE/UCS-2LE and JIS as JIS.
1539 | ; With mbstring support this will automatically be converted into the encoding
1540 | ; given by corresponding encode setting. When empty mbstring.internal_encoding
1541 | ; is used. For the decode settings you can distinguish between motorola and
1542 | ; intel byte order. A decode setting cannot be empty.
1543 | ; http://php.net/exif.encode-unicode
1544 | ;exif.encode_unicode = ISO-8859-15
1545 |
1546 | ; http://php.net/exif.decode-unicode-motorola
1547 | ;exif.decode_unicode_motorola = UCS-2BE
1548 |
1549 | ; http://php.net/exif.decode-unicode-intel
1550 | ;exif.decode_unicode_intel = UCS-2LE
1551 |
1552 | ; http://php.net/exif.encode-jis
1553 | ;exif.encode_jis =
1554 |
1555 | ; http://php.net/exif.decode-jis-motorola
1556 | ;exif.decode_jis_motorola = JIS
1557 |
1558 | ; http://php.net/exif.decode-jis-intel
1559 | ;exif.decode_jis_intel = JIS
1560 |
1561 | [Tidy]
1562 | ; The path to a default tidy configuration file to use when using tidy
1563 | ; http://php.net/tidy.default-config
1564 | ;tidy.default_config = /usr/local/lib/php/default.tcfg
1565 |
1566 | ; Should tidy clean and repair output automatically?
1567 | ; WARNING: Do not use this option if you are generating non-html content
1568 | ; such as dynamic images
1569 | ; http://php.net/tidy.clean-output
1570 | tidy.clean_output = Off
1571 |
1572 | [soap]
1573 | ; Enables or disables WSDL caching feature.
1574 | ; http://php.net/soap.wsdl-cache-enabled
1575 | soap.wsdl_cache_enabled=1
1576 |
1577 | ; Sets the directory name where SOAP extension will put cache files.
1578 | ; http://php.net/soap.wsdl-cache-dir
1579 |
1580 | ; RPM note : cache directory must be owned by process owner
1581 | ; for mod_php, see /etc/httpd/conf.d/php.conf
1582 | ; for php-fpm, see /etc/php-fpm.d/*conf
1583 | soap.wsdl_cache_dir="/tmp"
1584 |
1585 | ; (time to live) Sets the number of second while cached file will be used
1586 | ; instead of original one.
1587 | ; http://php.net/soap.wsdl-cache-ttl
1588 | soap.wsdl_cache_ttl=86400
1589 |
1590 | ; Sets the size of the cache limit. (Max. number of WSDL files to cache)
1591 | soap.wsdl_cache_limit = 5
1592 |
1593 | [sysvshm]
1594 | ; A default size of the shared memory segment
1595 | ;sysvshm.init_mem = 10000
1596 |
1597 | [ldap]
1598 | ; Sets the maximum number of open links or -1 for unlimited.
1599 | ldap.max_links = -1
1600 |
1601 | [mcrypt]
1602 | ; For more information about mcrypt settings see http://php.net/mcrypt-module-open
1603 |
1604 | ; Directory where to load mcrypt algorithms
1605 | ; Default: Compiled in into libmcrypt (usually /usr/local/lib/libmcrypt)
1606 | ;mcrypt.algorithms_dir=
1607 |
1608 | ; Directory where to load mcrypt modes
1609 | ; Default: Compiled in into libmcrypt (usually /usr/local/lib/libmcrypt)
1610 | ;mcrypt.modes_dir=
1611 |
1612 | [dba]
1613 | ;dba.default_handler=
1614 |
1615 | [curl]
1616 | ; A default value for the CURLOPT_CAINFO option. This is required to be an
1617 | ; absolute path.
1618 | ;curl.cainfo =
1619 |
1620 | [openssl]
1621 | ; The location of a Certificate Authority (CA) file on the local filesystem
1622 | ; to use when verifying the identity of SSL/TLS peers. Most users should
1623 | ; not specify a value for this directive as PHP will attempt to use the
1624 | ; OS-managed cert stores in its absence. If specified, this value may still
1625 | ; be overridden on a per-stream basis via the "cafile" SSL stream context
1626 | ; option.
1627 | ;openssl.cafile=
1628 |
1629 | ; If openssl.cafile is not specified or if the CA file is not found, the
1630 | ; directory pointed to by openssl.capath is searched for a suitable
1631 | ; certificate. This value must be a correctly hashed certificate directory.
1632 | ; Most users should not specify a value for this directive as PHP will
1633 | ; attempt to use the OS-managed cert stores in its absence. If specified,
1634 | ; this value may still be overridden on a per-stream basis via the "capath"
1635 | ; SSL stream context option.
1636 | ;openssl.capath=
1637 |
1638 | ; Local Variables:
1639 | ; tab-width: 4
1640 | ; End:
1641 |
--------------------------------------------------------------------------------
/SOURCES/php.modconf:
--------------------------------------------------------------------------------
1 | #
2 | # PHP is an HTML-embedded scripting language which attempts to make it
3 | # easy for developers to write dynamically generated webpages.
4 | #
5 |
6 |
7 | LoadModule php7_module modules/libphp7.so
8 |
9 |
--------------------------------------------------------------------------------
/SOURCES/php.ztsmodconf:
--------------------------------------------------------------------------------
1 |
2 | LoadModule php7_module modules/libphp7-zts.so
3 |
4 |
5 |
--------------------------------------------------------------------------------