0byt3m1n1
Path:
/
home1
/
aserty
/
www
/
ourhomebedroom.com
/
wp-content
/
plugins
/
wp-indexer_off
/
[
Home
]
File: preload_errors.php
<?php /* This file is unencrypted on purpose. It does some initial environment, file and Ioncube checks to make sure that WPI will run on your blog. The advantage to doing this here, before we include encrypted files is so that we can control the errors and how they display. */ if( !function_exists('wpi_preload_errors') ) { function wpi_preload_errors() { $plugin_file_name = 'wp-indexer.php'; $plugin_folder_name = trim( dirname( plugin_basename(__FILE__) ) ); $plugin_path = plugin_dir_path(__FILE__); $wpi_preload_errors = array(); if( !extension_loaded('ionCube Loader') ) $wpi_preload_errors[] = "<b>WPI requires Ioncube loaders</b> on your server to run. You'll need to ask your host to install this for you."; #if( (bool) ini_get('safe_mode') ) #$wpi_preload_errors[] = "Your php.ini settings show that safe_mode is ON which can cause problems. Contact your host to see if they will turn this off."; if( !function_exists('curl_init') ) $wpi_preload_errors[] = "It looks like your server doesn't have cURL installed - you'll need this. Ask your host to install it for you."; if( $plugin_folder_name !== str_replace('.php', '', $plugin_file_name) ) $wpi_preload_errors[] = "The plugin folder is incorrectly named! Please change the plugin folder to '$plugin_folder_name' (without quotes) to ensure things work correctly :)"; if( strnatcmp( phpversion(), '5.2' ) < 0 ) $wpi_preload_errors[] = "Your PHP version is " . phpversion() . " and not the minimum required (5.2). Upgrade the PHP version or try ' . WPI_NAME . ' on a different server."; global $wp_version; if( strnatcmp( $wp_version, '3.5' ) < 0 ) $wpi_preload_errors[] = "Your WordPress version is ' . $wp_version . ' and not the minimum recommended (3.5). Upgrade WordPress to fix this issue."; if( file_exists( ABSPATH.PLUGINDIR."/$plugin_file_name" ) ) $wpi_preload_errors[] = "It looks like you haven't uploaded the plugin correctly. It should be in it's own folder - not directly in the plugins folder. The correct path should be 'wp-content/plugins/" . WPI_FOL; if( !is_writable($plugin_path . 'txt/log.txt') ) $wpi_preload_errors[] = "WPI needs to log it's activity in a text file, but it's not writable by your server. You need to chmod the following file to 777 in your FTP program: /wp-content/plugins/wp-indexer/txt/log.txt"; if( !file_exists($plugin_path . 'txt/stopwords.txt') ) $wpi_preload_errors[] = "Can't file the list of stopwords. WPI expected it to be here: /wp-content/plugins/wp-indexer/txt/stopwords.txt"; if( !empty($wpi_preload_errors) ) return $wpi_preload_errors; return false; } } if( !function_exists('wpi_admin_preload_errors') ) { add_action('admin_notices', 'wpi_admin_preload_errors'); function wpi_admin_preload_errors() { $errors = wpi_preload_errors(); if( empty($errors) ) return; echo '<div class="error">'; echo '<p><b>WP Indexer Errors:</b></p>'; foreach( $errors as $num => $err ) echo "<p><b>" . ($num+1) . ".</b> $err</p>"; echo '</div>'; } }