.
*/
class CFDBCheckZendFramework {
/**
* 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();
?>
Missing Zend Framework
This function requires part of the Zend framework that interacts with Google.
It appears that either:
- The Zend Framework is not on the include_path or
- You do not have the Zend Framework installed
include_path=""
php.ini file is
"
"
- locate the the Zend directory on your computer
- If found, here is one way to put it on the include path
- copy the php.ini file to your WordPress installation to
[wp-dir]/wp-content/plugins/contact-form-7-to-database-extension/php.ini
- add a line to this new file:
include_path=""
- If not found, install and configure Zend version 1.11.11 (or contact or administrator or host provider)
See: Getting
Started
with the Google Data PHP Client Library
To download the part of Zend 1.11.11 required, see: Zend
GData
200, 'back_link' => true));
// Doesn't actually return because we call wp_die
return false;
}
return true;
}
/**
* Taken from: http://www.php.net/manual/en/function.phpinfo.php#87214
* @return array key => array(values) from phpinfo call
*/
private static function getPhpInfo() {
ob_start();
phpinfo(INFO_GENERAL);
$phpinfo = array('phpinfo' => array());
if (preg_match_all('#(?:)|(?:(.*?)\s*(?:(.*?)\s*(?:(.*?)\s*)?)?
)#s', ob_get_clean(), $matches, PREG_SET_ORDER))
foreach ($matches as $match)
if (strlen($match[1]))
$phpinfo[$match[1]] = array();
elseif (isset($match[3]))
$phpinfo[end(array_keys($phpinfo))][$match[2]] = isset($match[4]) ? array($match[3], $match[4]) : $match[3];
else
$phpinfo[end(array_keys($phpinfo))][] = $match[2];
return $phpinfo['phpinfo'];
}
}