whoami7 - Manager
:
/
home
/
heliksvi
/
core101.com
/
Upload File:
files >> /home/heliksvi/core101.com/phpinfo.php
<? function htmlpath($relative_path) { $realpath = realpath($relative_path); $htmlpath = str_replace($_SERVER['DOCUMENT_ROOT'], '', $realpath); return $htmlpath; } function gdVersion($user_ver = 0) { if (! extension_loaded('gd')) { return; } static $gd_ver = 0; // Just accept the specified setting if it's 1. if ($user_ver == 1) { $gd_ver = 1; return 1; } // Use the static variable if function was called previously. if ($user_ver != 2 && $gd_ver > 0) { return $gd_ver; } // Use the gd_info() function if possible. if (function_exists('gd_info')) { $ver_info = gd_info(); preg_match('/\d/', $ver_info['GD Version'], $match); $gd_ver = $match[0]; return $match[0]; } // If phpinfo() is disabled use a specified / fail-safe choice... if (preg_match('/phpinfo/', ini_get('disable_functions'))) { if ($user_ver == 2) { $gd_ver = 2; return 2; } else { $gd_ver = 1; return 1; } } // ...otherwise use phpinfo(). ob_start(); phpinfo(8); $info = ob_get_contents(); ob_end_clean(); $info = stristr($info, 'gd version'); preg_match('/\d/', $info, $match); $gd_ver = $match[0]; return $match[0]; } // End gdVersion() /* *********************************check server configuration *****************************************************/ $ivo = "<span class='install_value_ok'>"; $ivf = "<span class='install_value_fail'>"; $sc = "</span>"; $gdv = gdVersion(); $val1 = ini_get("safe_mode"); $val2 = ini_get("short_open_tag"); $val3 = ini_get("file_uploads"); $val4 = ini_get("open_basedir"); /* $openbasedircheck = "0" ; if ((!empty($val4) || $val4 == 1) and (!empty($val3) || $val3 == 1)) { if ($_POST["submittest"] == "Upload") { $uploadpath = substr($_FILES['testupload']['tmp_name'], 0, strlen($_FILES['testupload']['tmp_name']) - strlen(basename($_FILES['testupload']['tmp_name']))-1); $uploadpatharray = explode("/", $uploadpath); $openbasedirarray = explode(":", $val4); $existflag = 0; $checkitem = ""; for($i = 1;$i < count($uploadpatharray);$i++) { $checkitem = $checkitem . "/" . $uploadpatharray[$i]; if (! in_array($checkitem, $openbasedirarray) and ! in_array($checkitem . "/", $openbasedirarray)) {; } else { $existflag = 1; break; } } if ($existflag == 1) { $openbasedircheck = "1"; } else { $errormessageforopenbasedir = "<br> " . $ivf . "Please add '$uploadpath' in openbase directory entry of your configuration file.[contact your hosting provider]"; } $_SESSION['sess_openbasedircheck'] = $openbasedircheck; } } else { $_SESSION['sess_openbasedircheck'] = "1"; } */ $gdvsupport = true; $errmess_gdsupport = ""; if ($gdv) { $gdvsupportarray = gd_info(); $z = 0; foreach($gdvsupportarray as $key => $value) { if ($z == 3 or $z == 10) {; } else { if ($gdvsupportarray[$key]) {; } else { $gdvsupport = false; $errmess_gdsupport .= $key . " required,"; } } $z++; } } $curlsupport = true; if (!function_exists('curl_version')) { $curlsupport = false; } if ((! empty($val1) || $val1 == 1) or (empty($val2) || $val2 != 1) or (empty($val3) || $val3 != 1) or ! $gdv or !$gdvsupport or !$curlsupport or $_SESSION['sess_openbasedircheck'] != '1') { $serverconfiguration = "FAILURE"; } else { $serverconfiguration = "OK"; } /***********Server configuration check ends here*****************/ ?> <style> .install_option { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9pt; color: #333333} .install_value_ok { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9pt; font-weight: bold; color: #009900 } .install_value_fail { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 7pt; font-weight: bold; color: #CC0000} --> </style> <table width="100%" align=center><tr> <td align=center> <table width="100%" border=0> <tr> <td colspan=4> </td> </tr> <?php //$serverconfiguration="FAIKL"; if ($serverconfiguration=="OK") { ?> <tr> <td colspan=4 class="listingmain"> <table width="100%" border="0" cellpadding="0" cellspacing="0" class=maintext> <tr class="blacksub"> <td align="center"> Server Configuration OK!! </td> </tr> </table> </td> </tr> <tr> <td colspan=4> </td> </tr> <?php } else { ?> <tr> <td colspan=4 > <table width="100%" border=0 cellpadding="0" cellspacing="0" class=maintext> <?php echo "<tr><td class=maintext align=left><b>Preinstall Check</b><br><br></td></tr>"; echo "<tr><td class=maintext align=left>Checking PHP Version... " . $ivo . PHP_VERSION . $sc . " "; if (version_compare(PHP_VERSION, "5.0") >= 0) echo $ivo . "(ok)" . $sc; else { echo $ivf . "(5.0 or higher required)" . $sc; $fatal = true; } echo "</td></tr>"; echo "<tr><td class=maintext align=left>Checking System Information... " . $ivo . PHP_OS . $sc . "</td></tr>"; echo "<tr><td class=maintext align=left>Checking PHP Server API... " . $ivo . php_sapi_name() . $sc . "</td></tr>"; echo "<tr><td class=maintext align=left>Checking Path to 'php.ini'... " . $ivo . PHP_CONFIG_FILE_PATH . $sc . "</td></tr>"; //$curlversion = curl_version(); echo "<tr><td class=maintext align=left>Checking Curl Version... " . $ivo . curl_version() . " (ok)". $sc."</td></tr>";; //echo $ivo . (($curlsupport) ? "$curlversion" : " $ivf This program requires Curl extension. Please recompile your PHP with Curl Support.") . $sc; echo "</td></tr>"; /*echo "<tr><td class=maintext align=left>Checking PHP GD extension... "; echo $ivo . (($gdv) ? "On" : " $ivf This program requires PHP GD extension. Please recompile your PHP with GD Support.") . $sc; echo "</td></tr>"; if ($errmess_gdsupport != "") { echo "<tr><td class=maintext align=left>Checking currently installed GD library ... "; echo $ivo . (($gdvsupport) ? "On" : " $ivf $errmess_gdsupport.") . $sc; echo "</td></tr>"; } */ echo "<tr><td class=maintext align=left>Checking safe_mode... "; echo ((!empty($val1) || $val1 == 1) ? $ivf . "On-Please turn off safe_mode in the php.ini" : $ivo . "Off") . $sc; echo "</td></tr>"; /*echo "<tr><td class=maintext align=left>Checking short_tags... "; echo ((!empty($val2) || $val2 == 1) ?$ivo . "On" : $ivf . "Off-Please turn on short_tags in the php.ini") . $sc; echo "</td></tr>"; echo "<tr><td class=maintext align=left>Checking file_uploads..."; echo ((!empty($val3) || $val3 == 1) ? $ivo . "On" : $ivf . "Off - Please turn on file_uplaods in the php.ini file") . $sc; echo "</td></tr>"; */ echo "<tr><td class=maintext align=left>Checking open base directory..."; echo (( (!empty($val4) || $val4 == 1) and $openbasedircheck != "1") ? $ivf . "On - $ivf Please upload a test file " : $ivo . "Off ") . $sc . "</td></tr>"; echo "<tr><td class=maintext align=left>"; if ((!empty($val4) || $val4 == 1) and (!empty($val3) || $val3 == 1)) { if ($_POST["submittest"] == "Upload") { echo $errormessageforopenbasedir; $_SESSION['sess_openbasedircheck'] = $openbasedircheck; } if ($openbasedircheck != "1") { ?> <!-- <form name=frmInstall method=post action="" enctype="multipart/form-data"> file : <input type=file name=testupload class=textbox> <INPUT type="submit" name="submittest" value="Upload" class=button> </form> --> <?php } } echo "</td></tr>"; if ((! empty($val1) || $val1 == 1) or (empty($val2) || $val2 != 1) or (empty($val3) || $val3 != 1) or ! $gdv /*or $openbasedircheck != '1'*/) { echo "<tr><td class=maintext><br>" . $ivf . "Fatal errors detected. Please correct the above red items and reload.</td></tr>"; } ?> </table> </td> </tr> <tr> <td> </td> </tr> <tr> <td> </td> </tr> <tr> <td> </td> </tr> <?php } ?> </table> </td> </tr> </table>
Copyright ©2021 || Defacer Indonesia