<html>
  <head>
    <title>Content Farmer Automated Support System</title>
    <style>BODY {background-image:url('http://www.contentfarmer.com/images/background.gif');margin:0px;padding:0px;}TABLE {background-color:white;} h3 {width:100%;text-align:center;color:#000099;}</style>
  </head>
  <body>
    <table width="768" align="center" height="600" cellpadding="5">
      <tr>
        <td valign="middle" align="center" style="border-bottom:3px #0000FF groove;height:60px;padding:0px;">
          <a href="http://www.contentfarmer.com/support"><img border="0" src="http://www.contentfarmer.com/images/support_bg.gif" alt="Content Farmer Automated Support System" title="Content Farmer Automated Support System" /></a>
        </td>
      </tr>
      <tr>
        <td valign="top">
          <h3>Server Configuration Test Script</h3>
          <p>Thank you for your interest in Content Farmer.  This script has been designed to test a server for all the features currently known to be required by Content Farmer.  If you see any <img src="http://www.contentfarmer.com/images/checks/orange_x.gif" alt="Yellow X Box" title="Yellow X Box" /> boxes, be sure to examine that item for any instructions.</p>
          <p><b>Please note:</b>  While this script checks for all known issues, no errors from this script <b><u>does not</u></b> imply or guarantee that there will be no errors.</p>
<?php
if (isset($_POST['db_username'])) { $ts_3 = true; if (version_compare(PHP_VERSION,'5.0.0','<=')) { echo '<img src="http://www.contentfarmer.com/images/checks/orange_x.gif" alt="Yellow X Box" title="Yellow X Box" /> PHP Version<br /><b>Resolution:</b> Minimum PHP version is 5.x.  This server\'s version is below this value at '.PHP_VERSION.' which is not supported by Content Farmer<br />'."\n\n"; $ts_3 = false; } else { echo '<img src="http://www.contentfarmer.com/images/checks/blue_check.gif" alt="Blue Check Box" title="Blue Check Box" /> PHP Version<br />'."\n\n"; } if (function_exists('ioncube_server_data') && function_exists('ioncube_loader_version')) { if (ioncube_loader_version() < '3.1') { echo '<img src="http://www.contentfarmer.com/images/checks/orange_x.gif" alt="Yellow X Box" title="Yellow X Box" /> IONCube<br /><b>Resolution:</b> Your IONCube loaders are old and require updating.  Please see <a href="http://www.ioncube.com/loaders.php">http://www.ioncube.com/loaders.php</a> for loaders and additional guidance or consult your server administrator and provide this message.<br />'."\n\n"; $ts_3 = false; } else { echo '<img src="http://www.contentfarmer.com/images/checks/blue_check.gif" alt="Blue Check Box" title="Blue Check Box" /> IONCube<br />'."\n\n"; } } else { echo '<img src="http://www.contentfarmer.com/images/checks/orange_x.gif" alt="Yellow X Box" title="Yellow X Box" /> IONCube<br /><b>Resolution:</b> IONCube loaders not detected.  These loaders are necessary for Content Farmer to run and can be downloaded from <a href="http://www.ioncube.com/loaders.php">http://www.ioncube.com/loaders.php</a>.<br />'."\n\n"; } if (!extension_loaded('openssl')) { echo '<img src="http://www.contentfarmer.com/images/checks/orange_x.gif" alt="Yellow X Box" title="Yellow X Box" /> SSL support not detected or corrupted. Content Farmer will be prevented from posting to Blogger on this server.<br />'."\n\n"; } else { echo '<img src="http://www.contentfarmer.com/images/checks/blue_check.gif" alt="Blue Check Box" title="Blue Check Box" /> SSL Installed<br />'."\n\n"; } $link = @mysql_connect($_POST['host'], $_POST['db_username'], $_POST['db_password']); if (!$link) { echo '<img src="http://www.contentfarmer.com/images/checks/orange_x.gif" alt="Yellow X Box" title="Yellow X Box" /> MySQL Version<br /><b>Resolution:</b> Unable to connect to the database with the given username and password.  MySQL version cannot be determined. Please check your username and password and try again.<br />'."\n\n"; $ts_3 = false; } else { if (@mysql_get_server_info() < '5.00') { echo '<img src="http://www.contentfarmer.com/images/checks/orange_x.gif" alt="Yellow X Box" title="Yellow X Box" /> MySQL Version<br /><b>Resolution:</b> Your MySQL version is '.mysql_get_server_info().' and 5.0+ is required by Content Farmer.  You will need to upgrade your version of PHP or use another host to use Content Farmer.<br />'."\n\n"; $ts_3 = false; } else { echo '<img src="http://www.contentfarmer.com/images/checks/blue_check.gif" alt="Blue Check Box" title="Blue Check Box" /> MySQL Version<br />'."\n\n"; } } if(ini_get("safe_mode")) { echo '<img src="http://www.contentfarmer.com/images/checks/orange_x.gif" alt="Yellow X Box" title="Yellow X Box" /> Safe Mode<br /><b>Resolution:</b> Safe mode is enabled which will cause problems with Content Farmer.  Configure the server to have safe mode off in order to use Content Farmer with this server.'."\n\n"; $ts_3 = false; } else { echo '<img src="http://www.contentfarmer.com/images/checks/blue_check.gif" alt="Blue Check Box" title="Blue Check Box" /> Safe Mode<br />'."\n\n"; } echo '<div style="display:none;" alt="This div used to suppress fsockopen failure from displaying.  @ not used b/c some errors were subsequently not populated into the $errno and $errstr variables.">'; $fp = fsockopen("www.contentfarmer.com", 80, $errno, $errstr, 30); echo '</div>'; if (!$fp) { echo '<img src="http://www.contentfarmer.com/images/checks/orange_x.gif" alt="Yellow X Box" title="Yellow X Box" /> URL Wrappers<br /><b>Resolution:</b> An atttempt to connect to www.contentfarmer.com using the same technology (fsockopen) to post failed. Your server reported the following error :<br />Error Number: '.$errno.'<br />Error Message: '.$errstr."\n\n"; $ts_3 = false; } else { if (ini_get('allow_url_fopen')) { echo '<img src="http://www.contentfarmer.com/images/checks/blue_check.gif" alt="Blue Check Box" title="Blue Check Box" /> URL Wrappers<br />'."\n\n"; } else { echo '<img src="http://www.contentfarmer.com/images/checks/orange_x.gif" alt="Yellow X Box" title="Yellow X Box" /> URL Wrappers<br /><b>Resolution:</b> The PHP setting <code>allow_url_fopen</code> was not set on.  Please set this value to on to allow Content Farmer to post and retrieve RSS/SE results. <br />'."\n\n"; $ts_3 = false; } fclose($fp); } if (error_reporting() & E_NOTICE) { echo '<img src="http://www.contentfarmer.com/images/checks/orange_x.gif" alt="Yellow X Box" title="Yellow X Box" /> Error Reporting<br /><b>Resolution:</b> Your server is configured to issue warnings and notices (error level '.error_reporting().') which will interrupt Content Farmer during operation.  Have your host disable notices and warnings by adjusting the <code>error_reporting</code> variable in <code>php.ini</code> <br />'."\n\n"; $ts_3 = false; } else { echo '<img src="http://www.contentfarmer.com/images/checks/blue_check.gif" alt="Blue Check Box" title="Blue Check Box" /> Error Reporting<br />'."\n\n"; } if (function_exists('mb_strlen')) { echo '<img src="http://www.contentfarmer.com/images/checks/blue_check.gif" alt="Blue Check Box" title="Blue Check Box" /> Multibyte String Support<br />'."\n\n"; } else { echo '<img src="http://www.contentfarmer.com/images/checks/orange_x.gif" alt="Yellow X Box" title="Yellow X Box" /> Multibyte String Support<br /><b>Resolution:</b> Ask your host to install the <a href="http://us2.php.net/manual/en/mbstring.installation.php">multibyte string extension</a>. <br />'."\n\n"; $ts_3 = false; } if ($ts_3) { echo '<center><div id="success_box" style="background-image:url(\'http://www.contentfarmer.com/images/TranslucentWHITE.gif\');position:relative;top:-200px;text-align:center;width:75%;padding:15px;border:3px #FF6600 groove;padding-top:0px;"><a herf="javascript:void(0);" onClick="document.getElementById(\'success_box\').style.display=\'none\';" style="cursor:pointer;float:right;">[ Close ]</a><div style="color:#FF6600;font-weight:bold;font-size:120%;margin-top:15px;">No Errors Detected<br /><i>This server is likely to work just fine with Content Farmer.</i></div><br /><a href="http://www.contentfarmer.com/">Return to contentfarmer.com</a><br /><br /><a href="http://www.teratask.com/index.php?page=checkout&add_cart_product=58&complete_notice=true">Purchase Content Farmer!</a></div></center>'; } } else { ?><form method="post" action="server_test.php">
            <p>Please enter your database information so that the MySQL connection can be tested.</p>Host: <input type="text" name="db_host" id="db_host" value="localhost" /><br />Username: <input type="text" name="db_username" id="db_username"  /><br />Password: <input type="text" name="db_password" id="db_password"  /><br /><input type="submit" value="Test Server" /></form>
<?php
 } ?></td></tr>
      <tr>
        <td valign="middle" align="center" style="height:60px;border-top:3px #0000FF groove;">&copy; 2005 - 2008 TeraTask Technologies, LLC.</td></tr>
    </table>
  </body>
</html>