Guest User

Untitled

a guest
Feb 18th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.86 KB | None | 0 0
  1. <?php
  2. /**
  3. * @Title: cms_debug.php
  4. * @Description: Stand alone debugging information gathering tool for developers
  5. * @Author: FuntimeError
  6. **/
  7.  
  8.  
  9. println("XCel Gaming Clan CMS Debug Tool");
  10. println("Written by FuntimeError");
  11. println(' ');
  12. println("Performing Checks");
  13. println("Webroot is " .GetWebRoot());
  14.  
  15. checkExist(".htaccess");
  16. checkExist("clancms/controllers/install.php");
  17. checkExist("clancms/libraries/Installer.php");
  18. checkExist("clancms/views/install/");
  19. checkExist("clancms/views/install/sql/install.sql");
  20. checkExist("clancms/views/install/step1.php");
  21. checkExist("clancms/views/install/step2.php");
  22. checkExist("clancms/views/install/step3.php");
  23. checkExist("clancms/views/install/step4.php");
  24. checkExist("clancms/views/install/step5.php");
  25. checkExist("clancms/views/install/complete.php");
  26.  
  27.  
  28. if(ini_get('allow_url_fopen'))
  29. println("Allow URL fopen enabled");
  30. else
  31. println("Allow URL fopen disabled");
  32.  
  33. if(extension_loaded("mcrypt"))
  34. println("MCrypt enabled");
  35. else
  36. println("MCrypt disabled");
  37.  
  38. if(extension_loaded("zlib"))
  39. println("Zlib enabled");
  40. else
  41. println("Zlib disabled");
  42.  
  43. if(extension_loaded("xmlrpc"))
  44. println("xmlrpc enabled");
  45. else
  46. println("xmlrpc disabled");
  47.  
  48. if(extension_loaded("zip"))
  49. println("zip enabled");
  50. else
  51. println("zip disabled");
  52.  
  53. if(extension_loaded("gd"))
  54. println("gd enabled");
  55. else
  56. println("gd disabled");
  57.  
  58.  
  59. $url = $_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
  60. println("URL: " . $url);
  61.  
  62.  
  63.  
  64.  
  65. function checkExist($path)
  66. {
  67. if(file_exists(getWebRoot() . $path))
  68. {
  69. println($path . " exists");
  70. }
  71. else
  72. {
  73. println($path . " does not exist");
  74. }
  75. }
  76.  
  77.  
  78. function getWebRoot()
  79. {
  80. $dir_path = str_replace( $_SERVER['DOCUMENT_ROOT'], "", dirname(realpath(__FILE__)) ) . DIRECTORY_SEPARATOR;
  81. return $dir_path;
  82. }
  83.  
  84. function println($str)
  85. {
  86. echo $str . "<br />";
  87. }
  88. ?>
Add Comment
Please, Sign In to add comment