Docs
PHP
Winginx includes PHP 5 and 7.
The index PHP script is index.php.
Included PHP extensions: GD2, cURL, mbstring, iconv, zlib, bzip2, zip, rar, mysql, sockets, exif, gettext, soap, xmlrpc, xsl, sqlite, mongo, memcache.
Default parameters of php.ini (winginx\php71\php.ini)
-
memory_limit = 128M — Memory limit
-
max_execution_time = 120 — Max execution time
-
max_input_time = 60 — Max input time
-
post_max_size = 50M — Max post data size
-
upload_max_filesize = 40M — Max upload file size
-
file_uploads = On — Allow file uploads
-
upload_tmp_dir = temp/php/upload — Upload temporary folder
-
date.timezone = Europe/Moscow — Timezone
-
session.use_cookies = 1 — Using cookies for sessions
-
session.name = PHPSESSID — Session name
-
default_socket_timeout = 60 — Socket timeout
-
short_open_tag = On — Short open tag
-
asp_tags = Off — ASP-like tags
-
error_reporting = E_ALL & ~E_NOTICE — Error reporting
-
display_errors = On — Display errors
-
html_errors = Off — Show HTML errors
-
log_errors = Off — Log errors
-
error_log = error.log — Error log filename
-
safe_mode = Off — Safemode
-
register_globals = Off — Register globals
-
register_long_arrays = Off — Register long arrays
-
variables_order = EGPCS — Variables order
-
magic_quotes_gpc = Off — Magic quotes
-
magic_quotes_runtime = Off — Magic quotes runtime
-
magic_quotes_sybase = Off — Magic quotes Sybase
-
allow_url_fopen = On — Remote access for fopen, file_get_contents
-
allow_url_include = Off — Remote include. Be attentive, it's danger!
Individual PHP config for a website
Web server Apache has the .htaccess system to configure individual params for a website. It's cool! But such files are useless in nginx :)
Yes, it is a bit of problem that has a solution, although it may seem unusual to those who always worked with Apache.
So. It is possible to configure PHP through a .user.ini file in the document root of a website, e.g. winginx\home\localhost\public_html.user.ini.
The syntax of .user.ini is similar to php.ini. Example:
memory_limit = 1024M
post_max_size = 500M
date.timezone = Asia/Irkutsk
It is recommended to configure .user.ini for a website, but not winginx\php5\php.ini.
All changes to .user.ini take effect immediately, you don't need to restart the server or PHP.
Note! This way you can configure PHP with Apache, if installed as CGI / FastCGI.