get_var( "SELECT VERSION() AS version" ); $mysqlinfo = $wpdb->get_results( "SHOW VARIABLES LIKE 'sql_mode'" ); $sql_mode = is_array( $mysqlinfo ) && !empty( $sql_mode ) ? $mysqlinfo[0]->Value : __( 'Not set', 'amazon-product-in-a-post-plugin' ); $allow_url_fopen = ini_get( 'allow_url_fopen' ) ? __( 'On', 'amazon-product-in-a-post-plugin' ) : __( 'Off', 'amazon-product-in-a-post-plugin' ); $max_execute = ini_get( 'max_execution_time' ) ? ini_get( 'max_execution_time' ) : __( 'N/A', 'amazon-product-in-a-post-plugin' ); $memory_limit = ini_get( 'memory_limit' ) ? ini_get( 'memory_limit' ) : __( 'N/A', 'amazon-product-in-a-post-plugin' ); $memory_usage = function_exists( 'memory_get_usage' ) ? round( memory_get_usage() / 1024 / 1024, 2 ) . __( ' MByte', 'amazon-product-in-a-post-plugin' ) : __( 'N/A', 'amazon-product-in-a-post-plugin' ); $xml = is_callable( 'xml_parser_create' ) ? __( 'Yes', 'amazon-product-in-a-post-plugin' ): __( 'No', 'amazon-product-in-a-post-plugin' ); $xml2 = extension_loaded( 'SimpleXML' ) ? __( 'Yes', 'amazon-product-in-a-post-plugin' ): __( 'No', 'amazon-product-in-a-post-plugin' ); $ms = function_exists( 'is_multisite' ) && is_multisite() ? __( 'Yes', 'amazon-product-in-a-post-plugin' ) : __( 'No', 'amazon-product-in-a-post-plugin' ); $site_title = get_bloginfo( 'name' ); $language = get_bloginfo( 'language' ); $theme = wp_get_theme(); $siteurl = get_option( 'siteurl' ); $homeurl = get_option( 'home' ); $db_version = get_option( 'db_version' ); $front_displays = get_option( 'show_on_front' ); $page_on_front = get_option( 'page_on_front' ); //$blog_public = get_option( 'blog_public' ); $perm_struct = get_option( 'permalink_structure' ); $appip_publickey = get_option('apipp_amazon_publickey', 'Not Set'); $appip_privatekey = base64_encode(get_option('apipp_amazon_secretkey', 'Not Set')); $appip_partner_id = get_option('apipp_amazon_associateid', 'Not Set'); $appip_dismiss = (bool)get_option('appip_dismiss_msg'); $apipphookexcerpt = (bool)get_option('apipp_hook_excerpt'); $apipphookcontent = (bool)get_option('apipp_hook_content'); $apippopennewwindow = (bool)get_option('apipp_open_new_window'); $apip_getmethod = get_option('apipp_API_call_method', 'wp_remote_request'); $encodemode = get_option('appip_encodemode', 'Not Set'); $cacheSec = (int) apply_filters( 'amazon_product_post_cache', get_option( 'apipp_amazon_cache_sec', 3600 ) ); $debug_key = get_option('apipp_amazon_debugkey'); $region = get_option('apipp_amazon_locale','.com (default)'); $single_only = (bool)get_option('appip_show_single_only'); $cache_ahead = (bool)get_option('apipp_amazon_cache_ahead'); $use_SSL_img = (bool)get_option('apipp_ssl_images'); $use_own_styles = (bool)get_option("apipp_product_styles_mine", false); //$styles_ver = get_option("apipp_product_styles_default_version","2.1"); $apipp_use_cartURL = (bool)get_option("apipp_use_cartURL"); $uselightbox = (bool)get_option('apipp_amazon_use_lightbox', true); $hasCurl = function_exists('curl_version') ? "Yes" : "No"; $appip_version = APIAP_PLUGIN_VER; $appip_dbversion = APIAP_DBASE_VER; $wpDebug = defined('WP_DEBUG') && (bool) WP_DEBUG == true ? 'On' : 'Off'; $hide_binding = (bool)get_option('apipp_hide_binding'); $hide_warnings = (bool)get_option('apipp_hide_warnings_quickfix'); $uninstall = (bool)get_option('apipp_uninstall'); $uninstall_all = (bool)get_option('apipp_uninstall_all'); $debug_info = array( 'Operating System' => PHP_OS, 'Server' => $_SERVER['SERVER_SOFTWARE'], 'Memory usage' => $memory_usage, 'MYSQL Version' => $sqlversion, 'SQL Mode' => $sql_mode, 'PHP Version' => PHP_VERSION, 'PHP Allow URL fopen' => $allow_url_fopen, 'PHP Curl Enabled' => $hasCurl, 'PHP Memory Limit' => $memory_limit, 'PHP Max Script Execute Time' => $max_execute, 'PHP XML support' => $xml, 'PHP SimpleXMLElement' => $xml2, 'WordPress SETTINGS' => 'divider', 'WP_DEBUG' => $wpDebug, 'Site URL' => $siteurl, 'Home URL' => $homeurl, 'WordPress Version' => $wp_version, 'WordPress DB Version' => $db_version, 'Multisite' => $ms, 'Active Theme' => $theme['Name'] . ' ' . $theme['Version'], 'Site Title' => $site_title, 'Site Language' => $language, 'Front Page Displays' => $front_displays === 'page' ? $front_displays . ' [ID = ' . $page_on_front . ']' : $front_displays, //'Search Engine Visibility' => $blog_public, 'Permalink Setting' => $perm_struct, 'PLUGIN SETTINGS' => 'divider', 'APIAP Version' => $appip_version, 'APIAP DB Version' => $appip_dbversion, 'Access Key ID' => $appip_publickey, 'Secret Key' => $appip_privatekey, 'Affiliate ID' => $appip_partner_id, 'Debug Key' => $debug_key, 'Dismiss Key Notice' => ($appip_dismiss ? 'Yes' : 'No'), 'Hook Excerpt' => ($apipphookexcerpt ? 'Yes' : 'No'), 'Hook Content' => ($apipphookcontent ? 'Yes' : 'No'), 'Links Open New Window' => ($apippopennewwindow ? 'Yes' : 'No'), 'Use cart URL?' => ($apipp_use_cartURL ? 'Yes' : 'No'), 'API Request Method' => ((int)$apip_getmethod == 1 ? 'CURL' :'fopen' ). ' (`wp_remote_request` v3.7.1+)', 'Encode Mode' => $encodemode, 'Cache Secs' => $cacheSec, 'Region/Locate' => $region, 'Show on Single Only' => ($single_only ? 'Yes' : 'No'), 'Enable Cache Ahead' => ($cache_ahead ? 'Yes' : 'No'), 'Use SSL imgs' => ($use_SSL_img ? 'Yes' : 'No') . ' (N/A v3.7+)', 'Use Custom CSS' => ($use_own_styles ? 'Yes' : 'No'), 'Use Internal lightbox' => ($uselightbox ? 'Yes' : 'No'), //'Styles Version' => $styles_ver, 'Hide Binding in Title' => ($hide_binding ? 'Yes' : 'No'), 'Quick Fix' => ($hide_warnings ? 'Yes' : 'No'), 'Clear data' => ($uninstall ? 'Yes' : 'No'), 'Remove ALL traces' => ($uninstall_all ? 'Yes' : 'No'), ); $debug_info['Active Plugins'] = 'divider'; $active_plugins = array(); $active_dropins = array(); $inactive_plugins = array('Inactive Plugins'=>'divider'); $mu_plugins = array(); $plugins = get_plugins(); $muplugins = get_mu_plugins(); $dropins = get_dropins(); foreach ( $plugins as $path => $plugin ) { if ( is_plugin_active( $path ) ) { $active_plugins ['active: '.$plugin['Name'] ] = $plugin['Version']; } else { $inactive_plugins ['inactive: '.$plugin['Name']] = $plugin['Version']; } } foreach ( $muplugins as $path => $plugin ) { $mu_plugins ['must-use: '.$plugin['Name'] ] = ($plugin['Version'] != '' ? $plugin['Version'] : 'N/A'); } foreach ( $dropins as $path => $plugin ) { $active_dropins ['drop-in: '.$plugin['Name'] ] = ($plugin['Version'] != '' ? $plugin['Version'] : 'N/A'); } $debug_info = array_merge($debug_info, $mu_plugins ); $debug_info = array_merge($debug_info, $active_dropins ); $debug_info = array_merge($debug_info, $active_plugins ); $debug_info = array_merge($debug_info, $inactive_plugins ); $mail_text = 'Amazon Product In a Post Debug Info' . "\r\n----------------------\r\n\r\n"; $page_text = ''; $page_text .= '

SERVER SETTINGS

$name