List functions disabled in PHP

Posted in Programming  
E-Mail This Post/Page   

I've got a web client having some really odd problems with a program of mine logging him out randomly. Normally I upload a phpinfo file and use that to see if I could find out anything but when I did that I got an error that phpinfo had been disabled for "security purposes".

What I really needed was a list of what other functions have been disabled, so I put together the little script below to pull the list of disabled functions, sort them, and then echo them out. Of course if ini_get has been disabled then I might be in trouble and have to actually ask the host for the list.

PHP:
  1. <?php
  2. $disabled_functions = ini_get('disable_functions');
  3. if ($disabled_functions!='')
  4. {
  5. $arr = explode(',', $disabled_functions);
  6. sort($arr);
  7. echo 'Disabled Functions:
  8. ';
  9. for ($i=0; $i
  10. {
  11. echo $i.' - '.$arr[$i].'<br>';
  12. }
  13. }
  14. else
  15. {
  16. echo 'No functions disabled';
  17. }
  18. ?>

GoDaddy and disabled PHP functions
is_safe_mode function for PHP
America tops the list of top spammers
Benchmarking PHP functions
Javascript to limit input

Leave a Comment