-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Custom PHP configuration
Richard Kuhnt edited this page Dec 9, 2019
·
9 revisions
If you want to customize the settings of your PHP Installation you should never edit the php.ini file inside the PHP directory. This file will not survive updates!
Always create your own custom configuration files inside the configuration scan directory %PHP_INI_SCAN_DIR%.
By default %PHP_INI_SCAN_DIR% is set to ~\scoop\apps\php\current\cli;~\scoop\apps\php\current\cli\conf.d;.
- Your custom
php.inishould be put into~\scoop\apps\php\current\cli - You can put custom
.inifiles into~\scoop\apps\php\current\cli\conf.d - You can create as many
.inifiles in~\scoop\apps\php\current\cli\conf.das you like - The
~\scoop\apps\php\current\clidirectory is a symlink to~\scoop\persist\php\cli, so it survives updates
Some basic settings like the timezone and limits
date.timezone = Europe/Berlin
max_execution_time = 60
memory_limit = 256M
post_max_size = 128M
upload_max_filesize = 128MEnabling debugging
display_errors = On
display_startup_errors = On
error_reporting = E_ALL
html_errors = OffInstall Xdebug via scoop bucket add extras and scoop install php-xdebug.
zend_extension=C:\Users\<user>\scoop\apps\php-xdebug\current\php_xdebug.dll
[xdebug]
xdebug.remote_enable=on
xdebug.remote_autostart=on
xdebug.remote_connect_back=onTake a look inside the php.ini to know what is available.
extension_dir=ext
extension=bz2
extension=curl
extension=fileinfo
extension=gd2
;extension=gettext
;extension=gmp
extension=intl
;extension=imap
;extension=interbase
;extension=ldap
extension=mbstring
extension=exif ; Must be after mbstring as it depends on it
;extension=mysqli
;extension=oci8_12c ; Use with Oracle Database 12c Instant Client
;extension=odbc
extension=openssl
;extension=pdo_firebird
extension=pdo_mysql
;extension=pdo_oci
;extension=pdo_odbc
extension=pdo_pgsql
extension=pdo_sqlite
extension=pgsql
;extension=shmop
; The MIBS data available in the PHP distribution must be installed.
; See http://www.php.net/manual/en/snmp.installation.php
;extension=snmp
;extension=soap
;extension=sockets
;extension=sodium
extension=sqlite3
;extension=tidy
;extension=xmlrpc
;extension=xslInstall cacert.pem via scoop install cacert and configure curl and openssl to use the cacert.pem.
[curl]
curl.cainfo="C:\Users\<user>\scoop\apps\cacert\current\cacert.pem"
[openssl]
openssl.cafile="C:\Users\<user>\scoop\apps\cacert\current\cacert.pem"
openssl.capath="C:\Users\<user>\scoop\apps\cacert\current\cacert.pem"Tip: You can use git to store your configurations