/** * Checks for the existence of the Zend Framework. If not found, prints out some (hopefully) helpful information * @return bool true if Zend is found, *but* if not found calls wp_die() */ public static function checkIncludeZend() { if (!(include 'Zend/Loader.php')) { ob_start(); ?> <h1>Missing Zend Framework</h1> <p> This function requires part of the Zend framework that interacts with Google. <br/> It appears that either: </p> <ol> <li>The Zend Framework is not on the include_path or</li> <li>You do not have the Zend Framework installed</li> </ol> <p> <code>include_path="<?php echo ini_get('include_path'); ?> "</code><br/> <code>php.ini file is "<?php $phpInfo = CFDBCheckZendFramework::getPhpInfo(); echo $phpInfo['Loaded Configuration File']; ?> "</code><br/> </p> <ol> <li>locate the the <span style="font-weight: bold;">Zend</span> directory on your computer</li> <li>If found, here is one way to put it on the include path</li> <ol> <li style="list-style: lower-roman">copy the <span style="font-weight: bold;">php.ini</span> file to your WordPress installation to <span style="font-weight: bold;">[wp-dir]/wp-content/plugins/contact-form-7-to-database-extension/php.ini</span> </li> <li style="list-style: lower-roman">add a line to this new file:<br/> <code>include_path="<?php echo ini_get('include_path') . PATH_SEPARATOR . "[Zend-parent-directory]"; ?> "</code> </li> </ol> <li>If not found, install and configure Zend version 1.11.11 (or contact or administrator or host provider)<br/> See: <a target="_blank" href="http://code.google.com/apis/gdata/articles/php_client_lib.html">Getting Started with the Google Data PHP Client Library</a><br/> To download the part of Zend 1.11.11 required, see: <a target="_blank" href="http://framework.zend.com/download/gdata/">Zend GData</a> </li> </ol> <?php $errorHtml = ob_get_contents(); ob_end_clean(); include_once 'CFDBDie.php'; CFDBDie::wp_die($errorHtml, __('Missing Zend Framework', 'contact-form-7-to-database-extension'), array('response' => 200, 'back_link' => true)); // Doesn't actually return because we call wp_die return false; } return true; }