Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>That can’t be done in an <code>.htaccess</code>. More info <a href="https://stackoverflow.com/questions/7810975/disable-php-functions-via-htaccess">here</a>.</p> <p>But it does seem it can be done this way. Refer to the section that states 'in .htaccess in your public_html add the following:' <a href="http://wiki.elxis.org/wiki/PHP_settings" rel="nofollow noreferrer">here</a>:</p> <pre><code>php_flag short_open_tag Off php_flag register_globals Off php_flag display_errors Off php_flag magic_quotes_gpc Off php_value date.timezone "Europe/Athens" php_value session.save_path "/absolute/path/to/writable/folder/one_level_up_of/public_html" </code></pre> <p>Note where it states:</p> <blockquote> <p>php_value disable_functions "system, exec, passthru, shell_exec, suexec, dbmopen, popen, proc_open, disk_free_space, diskfreespace, set_time_limit, leak"</p> </blockquote> <p>And the footnote regarding that:</p> <blockquote> <p>these settings can only be changed through default php.ini file, if there are not configured as needed and you haven't access to php.ini contact to your hosting provider to set them for you!</p> </blockquote> <p><strong>EDIT:</strong> Also, do you have access the actual Apache2 virtual host configs? If so then you might want to research how to use <code>suhosin.executor.func.blacklist</code> instead; <a href="http://www.webhostingtalk.com/showthread.php?t=623944" rel="nofollow noreferrer">see this page</a>. Seems like that is a nicer way to have PHP functions disabled on a per host/domain basis. Perhaps even per <code>&lt;Directory&gt;</code> or <code>&lt;Location&gt;</code>? </p> <pre><code>&lt;VirtualHost 127.0.0.1&gt; ServerAlias www.test.com ServerAdmin webmaster@test.com DocumentRoot /home/test/public_html php_admin_value suhosin.executor.func.blacklist "passthru, show_source, shell_exec, system, pcntl_exec, popen, pclose, proc_open, proc_nice, proc_terminate, proc_get_status, proc_close, leak, apache_child_terminate, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, escapeshellcmd, escapeshellarg" &lt;/VirtualHost&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload