You can disable certain php functions for security reasons, simply by change the php.ini file. The first thing you have to do is searching for the following line
if you see a semicolon in front of it, remove it. Now you can specify a comma separated list of php functions you want to to disabled. We take some common used functions for example which we will disable for use. However, those functions are not the best nominated to be disabled….
Save your php.ini file and restart your server, probably apache.
If you would use those functions like this:
<?php
echo strtoupper('uppercase');
echo substr('substring', 1, 2);
mysql_connect('localhost', 'user', 'pass');
echo '<br />Result:'. pow(2, 3);
?>
you would receive the following warnings (if enabled) when you request the page…
Warning: substr() has been disabled for security reasons in C:\server\htdocs\index.php on line 3
Warning: mysql_connect() has been disabled for security reasons in C:\server\htdocs\index.php on line 4
Result:8
You would see the result of pow() as that specific function is not listed.
Mail this!
- Comments (0)
- PingBacks (0)
- TrackBacks (0)


» Latest comments