summaryrefslogtreecommitdiff
path: root/package/php/files
diff options
context:
space:
mode:
Diffstat (limited to 'package/php/files')
-rw-r--r--package/php/files/php-cgi.conffiles1
-rw-r--r--package/php/files/php-cli.conffiles1
-rw-r--r--package/php/files/php-fastcgi.conffiles1
-rw-r--r--package/php/files/php-fastcgi.postinst4
-rw-r--r--package/php/files/php-fpm.conf384
-rw-r--r--package/php/files/php-mod-bz2.postinst3
-rw-r--r--package/php/files/php-mod-curl.postinst3
-rw-r--r--package/php/files/php-mod-ftp.postinst3
-rw-r--r--package/php/files/php-mod-gd.postinst3
-rw-r--r--package/php/files/php-mod-gmp.postinst3
-rw-r--r--package/php/files/php-mod-json.postinst3
-rw-r--r--package/php/files/php-mod-ldap.postinst3
-rw-r--r--package/php/files/php-mod-mysql.postinst3
-rw-r--r--package/php/files/php-mod-openssl.postinst3
-rw-r--r--package/php/files/php-mod-pgsql.postinst3
-rw-r--r--package/php/files/php-mod-session.postinst3
-rw-r--r--package/php/files/php-mod-simplexml.postinst3
-rw-r--r--package/php/files/php-mod-sockets.postinst3
-rw-r--r--package/php/files/php-mod-sqlite.postinst4
-rw-r--r--package/php/files/php-mod-xml.postinst3
-rw-r--r--package/php/files/php-mod-zlib.postinst3
-rw-r--r--package/php/files/php.ini492
-rw-r--r--package/php/files/php.init15
-rw-r--r--package/php/files/php.postinst3
24 files changed, 456 insertions, 494 deletions
diff --git a/package/php/files/php-cgi.conffiles b/package/php/files/php-cgi.conffiles
deleted file mode 100644
index f1b6b5fc9..000000000
--- a/package/php/files/php-cgi.conffiles
+++ /dev/null
@@ -1 +0,0 @@
-/etc/php.ini
diff --git a/package/php/files/php-cli.conffiles b/package/php/files/php-cli.conffiles
index f1b6b5fc9..e69de29bb 100644
--- a/package/php/files/php-cli.conffiles
+++ b/package/php/files/php-cli.conffiles
@@ -1 +0,0 @@
-/etc/php.ini
diff --git a/package/php/files/php-fastcgi.conffiles b/package/php/files/php-fastcgi.conffiles
deleted file mode 100644
index f1b6b5fc9..000000000
--- a/package/php/files/php-fastcgi.conffiles
+++ /dev/null
@@ -1 +0,0 @@
-/etc/php.ini
diff --git a/package/php/files/php-fastcgi.postinst b/package/php/files/php-fastcgi.postinst
deleted file mode 100644
index 4497d75d1..000000000
--- a/package/php/files/php-fastcgi.postinst
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-. $IPKG_INSTROOT/etc/functions.sh
-add_rcconf php php NO
-add_rcconf php_flags php_flags "-b 1026"
diff --git a/package/php/files/php-fpm.conf b/package/php/files/php-fpm.conf
new file mode 100644
index 000000000..bf057ac93
--- /dev/null
+++ b/package/php/files/php-fpm.conf
@@ -0,0 +1,384 @@
+; Start a new pool named 'www'.
+; the variable $pool can we used in any directive and will be replaced by the
+; pool name ('www' here)
+[www]
+
+; Per pool prefix
+; It only applies on the following directives:
+; - 'slowlog'
+; - 'listen' (unixsocket)
+; - 'chroot'
+; - 'chdir'
+; - 'php_values'
+; - 'php_admin_values'
+; When not set, the global prefix (or /usr) applies instead.
+; Note: This directive can also be relative to the global prefix.
+; Default Value: none
+;prefix = /path/to/pools/$pool
+
+; Unix user/group of processes
+; Note: The user is mandatory. If the group is not set, the default user's group
+; will be used.
+user = nginx
+group = nginx
+
+; The address on which to accept FastCGI requests.
+; Valid syntaxes are:
+; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on
+; a specific port;
+; 'port' - to listen on a TCP socket to all addresses on a
+; specific port;
+; '/path/to/unix/socket' - to listen on a unix socket.
+; Note: This value is mandatory.
+listen = /var/run/php5-fpm.sock
+
+; Set listen(2) backlog.
+; Default Value: 128 (-1 on FreeBSD and OpenBSD)
+;listen.backlog = 128
+
+; Set permissions for unix socket, if one is used. In Linux, read/write
+; permissions must be set in order to allow connections from a web server. Many
+; BSD-derived systems allow connections regardless of permissions.
+; Default Values: user and group are set as the running user
+; mode is set to 0666
+listen.owner = nginx
+listen.group = nginx
+listen.mode = 0666
+
+; List of ipv4 addresses of FastCGI clients which are allowed to connect.
+; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
+; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
+; must be separated by a comma. If this value is left blank, connections will be
+; accepted from any ip address.
+; Default Value: any
+;listen.allowed_clients = 127.0.0.1
+
+; Choose how the process manager will control the number of child processes.
+; Possible Values:
+; static - a fixed number (pm.max_children) of child processes;
+; dynamic - the number of child processes are set dynamically based on the
+; following directives. With this process management, there will be
+; always at least 1 children.
+; pm.max_children - the maximum number of children that can
+; be alive at the same time.
+; pm.start_servers - the number of children created on startup.
+; pm.min_spare_servers - the minimum number of children in 'idle'
+; state (waiting to process). If the number
+; of 'idle' processes is less than this
+; number then some children will be created.
+; pm.max_spare_servers - the maximum number of children in 'idle'
+; state (waiting to process). If the number
+; of 'idle' processes is greater than this
+; number then some children will be killed.
+; ondemand - no children are created at startup. Children will be forked when
+; new requests will connect. The following parameter are used:
+; pm.max_children - the maximum number of children that
+; can be alive at the same time.
+; pm.process_idle_timeout - The number of seconds after which
+; an idle process will be killed.
+; Note: This value is mandatory.
+pm = dynamic
+
+; The number of child processes to be created when pm is set to 'static' and the
+; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.
+; This value sets the limit on the number of simultaneous requests that will be
+; served. Equivalent to the ApacheMaxClients directive with mpm_prefork.
+; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP
+; CGI. The below defaults are based on a server without much resources. Don't
+; forget to tweak pm.* to fit your needs.
+; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'
+; Note: This value is mandatory.
+pm.max_children = 5
+
+; The number of child processes created on startup.
+; Note: Used only when pm is set to 'dynamic'
+; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
+pm.start_servers = 2
+
+; The desired minimum number of idle server processes.
+; Note: Used only when pm is set to 'dynamic'
+; Note: Mandatory when pm is set to 'dynamic'
+pm.min_spare_servers = 1
+
+; The desired maximum number of idle server processes.
+; Note: Used only when pm is set to 'dynamic'
+; Note: Mandatory when pm is set to 'dynamic'
+pm.max_spare_servers = 3
+
+; The number of seconds after which an idle process will be killed.
+; Note: Used only when pm is set to 'ondemand'
+; Default Value: 10s
+;pm.process_idle_timeout = 10s;
+
+; The number of requests each child process should execute before respawning.
+; This can be useful to work around memory leaks in 3rd party libraries. For
+; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
+; Default Value: 0
+;pm.max_requests = 500
+
+; The URI to view the FPM status page. If this value is not set, no URI will be
+; recognized as a status page. It shows the following informations:
+; pool - the name of the pool;
+; process manager - static, dynamic or ondemand;
+; start time - the date and time FPM has started;
+; start since - number of seconds since FPM has started;
+; accepted conn - the number of request accepted by the pool;
+; listen queue - the number of request in the queue of pending
+; connections (see backlog in listen(2));
+; max listen queue - the maximum number of requests in the queue
+; of pending connections since FPM has started;
+; listen queue len - the size of the socket queue of pending connections;
+; idle processes - the number of idle processes;
+; active processes - the number of active processes;
+; total processes - the number of idle + active processes;
+; max active processes - the maximum number of active processes since FPM
+; has started;
+; max children reached - number of times, the process limit has been reached,
+; when pm tries to start more children (works only for
+; pm 'dynamic' and 'ondemand');
+; Value are updated in real time.
+; Example output:
+; pool: www
+; process manager: static
+; start time: 01/Jul/2011:17:53:49 +0200
+; start since: 62636
+; accepted conn: 190460
+; listen queue: 0
+; max listen queue: 1
+; listen queue len: 42
+; idle processes: 4
+; active processes: 11
+; total processes: 15
+; max active processes: 12
+; max children reached: 0
+;
+; By default the status page output is formatted as text/plain. Passing either
+; 'html', 'xml' or 'json' in the query string will return the corresponding
+; output syntax. Example:
+; http://www.foo.bar/status
+; http://www.foo.bar/status?json
+; http://www.foo.bar/status?html
+; http://www.foo.bar/status?xml
+;
+; By default the status page only outputs short status. Passing 'full' in the
+; query string will also return status for each pool process.
+; Example:
+; http://www.foo.bar/status?full
+; http://www.foo.bar/status?json&full
+; http://www.foo.bar/status?html&full
+; http://www.foo.bar/status?xml&full
+; The Full status returns for each process:
+; pid - the PID of the process;
+; state - the state of the process (Idle, Running, ...);
+; start time - the date and time the process has started;
+; start since - the number of seconds since the process has started;
+; requests - the number of requests the process has served;
+; request duration - the duration in µs of the requests;
+; request method - the request method (GET, POST, ...);
+; request URI - the request URI with the query string;
+; content length - the content length of the request (only with POST);
+; user - the user (PHP_AUTH_USER) (or '-' if not set);
+; script - the main script called (or '-' if not set);
+; last request cpu - the %cpu the last request consumed
+; it's always 0 if the process is not in Idle state
+; because CPU calculation is done when the request
+; processing has terminated;
+; last request memory - the max amount of memory the last request consumed
+; it's always 0 if the process is not in Idle state
+; because memory calculation is done when the request
+; processing has terminated;
+; If the process is in Idle state, then informations are related to the
+; last request the process has served. Otherwise informations are related to
+; the current request being served.
+; Example output:
+; ************************
+; pid: 31330
+; state: Running
+; start time: 01/Jul/2011:17:53:49 +0200
+; start since: 63087
+; requests: 12808
+; request duration: 1250261
+; request method: GET
+; request URI: /test_mem.php?N=10000
+; content length: 0
+; user: -
+; script: /home/fat/web/docs/php/test_mem.php
+; last request cpu: 0.00
+; last request memory: 0
+;
+; Note: There is a real-time FPM status monitoring sample web page available
+; It's available in: ${prefix}/share/fpm/status.html
+;
+; Note: The value must start with a leading slash (/). The value can be
+; anything, but it may not be a good idea to use the .php extension or it
+; may conflict with a real PHP file.
+; Default Value: not set
+;pm.status_path = /status
+
+; The ping URI to call the monitoring page of FPM. If this value is not set, no
+; URI will be recognized as a ping page. This could be used to test from outside
+; that FPM is alive and responding, or to
+; - create a graph of FPM availability (rrd or such);
+; - remove a server from a group if it is not responding (load balancing);
+; - trigger alerts for the operating team (24/7).
+; Note: The value must start with a leading slash (/). The value can be
+; anything, but it may not be a good idea to use the .php extension or it
+; may conflict with a real PHP file.
+; Default Value: not set
+;ping.path = /ping
+
+; This directive may be used to customize the response of a ping request. The
+; response is formatted as text/plain with a 200 response code.
+; Default Value: pong
+;ping.response = pong
+
+; The access log file
+; Default: not set
+;access.log = log/$pool.access.log
+
+; The access log format.
+; The following syntax is allowed
+; %%: the '%' character
+; %C: %CPU used by the request
+; it can accept the following format:
+; - %{user}C for user CPU only
+; - %{system}C for system CPU only
+; - %{total}C for user + system CPU (default)
+; %d: time taken to serve the request
+; it can accept the following format:
+; - %{seconds}d (default)
+; - %{miliseconds}d
+; - %{mili}d
+; - %{microseconds}d
+; - %{micro}d
+; %e: an environment variable (same as $_ENV or $_SERVER)
+; it must be associated with embraces to specify the name of the env
+; variable. Some exemples:
+; - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e
+; - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e
+; %f: script filename
+; %l: content-length of the request (for POST request only)
+; %m: request method
+; %M: peak of memory allocated by PHP
+; it can accept the following format:
+; - %{bytes}M (default)
+; - %{kilobytes}M
+; - %{kilo}M
+; - %{megabytes}M
+; - %{mega}M
+; %n: pool name
+; %o: ouput header
+; it must be associated with embraces to specify the name of the header:
+; - %{Content-Type}o
+; - %{X-Powered-By}o
+; - %{Transfert-Encoding}o
+; - ....
+; %p: PID of the child that serviced the request
+; %P: PID of the parent of the child that serviced the request
+; %q: the query string
+; %Q: the '?' character if query string exists
+; %r: the request URI (without the query string, see %q and %Q)
+; %R: remote IP address
+; %s: status (response code)
+; %t: server time the request was received
+; it can accept a strftime(3) format:
+; %d/%b/%Y:%H:%M:%S %z (default)
+; %T: time the log has been written (the request has finished)
+; it can accept a strftime(3) format:
+; %d/%b/%Y:%H:%M:%S %z (default)
+; %u: remote user
+;
+; Default: "%R - %u %t \"%m %r\" %s"
+;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%"
+
+; The log file for slow requests
+; Default Value: not set
+; Note: slowlog is mandatory if request_slowlog_timeout is set
+;slowlog = log/$pool.log.slow
+
+; The timeout for serving a single request after which a PHP backtrace will be
+; dumped to the 'slowlog' file. A value of '0s' means 'off'.
+; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
+; Default Value: 0
+;request_slowlog_timeout = 0
+
+; The timeout for serving a single request after which the worker process will
+; be killed. This option should be used when the 'max_execution_time' ini option
+; does not stop script execution for some reason. A value of '0' means 'off'.
+; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
+; Default Value: 0
+;request_terminate_timeout = 0
+
+; Set open file descriptor rlimit.
+; Default Value: system defined value
+;rlimit_files = 1024
+
+; Set max core size rlimit.
+; Possible Values: 'unlimited' or an integer greater or equal to 0
+; Default Value: system defined value
+;rlimit_core = 0
+
+; Chroot to this directory at the start. This value must be defined as an
+; absolute path. When this value is not set, chroot is not used.
+; Note: you can prefix with '$prefix' to chroot to the pool prefix or one
+; of its subdirectories. If the pool prefix is not set, the global prefix
+; will be used instead.
+; Note: chrooting is a great security feature and should be used whenever
+; possible. However, all PHP paths will be relative to the chroot
+; (error_log, sessions.save_path, ...).
+; Default Value: not set
+;chroot =
+
+; Chdir to this directory at the start.
+; Note: relative path can be used.
+; Default Value: current directory or / when chroot
+chdir = /
+
+; Redirect worker stdout and stderr into main error log. If not set, stdout and
+; stderr will be redirected to /dev/null according to FastCGI specs.
+; Note: on highloaded environement, this can cause some delay in the page
+; process time (several ms).
+; Default Value: no
+;catch_workers_output = yes
+
+; Limits the extensions of the main script FPM will allow to parse. This can
+; prevent configuration mistakes on the web server side. You should only limit
+; FPM to .php extensions to prevent malicious users to use other extensions to
+; exectute php code.
+; Note: set an empty value to allow all extensions.
+; Default Value: .php
+;security.limit_extensions = .php .php3 .php4 .php5
+
+; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from
+; the current environment.
+; Default Value: clean env
+;env[HOSTNAME] = $HOSTNAME
+;env[PATH] = /usr/local/bin:/usr/bin:/bin
+;env[TMP] = /tmp
+;env[TMPDIR] = /tmp
+;env[TEMP] = /tmp
+
+; Additional php.ini defines, specific to this pool of workers. These settings
+; override the values previously defined in the php.ini. The directives are the
+; same as the PHP SAPI:
+; php_value/php_flag - you can set classic ini defines which can
+; be overwritten from PHP call 'ini_set'.
+; php_admin_value/php_admin_flag - these directives won't be overwritten by
+; PHP call 'ini_set'
+; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no.
+
+; Defining 'extension' will load the corresponding shared extension from
+; extension_dir. Defining 'disable_functions' or 'disable_classes' will not
+; override previously defined php.ini values, but will append the new value
+; instead.
+
+; Note: path INI options can be relative and will be expanded with the prefix
+; (pool, global or /usr)
+
+; Default Value: nothing is defined by default except the values in php.ini and
+; specified at startup with the -d argument
+;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com
+;php_flag[display_errors] = off
+;php_admin_value[error_log] = /var/log/fpm-php.www.log
+;php_admin_flag[log_errors] = on
+;php_admin_value[memory_limit] = 32M
diff --git a/package/php/files/php-mod-bz2.postinst b/package/php/files/php-mod-bz2.postinst
new file mode 100644
index 000000000..f90b37fa3
--- /dev/null
+++ b/package/php/files/php-mod-bz2.postinst
@@ -0,0 +1,3 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+echo "extension=bz2.so" >> $IPKG_INSTROOT/etc/php.ini
diff --git a/package/php/files/php-mod-curl.postinst b/package/php/files/php-mod-curl.postinst
new file mode 100644
index 000000000..5c00bdaa1
--- /dev/null
+++ b/package/php/files/php-mod-curl.postinst
@@ -0,0 +1,3 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+echo "extension=curl.so" >> $IPKG_INSTROOT/etc/php.ini
diff --git a/package/php/files/php-mod-ftp.postinst b/package/php/files/php-mod-ftp.postinst
new file mode 100644
index 000000000..02d0a56b4
--- /dev/null
+++ b/package/php/files/php-mod-ftp.postinst
@@ -0,0 +1,3 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+echo "extension=ftp.so" >> $IPKG_INSTROOT/etc/php.ini
diff --git a/package/php/files/php-mod-gd.postinst b/package/php/files/php-mod-gd.postinst
new file mode 100644
index 000000000..79f17af24
--- /dev/null
+++ b/package/php/files/php-mod-gd.postinst
@@ -0,0 +1,3 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+echo "extension=gd.so" >> $IPKG_INSTROOT/etc/php.ini
diff --git a/package/php/files/php-mod-gmp.postinst b/package/php/files/php-mod-gmp.postinst
new file mode 100644
index 000000000..5f1828f1d
--- /dev/null
+++ b/package/php/files/php-mod-gmp.postinst
@@ -0,0 +1,3 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+echo "extension=gmp.so" >> $IPKG_INSTROOT/etc/php.ini
diff --git a/package/php/files/php-mod-json.postinst b/package/php/files/php-mod-json.postinst
new file mode 100644
index 000000000..d878837f2
--- /dev/null
+++ b/package/php/files/php-mod-json.postinst
@@ -0,0 +1,3 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+echo "extension=json.so" >> $IPKG_INSTROOT/etc/php.ini
diff --git a/package/php/files/php-mod-ldap.postinst b/package/php/files/php-mod-ldap.postinst
new file mode 100644
index 000000000..9d6d31117
--- /dev/null
+++ b/package/php/files/php-mod-ldap.postinst
@@ -0,0 +1,3 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+echo "extension=ldap.so" >> $IPKG_INSTROOT/etc/php.ini
diff --git a/package/php/files/php-mod-mysql.postinst b/package/php/files/php-mod-mysql.postinst
new file mode 100644
index 000000000..b3c23e843
--- /dev/null
+++ b/package/php/files/php-mod-mysql.postinst
@@ -0,0 +1,3 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+echo "extension=mysql.so" >> $IPKG_INSTROOT/etc/php.ini
diff --git a/package/php/files/php-mod-openssl.postinst b/package/php/files/php-mod-openssl.postinst
new file mode 100644
index 000000000..475426577
--- /dev/null
+++ b/package/php/files/php-mod-openssl.postinst
@@ -0,0 +1,3 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+echo "extension=openssl.so" >> $IPKG_INSTROOT/etc/php.ini
diff --git a/package/php/files/php-mod-pgsql.postinst b/package/php/files/php-mod-pgsql.postinst
new file mode 100644
index 000000000..30effb1b6
--- /dev/null
+++ b/package/php/files/php-mod-pgsql.postinst
@@ -0,0 +1,3 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+echo "extension=pgsql.so" >> $IPKG_INSTROOT/etc/php.ini
diff --git a/package/php/files/php-mod-session.postinst b/package/php/files/php-mod-session.postinst
new file mode 100644
index 000000000..ef08f8da2
--- /dev/null
+++ b/package/php/files/php-mod-session.postinst
@@ -0,0 +1,3 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+echo "extension=session.so" >> $IPKG_INSTROOT/etc/php.ini
diff --git a/package/php/files/php-mod-simplexml.postinst b/package/php/files/php-mod-simplexml.postinst
new file mode 100644
index 000000000..0d17ef13b
--- /dev/null
+++ b/package/php/files/php-mod-simplexml.postinst
@@ -0,0 +1,3 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+echo "extension=simplexml.so" >> $IPKG_INSTROOT/etc/php.ini
diff --git a/package/php/files/php-mod-sockets.postinst b/package/php/files/php-mod-sockets.postinst
new file mode 100644
index 000000000..db06a6f22
--- /dev/null
+++ b/package/php/files/php-mod-sockets.postinst
@@ -0,0 +1,3 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+echo "extension=sockets.so" >> $IPKG_INSTROOT/etc/php.ini
diff --git a/package/php/files/php-mod-sqlite.postinst b/package/php/files/php-mod-sqlite.postinst
new file mode 100644
index 000000000..523f74337
--- /dev/null
+++ b/package/php/files/php-mod-sqlite.postinst
@@ -0,0 +1,4 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+echo "extension=pdo.so" >> $IPKG_INSTROOT/etc/php.ini
+echo "extension=pdo_sqlite.so" >> $IPKG_INSTROOT/etc/php.ini
diff --git a/package/php/files/php-mod-xml.postinst b/package/php/files/php-mod-xml.postinst
new file mode 100644
index 000000000..934984f84
--- /dev/null
+++ b/package/php/files/php-mod-xml.postinst
@@ -0,0 +1,3 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+echo "extension=xml.so" >> $IPKG_INSTROOT/etc/php.ini
diff --git a/package/php/files/php-mod-zlib.postinst b/package/php/files/php-mod-zlib.postinst
new file mode 100644
index 000000000..3f04a3714
--- /dev/null
+++ b/package/php/files/php-mod-zlib.postinst
@@ -0,0 +1,3 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+echo "extension=zlib.so" >> $IPKG_INSTROOT/etc/php.ini
diff --git a/package/php/files/php.ini b/package/php/files/php.ini
index b41be8776..1eaf811b4 100644
--- a/package/php/files/php.ini
+++ b/package/php/files/php.ini
@@ -1,554 +1,78 @@
[PHP]
-
-cgi.fix_pathinfo=1
-
+cgi.fix_pathinfo = 1
zend.ze1_compatibility_mode = Off
-
-;short_open_tag = Off
asp_tags = Off
-precision = 12
+precision = 12
y2k_compliance = On
output_buffering = Off
-
zlib.output_compression = Off
-;zlib.output_handler =
implicit_flush = Off
-
unserialize_callback_func=
serialize_precision = 100
-
-allow_call_time_pass_reference = On
-
safe_mode = Off
-
safe_mode_gid = Off
-
safe_mode_include_dir =
-
safe_mode_exec_dir =
-
safe_mode_allowed_env_vars = PHP_
-
safe_mode_protected_env_vars = LD_LIBRARY_PATH
-
-;open_basedir =
-
disable_functions =
-
disable_classes =
-
-; Colors for Syntax Highlighting mode. Anything that's acceptable in
-; <span style="color: ???????"> would work.
-;highlight.string = #DD0000
-;highlight.comment = #FF9900
-;highlight.keyword = #007700
-;highlight.bg = #FFFFFF
-;highlight.default = #0000BB
-;highlight.html = #000000
-
expose_php = On
-
-
-;;;;;;;;;;;;;;;;;;;
-; Resource Limits ;
-;;;;;;;;;;;;;;;;;;;
-
max_execution_time = 30 ; Maximum execution time of each script, in seconds
max_input_time = 60 ; Maximum amount of time each script may spend parsing request data
-memory_limit = 8M ; Maximum amount of memory a script may consume (8MB)
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Error handling and logging ;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-; error_reporting is a bit-field. Or each number up to get desired error
-; reporting level
-; E_ALL - All errors and warnings (doesn't include E_STRICT)
-; E_ERROR - fatal run-time errors
-; E_WARNING - run-time warnings (non-fatal errors)
-; E_PARSE - compile-time parse errors
-; E_NOTICE - run-time notices (these are warnings which often result
-; from a bug in your code, but it's possible that it was
-; intentional (e.g., using an uninitialized variable and
-; relying on the fact it's automatically initialized to an
-; empty string)
-; E_STRICT - run-time notices, enable to have PHP suggest changes
-; to your code which will ensure the best interoperability
-; and forward compatibility of your code
-; E_CORE_ERROR - fatal errors that occur during PHP's initial startup
-; E_CORE_WARNING - warnings (non-fatal errors) that occur during PHP's
-; initial startup
-; E_COMPILE_ERROR - fatal compile-time errors
-; E_COMPILE_WARNING - compile-time warnings (non-fatal errors)
-; E_USER_ERROR - user-generated error message
-; E_USER_WARNING - user-generated warning message
-; E_USER_NOTICE - user-generated notice message
-;
-; Examples:
-;
-; - Show all errors, except for notices and coding standards warnings
-;
-;error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT
-;
-; - Show all errors, except for notices
-;
-;error_reporting = E_ALL & ~E_NOTICE
-;
-; - Show only errors
-;
-;error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR
-;
-; - Show all errors except for notices and coding standards warnings
-;
+memory_limit = 64M ; Maximum amount of memory a script may consume (8MB)
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT
-
-; Print out errors (as a part of the output). For production web sites,
-; you're strongly encouraged to turn this feature off, and use error logging
-; instead (see below). Keeping display_errors enabled on a production web site
-; may reveal security information to end users, such as file paths on your Web
-; server, your database schema or other information.
-display_errors = On
-
-; Even when display_errors is on, errors that occur during PHP's startup
-; sequence are not displayed. It's strongly recommended to keep
-; display_startup_errors off, except for when debugging.
+display_errors = Off
display_startup_errors = Off
-
-; Log errors into a log file (server-specific log, stderr, or error_log (below))
-; As stated above, you're strongly advised to use error logging in place of
-; error displaying on production web sites.
-log_errors = Off
-
-; Set maximum length of log_errors. In error_log information about the source is
-; added. The default is 1024 and 0 allows to not apply any maximum length at all.
+log_errors = On
log_errors_max_len = 1024
-
-; Do not log repeated messages. Repeated errors must occur in same file on same
-; line until ignore_repeated_source is set true.
ignore_repeated_errors = Off
-
-; Ignore source of message when ignoring repeated messages. When this setting
-; is On you will not log errors with repeated messages from different files or
-; sourcelines.
ignore_repeated_source = Off
-
-; If this parameter is set to Off, then memory leaks will not be shown (on
-; stdout or in the log). This has only effect in a debug compile, and if
-; error reporting includes E_WARNING in the allowed list
report_memleaks = On
-
-; Store the last error/warning message in $php_errormsg (boolean).
track_errors = Off
-
-; Disable the inclusion of HTML tags in error messages.
-; Note: Never use this feature for production boxes.
-;html_errors = Off
-
-; If html_errors is set On PHP produces clickable error messages that direct
-; to a page describing the error or function causing the error in detail.
-; You can download a copy of the PHP manual from http://www.php.net/docs.php
-; and change docref_root to the base URL of your local copy including the
-; leading '/'. You must also specify the file extension being used including
-; the dot.
-; Note: Never use this feature for production boxes.
-;docref_root = "/phpmanual/"
-;docref_ext = .html
-
-; String to output before an error message.
-;error_prepend_string = "<font color=ff0000>"
-
-; String to output after an error message.
-;error_append_string = "</font>"
-
-; Log errors to specified file.
-;error_log = filename
-
-; Log errors to syslog (Event Log on NT, not valid in Windows 95).
-;error_log = syslog
-
-
-;;;;;;;;;;;;;;;;;
-; Data Handling ;
-;;;;;;;;;;;;;;;;;
-;
-; Note - track_vars is ALWAYS enabled as of PHP 4.0.3
-
-; The separator used in PHP generated URLs to separate arguments.
-; Default is "&".
-;arg_separator.output = "&amp;"
-
-; List of separator(s) used by PHP to parse input URLs into variables.
-; Default is "&".
-; NOTE: Every character in this directive is considered as separator!
-;arg_separator.input = ";&"
-
-; This directive describes the order in which PHP registers GET, POST, Cookie,
-; Environment and Built-in variables (G, P, C, E & S respectively, often
-; referred to as EGPCS or GPC). Registration is done from left to right, newer
-; values override older values.
+error_log = /var/log/php.log
variables_order = "EGPCS"
-
-; Whether or not to register the EGPCS variables as global variables. You may
-; want to turn this off if you don't want to clutter your scripts' global scope
-; with user data. This makes most sense when coupled with track_vars - in which
-; case you can access all of the GPC variables through the $HTTP_*_VARS[],
-; variables.
-;
-; You should do your best to write your scripts so that they do not require
-; register_globals to be on; Using form variables as globals can easily lead
-; to possible security problems, if the code is not very well thought of.
register_globals = Off
-
-; This directive tells PHP whether to declare the argv&argc variables (that
-; would contain the GET information). If you don't use these variables, you
-; should turn it off for increased performance.
register_argc_argv = On
-
-; Maximum size of POST data that PHP will accept.
-post_max_size = 8M
-
-; Magic quotes
-;
-
-; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc.
+post_max_size = 64M
magic_quotes_runtime = Off
-
-; Use Sybase-style magic quotes (escape ' with '' instead of \').
magic_quotes_sybase = Off
-
-; Automatically add files before or after any PHP document.
auto_prepend_file =
auto_append_file =
-
-; As of 4.0b4, PHP always outputs a character encoding by default in
-; the Content-type: header. To disable sending of the charset, simply
-; set it to be empty.
-;
-; PHP's built-in default is text/html
default_mimetype = "text/html"
-;default_charset = "iso-8859-1"
-
-; Always populate the $HTTP_RAW_POST_DATA variable.
-;always_populate_raw_post_data = On
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;
-; Paths and Directories ;
-;;;;;;;;;;;;;;;;;;;;;;;;;
-
-; UNIX: "/path1:/path2"
-;include_path = ".:/php/includes"
-;
-; Windows: "\path1;\path2"
-;include_path = ".;c:\php\includes"
-
-; The root of the PHP pages, used only if nonempty.
-; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root
-; if you are running php as a CGI under any web server (other than IIS)
-; see documentation for security issues. The alternate is to use the
-; cgi.force_redirect configuration below
-; lighttpd: must be the same as server.document-root
-doc_root = /srv/www/htdocs
-
-; The directory under which PHP opens the script using /~username used only
-; if nonempty.
user_dir =
-
-; Directory in which the loadable extensions (modules) reside.
extension_dir = "/usr/lib/php"
-
-; Whether or not to enable the dl() function. The dl() function does NOT work
-; properly in multithreaded servers, such as IIS or Zeus, and is automatically
-; disabled on them.
enable_dl = On
-
-; cgi.force_redirect is necessary to provide security running PHP as a CGI under
-; most web servers. Left undefined, PHP turns this on by default. You can
-; turn it off here AT YOUR OWN RISK
-; **You CAN safely turn this off for IIS, in fact, you MUST.**
-; cgi.force_redirect = 1
-
-; if cgi.nph is enabled it will force cgi to always sent Status: 200 with
-; every request.
-; cgi.nph = 1
-
-; if cgi.force_redirect is turned on, and you are not running under Apache or Netscape
-; (iPlanet) web servers, you MAY need to set an environment variable name that PHP
-; will look for to know it is OK to continue execution. Setting this variable MAY
-; cause security issues, KNOW WHAT YOU ARE DOING FIRST.
-; cgi.redirect_status_env = ;
-
-; FastCGI under IIS (on WINNT based OS) supports the ability to impersonate
-; security tokens of the calling client. This allows IIS to define the
-; security context that the request runs under. mod_fastcgi under Apache
-; does not currently support this feature (03/17/2002)
-; Set to 1 if running under IIS. Default is zero.
-; fastcgi.impersonate = 1;
-
-; cgi.rfc2616_headers configuration option tells PHP what type of headers to
-; use when sending HTTP response code. If it's set 0 PHP sends Status: header that
-; is supported by Apache. When this option is set to 1 PHP will send
-; RFC2616 compliant header.
-; Default is zero.
-;cgi.rfc2616_headers = 0
-
-
-;;;;;;;;;;;;;;;;
-; File Uploads ;
-;;;;;;;;;;;;;;;;
-
-; Whether to allow HTTP file uploads.
file_uploads = On
-
-; Temporary directory for HTTP uploaded files (will use system default if not
-; specified).
upload_tmp_dir = /tmp
-
-; Maximum allowed size for uploaded files.
-upload_max_filesize = 2M
-
-
-;;;;;;;;;;;;;;;;;;
-; Fopen wrappers ;
-;;;;;;;;;;;;;;;;;;
-
-; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
+upload_max_filesize = 64M
allow_url_fopen = On
-
-; Define the anonymous ftp password (your email address)
-;from="john@doe.com"
-
-; Define the User-Agent string
-; user_agent="PHP"
-
-; Default timeout for socket based streams (seconds)
default_socket_timeout = 60
-; If your scripts have to deal with files from Macintosh systems,
-; or you are running on a Mac and need to deal with files from
-; unix or win32 systems, setting this flag will cause PHP to
-; automatically detect the EOL character in those files so that
-; fgets() and file() will work regardless of the source of the file.
-; auto_detect_line_endings = Off
-
-
-;;;;;;;;;;;;;;;;;;;;;;
-; Dynamic Extensions ;
-;;;;;;;;;;;;;;;;;;;;;;
-;
-; If you wish to have an extension loaded automatically, use the following
-; syntax:
-;
-; extension=modulename.extension
-;
-; For example, on Windows:
-;
-; extension=msql.dll
-;
-; ... or under UNIX:
-;
-; extension=msql.so
-;
-; Note that it should be the name of the module only; no directory information
-; needs to go here. Specify the location of the extension with the
-; extension_dir directive above.
-
-
-;Windows Extensions
-;Note that ODBC support is built in, so no dll is needed for it.
-;
-
-;extension=ftp.so
-;extension=gd.so
-;extension=mysql.so
-;extension=pcre.so
-;extension=session.so
-;extension=sockets.so
-;extension=xml.so
-
-
-
-
-;;;;;;;;;;;;;;;;;;;
-; Module Settings ;
-;;;;;;;;;;;;;;;;;;;
-
[SQL]
sql.safe_mode = Off
[Session]
-; Handler used to store/retrieve data.
session.save_handler = files
-
-; Argument passed to save_handler. In the case of files, this is the path
-; where data files are stored. Note: Windows users have to change this
-; variable in order to use PHP's session functions.
-;
-; As of PHP 4.0.1, you can define the path as:
-;
-; session.save_path = "N;/path"
-;
-; where N is an integer. Instead of storing all the session files in
-; /path, what this will do is use subdirectories N-levels deep, and
-; store the session data in those directories. This is useful if you
-; or your OS have problems with lots of files in one directory, and is
-; a more efficient layout for servers that handle lots of sessions.
-;
-; NOTE 1: PHP will not create this directory structure automatically.
-; You can use the script in the ext/session dir for that purpose.
-; NOTE 2: See the section on garbage collection below if you choose to
-; use subdirectories for session storage
-;
-; The file storage module creates files using mode 600 by default.
-; You can change that by using
-;
-; session.save_path = "N;MODE;/path"
-;
-; where MODE is the octal representation of the mode. Note that this
-; does not overwrite the process's umask.
session.save_path = "/tmp"
-
-; Whether to use cookies.
session.use_cookies = 1
-
-; This option enables administrators to make their users invulnerable to
-; attacks which involve passing session ids in URLs; defaults to 0.
-; session.use_only_cookies = 1
-
-; Name of the session (used as cookie name).
session.name = PHPSESSID
-
-; Initialize session on request startup.
session.auto_start = 0
-
-; Lifetime in seconds of cookie or, if 0, until browser is restarted.
session.cookie_lifetime = 0
-
-; The path for which the cookie is valid.
session.cookie_path = /
-
-; The domain for which the cookie is valid.
session.cookie_domain =
-
-; Handler used to serialize data. php is the standard serializer of PHP.
session.serialize_handler = php
-
-; Define the probability that the 'garbage collection' process is started
-; on every session initialization.
-; The probability is calculated by using gc_probability/gc_divisor,
-; e.g. 1/100 means there is a 1% chance that the GC process starts
-; on each request.
-
session.gc_probability = 1
session.gc_divisor = 100
-
-; After this number of seconds, stored data will be seen as 'garbage' and
-; cleaned up by the garbage collection process.
session.gc_maxlifetime = 1440
-
-; NOTE: If you are using the subdirectory option for storing session files
-; (see session.save_path above), then garbage collection does *not*
-; happen automatically. You will need to do your own garbage
-; collection through a shell script, cron entry, or some other method.
-; For example, the following script would is the equivalent of
-; setting session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes):
-; cd /path/to/sessions; find -cmin +24 | xargs rm
-
-; PHP 4.2 and less have an undocumented feature/bug that allows you to
-; to initialize a session variable in the global scope, albeit register_globals
-; is disabled. PHP 4.3 and later will warn you, if this feature is used.
-; You can disable the feature and the warning separately. At this time,
-; the warning is only displayed, if bug_compat_42 is enabled.
-
session.bug_compat_42 = 1
session.bug_compat_warn = 1
-
-; Check HTTP Referer to invalidate externally stored URLs containing ids.
-; HTTP_REFERER has to contain this substring for the session to be
-; considered as valid.
session.referer_check =
-
-; How many bytes to read from the file.
session.entropy_length = 0
-
-; Specified here to create the session id.
session.entropy_file =
-
-;session.entropy_length = 16
-
-;session.entropy_file = /dev/urandom
-
-; Set to {nocache,private,public,} to determine HTTP caching aspects
-; or leave this empty to avoid sending anti-caching headers.
session.cache_limiter = nocache
-
-; Document expires after n minutes.
session.cache_expire = 180
-
-; trans sid support is disabled by default.
-; Use of trans sid may risk your users security.
-; Use this option with caution.
-; - User may send URL contains active session ID
-; to other person via. email/irc/etc.
-; - URL that contains active session ID may be stored
-; in publically accessible computer.
-; - User may access your site with the same session ID
-; always using URL stored in browser's history or bookmarks.
session.use_trans_sid = 0
-
-; Select a hash function
-; 0: MD5 (128 bits)
-; 1: SHA-1 (160 bits)
session.hash_function = 0
-
-; Define how many bits are stored in each character when converting
-; the binary hash data to something readable.
-;
-; 4 bits: 0-9, a-f
-; 5 bits: 0-9, a-v
-; 6 bits: 0-9, a-z, A-Z, "-", ","
session.hash_bits_per_character = 4
-
-; The URL rewriter will look for URLs in a defined set of HTML tags.
-; form/fieldset are special; if you include them here, the rewriter will
-; add a hidden <input> field with the info which is otherwise appended
-; to URLs. If you want XHTML conformity, remove the form entry.
-; Note that all valid entries require a "=", even if no value follows.
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset="
-
-
-[Assertion]
-; Assert(expr); active by default.
-;assert.active = On
-
-; Issue a PHP warning for each failed assertion.
-;assert.warning = On
-
-; Don't bail out by default.
-;assert.bail = Off
-
-; User-function to be called if an assertion fails.
-;assert.callback = 0
-
-; Eval the expression with current error_reporting(). Set to true if you want
-; error_reporting(0) around the eval().
-;assert.quiet_eval = 0
-
-
-
-
-
-[exif]
-; Exif UNICODE user comments are handled as UCS-2BE/UCS-2LE and JIS as JIS.
-; With mbstring support this will automatically be converted into the encoding
-; given by corresponding encode setting. When empty mbstring.internal_encoding
-; is used. For the decode settings you can distinguish between motorola and
-; intel byte order. A decode setting cannot be empty.
-;exif.encode_unicode = ISO-8859-15
-;exif.decode_unicode_motorola = UCS-2BE
-;exif.decode_unicode_intel = UCS-2LE
-;exif.encode_jis =
-;exif.decode_jis_motorola = JIS
-;exif.decode_jis_intel = JIS
-
diff --git a/package/php/files/php.init b/package/php/files/php.init
index 210db4ad8..a113500b6 100644
--- a/package/php/files/php.init
+++ b/package/php/files/php.init
@@ -1,5 +1,5 @@
#!/bin/sh
-#PKG php-fastcgi
+#PKG php
#INIT 80
. /etc/rc.conf
@@ -9,13 +9,22 @@ case $1 in
autostop) ;;
autostart)
test x"${php:-NO}" = x"NO" && exit 0
+ test x"$php" = x"DAEMON" && test -x /bin/mksh && exec mksh -T- $0 start
exec sh $0 start
;;
start)
- /usr/bin/php ${php_flags} &
+ if [ -x /usr/bin/php-cgi ];then
+ /usr/bin/php-cgi -b /var/run/php5.sock &
+ else
+ /usr/bin/php -D
+ fi
;;
stop)
- kill $(pgrep -f /usr/bin/php)
+ if [ -x /usr/bin/php-cgi ];then
+ pkill php-cgi
+ else
+ pkill php
+ fi
;;
restart)
sh $0 stop
diff --git a/package/php/files/php.postinst b/package/php/files/php.postinst
new file mode 100644
index 000000000..3e358e7f2
--- /dev/null
+++ b/package/php/files/php.postinst
@@ -0,0 +1,3 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+add_rcconf php NO