This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| php:macos-installation [2021-10-28] – dcai | php:macos-installation [2021-10-31] (current) – dcai | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | == mac installation == | + | ===== PHP 7.4 macOS installation |
| + | |||
| + | ==== install packages ==== | ||
| < | < | ||
| - | # fish shell | + | brew install php@7.4 nginx postgresql@12 |
| - | brew install php@7.4 nginx | + | # pecl install zip libsodium |
| - | pecl install zip libsodium | + | |
| # remove duplicated extension added in / | # remove duplicated extension added in / | ||
| + | brew link php@7.4 | ||
| + | brew link postgresql@12 | ||
| </ | </ | ||
| - | == update php fpm config == | + | |
| + | ==== setup postgres ==== | ||
| + | < | ||
| + | # init db | ||
| + | initdb -D / | ||
| + | # start db | ||
| + | postgres -D ~/ | ||
| + | echo "ALTER USER postgres WITH PASSWORD ' | ||
| + | </ | ||
| + | |||
| + | ==== update php fpm config | ||
| ''/ | ''/ | ||
| < | < | ||
| - | ; Start a new pool named ' | ||
| - | ; the variable $pool can be used in any directive and will be replaced by the | ||
| - | ; pool name (' | ||
| [www] | [www] | ||
| user = _www | user = _www | ||
| Line 21: | Line 31: | ||
| pm = ondemand | pm = ondemand | ||
| pm.max_children = 5 | pm.max_children = 5 | ||
| - | php_admin_value[memory_limit] = 1G | ||
| + | php_admin_flag[log_errors] = on | ||
| + | php_admin_flag[display_errors] = on | ||
| + | |||
| + | php_admin_value[memory_limit] = 1G | ||
| + | php_admin_value[upload_max_filesize] = 100M | ||
| + | php_admin_value[post_max_size] = 100M | ||
| + | php_admin_value[max_input_vars] = 5000 | ||
| + | php_admin_value[max_file_uploads] = 20 | ||
| + | php_admin_value[date.timezone] = Australia/ | ||
| + | php_admin_value[error_log] = / | ||
| </ | </ | ||
| - | == update nginx config == | + | ==== update nginx config |
| ''/ | ''/ | ||