Last active
March 16, 2016 04:14
-
-
Save 3D-I/61c79dbf3aee821c3f2b to your computer and use it in GitHub Desktop.
Checks the SSL and cURL status of your server configuration
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 | |
/** | |
* Usage: Download and unzip the file, upload it to your Board's root (i.e.: www.mydomain.com/phpBB3/) | |
* Point your browser to i.e.: www.mydomain.com/phpBB3/fb.php - results will be on your screen | |
* @package - fb.php 1.0.0-a1 | |
* @copyright (c) 2016 3Di (Marco T.) 14-Mar-2016 | |
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 | |
*/ | |
define('IN_PHPBB', true); | |
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './'; | |
$phpEx = substr(strrchr(__FILE__, '.'), 1); | |
include($phpbb_root_path . 'common.' . $phpEx); | |
// Start session management | |
$user->session_begin(); | |
$auth->acl($user->data); | |
$v = curl_version(); | |
print $v['ssl_version']; | |
if (curl_version()['features'] & CURL_VERSION_SSL) | |
{ | |
echo "<br>SSL is supported with this cURL installation."; | |
} | |
else if (!curl_version()['features'] & CURL_VERSION_SSL) | |
{ | |
echo "<br>SSL is not supported with this cURL installation."; | |
} | |
if (extension_loaded('openssl')) | |
{ | |
echo '<br>https = extension openssl is loaded'; | |
} | |
else if (!extension_loaded('openssl')) | |
{ | |
echo '<br>http = extension openssl not loaded'; | |
} | |
/* Is allow_url_fopen enabled */ | |
if(ini_get('allow_url_fopen')) | |
{ | |
echo '<br>allow_url_fopen is enabled<br>'; | |
} | |
else if(!ini_get('allow_url_fopen')) | |
{ | |
echo '<br>allow_url_fopen is disabled<br>'; | |
} | |
/* if https is in the list is also good */ | |
echo '<br>If https is in this list is also good: <br>'; | |
echo implode(', ', stream_get_wrappers()); | |
/* Attempting to delete this file */ | |
function remove_me() | |
{ | |
@unlink(__FILE__); | |
/** Windows IIS servers may have a problem with unlinking recently created files. | |
* * So check if file exists and give a message | |
*/ | |
if (file_exists(__FILE__)) | |
{ | |
echo '<font color="blue">File could not be deleted. You will | |
need to manually delete the ' . basename(__FILE__) . ' file from the server.</font>'; | |
} | |
} | |
/* Hasta la vista! */ | |
echo '<br><br><br><font color="blue">Copy-paste these results or make a screenshot for further support...<br>...I am self destroying, hasta la vista!</font>'; | |
/* uncomment the following line to turn on PHP info. */ | |
//phpinfo(); | |
/* comment out the following line to turn off the self-destroyer. */ | |
remove_me(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment