cancel
Showing results for 
Search instead for 
Did you mean: 

Best PHP settings

Best PHP settings

Hey everyone,

 

Just wanted to check in with everyone on this. I'm still using some default PHP settings for my multi-domain installation (1.9.2) but I wanted to get everyone elses take on them.

 

Anyone have recommended PHP settings? I get a couple thousand unique hits everyday and i'm running a 2 store, multi-domain install. 

5 REPLIES 5

Re: Best PHP settings

these are recommended:

 

max_execution_time = 7200
max_input_time = 7200
max_input_vars = 50000

memory_limit = 512M

post_max_size = 32M
upload_max_filesize = 32M

expose_php = Off

realpath_cache_size = 512k
realpath_cache_ttl = 86400

short_open_tag = On

session.gc_maxlifetime = 86400

mysql.allow_persistent = Off
mysqli.allow_persistent = Off

date.timezone = UTC
zend_extension=opcache.so
opcache.enable = 1
opcache.enable_cli = 1
opcache.memory_consumption = 256
opcache.interned_strings_buffer = 4
opcache.max_accelerated_files = 50000
opcache.max_wasted_percentage = 5
opcache.use_cwd = 1
opcache.validate_timestamps = 0
;opcache.revalidate_freq = 2
opcache.file_update_protection = 2
opcache.revalidate_path = 0
opcache.save_comments = 1
opcache.load_comments = 1
opcache.fast_shutdown = 0
opcache.enable_file_override = 0
opcache.optimization_level = 0xffffffff
opcache.inherited_hack = 1
opcache.blacklist_filename=/etc/php.d/opcache.blacklist.txt
opcache.max_file_size = 0
opcache.consistency_checks = 0
opcache.force_restart_timeout = 60
opcache.error_log = ""
opcache.log_verbosity_level = 1
opcache.preferred_memory_model = ""
opcache.protect_memory = 0
;opcache.mmap_base = ""
------------
MagenX - Magento and Server optimization

Re: Best PHP settings

I suggest not using short_open_tag.
Also 2hour execution time is a bit too much.
You can easly disable opcache.load_comments amd opcache.save_comments since mangento does not run any annotation analysis (this would be the only reason for having comments in opcache)

Re: Best PHP settings

Belong a lot to your server hardware. But you know the best PHP settings for all situations always the default settings from PHP team because they design PHP and they know what is the best. In another case, the recommend from @MagenX is a good point to try.

Re: Best PHP settings

Why are you recommending save_comments to be enabled?

Re: Best PHP settings

THANK YOU!!! I was looking for this too Smiley Happy Cat Very Happy

Everything happens for a reason