suhosin and apc needs config
hyperknot opened this issue · comments
Zsolt Ero commented
- Suhosin gets installed, even though I found no place where it's explicitly listed.
- Both Suhosin and APC needs to be configured or disabled.
I've found the following script to configure APC and Suhosin and general PHP values, please decide what you consider the best values on these:
source: https://github.com/ilevkov/lowendscript/blob/master/setup-debian.sh
cat > /etc/php5/conf.d/apc.ini <<END
[APC]
extension=apc.so
apc.enabled=1
apc.shm_segments=1
apc.shm_size=16
apc.ttl=7200
apc.user_ttl=7200
apc.num_files_hint=1024
apc.mmap_file_mask=/tmp/apc.XXXXXX
apc.max_file_size = 1M
apc.post_max_size = 1000M
apc.upload_max_filesize = 1000M
apc.enable_cli=0
apc.rfc1867=0
END
cat > /etc/php5/conf.d/suhosin.ini <<END
; configuration for php suhosin module
extension=suhosin.so
suhosin.executor.include.whitelist="phar"
suhosin.request.max_vars = 2048
suhosin.post.max_vars = 2048
suhosin.request.max_array_index_length = 256
suhosin.post.max_array_index_length = 256
suhosin.request.max_totalname_length = 8192
suhosin.post.max_totalname_length = 8192
suhosin.sql.bailout_on_error = Off
END
if [ -f /etc/php5/fpm/php.ini ]
then
sed -i \
"s/upload_max_filesize = 2M/upload_max_filesize = 200M/" \
/etc/php5/fpm/php.ini
sed -i \
"s/post_max_size = 8M/post_max_size = 200M/" \
/etc/php5/fpm/php.ini
sed -i \
"s/memory_limit = 128M/memory_limit = 96M/" \
/etc/php5/fpm/php.ini
fi
Max Schaefer commented
Looking into this, thanks!
Max Schaefer commented
I will work with you over Skype, thanks!