Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // === DoS ===
- // Maximum time a script can execute
- max_execution_time = 30
- // Maximum time a script can spend parsing request data
- max_input_time = 7200
- // Max memory a script can consume
- memory_limit = 128M
- // Limit the amount of data that can be POSTed to the
- // server. This affects file uploads as well.
- post_max_size = 4M
- // Limit the maximum size of a file uploaded to the server.
- upload_max_filesize = 4M
- // Limit the number of files that can be uploaded at a
- // single time.
- max_file_uploads = 10
- // === Loging ===
- error_reporting = E_ALL & ~E_DEPRECATED
- display_errors = Off
- display_startup_errors = Off
- log_errors = On
- log_errors_max_len = 1024
- // Do not ignore errors, log them all
- ignore_repeated_errors = Off
- ignore_repeated_source = Off
- // === Session ===
- // Save sessions as files in a specific directory
- session.save_handler = files
- session.save_path = "/tmp/phpsessions"
- // Require the use of cookies to prevent session
- // ID's from being included in URL's
- session.use_cookies = 1
- session.use_only_cookies = 1
- session.use_trans_sid = 0
- // Set the "secure" and "httponly" flags on the
- // cookie. This will prevent the cookie from
- // being sent over an HTTP connection or being
- // accessed by JavaScript, helping prevent
- // session hijacking attacks via XSS.
- session.cookie_secure = true
- session.cookie_httponly = true
- // Set cookie path and domain information to
- // limit where the cookie can be used, thus
- // protecting session data.
- session.cookie_path = /codewatch/
- session.cookie_domain = www.codewatch.org
- // Set the cookie to delete once the browser
- // is closed.
- session.cookie_lifetime = 0
- // Perform garbage collection on session data
- // after 15 minutes of inactivity.
- session.gc_maxlifetime = 900
- // Use a secure source for generating random
- // session ID's (set to a non-zero value
- // on Windows systems.
- session.entropy_file = /dev/urandom
- // Use a strong hashing algorithm to create
- // the session ID and use as many characters
- // as possible to reduce the likeliness that
- // the session ID can be guessed or hijacked.
- session.hash_function = 'sha512'
- session.hash_bits_per_character = 6
- // Send the nocache directive in HTTP(S)
- // responses to ensure the page can't be
- // cached. In addition, set the time-to-
- // live for the page to a low value.
- session.cache_limiter = nocache
- session.cache_expire = 15
- // === allow url ===
- allow_url_fopen = Off
- allow_url_include = Off
- // === register ===
- register_globals = Off
- register_long_arrays = Off
- register_argc_argv = Off
- // ==== disable functions ====
- disable_functions="exec,passthru,shell_exec,system,proc_open,popen,curl_exec,curl_multi_exec,parse_ini_file,show_source,phpinfo"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement