chrometweaks.org

I have a iPage site. If I upgrade my plan, will my site get deleted?

Click Here To View All Answers...


My question is I have a iPage site. If I upgrade my plan, will my site get deleted? Many thanks for any response. My other question... Hi Guys,.

When I visit my OSC store for the very first time, or in a new browser I get these error messages -.

First, at the top of the screen above the actual iPage site -.

Warning: extract() [function.extract]: First argument should be an array in /home/sites/scorpiongymequipment.co.uk/public_html/includes/application_top.php on line.

221.

Then below my actual iPage site -.

Warning: Invalid argument supplied for foreach() in /home/sites/scorpiongymequipment.co.uk/public_html/includes/functions/sessions.php on line 111.

Funny thing is, as soon as I click an item, or page the errors dissapear and dont show up again? It only seems to happen on the very first page load and then it's gone..

This means that although the store seems to run unaffected, the very first thing a new customer see's are error messages, not good..

Any ideas, anyone?..

Comments (78)

I'm stumped. I'm not so sure what is the right answer. I'll do some poking around and get back to you if I got an useful answer. You should email the people at iPage as they probably could answer your iPage question..

Comment #1

Extract() is used to extract session variables so as to be available..

This is used for register globals fix..

You need to apply a condition on that line and chek the size of the $_SESSION that is being extracted if is 0 then do not call this function or apply @ so as to depress warning..

Satish..

Comment #2

Thanks Satish, you are correct I have a register globals fix in place..

Can you please tell how EXACTLY to edit the code and where to edit?..

Comment #3

Paste Your application_top.php that has extract function..

Satish Mantri..

Comment #4

Here is my application_top.php.

<?php.

/*.

$Id: application_top.php,v 1.280 2003/07/12 09:38:07 hpdl Exp $.

OsCommerce, Open Source E-Commerce Solutions.

Http://www.oscommerce.com.

Copyright (c) 2003 osCommerce.

Released under the GNU General Public License.

*/.

// Register Globals MOD - http://www.magic-seo-url.com.

If (version_compare(phpversion(), "4.1.0", "<") === true) {.

$_GET &= $HTTP_GET_VARS;.

$_POST &= $HTTP_POST_VARS;.

$_SERVER &= $HTTP_SERVER_VARS;.

$_FILES &= $HTTP_POST_FILES;.

$_ENV &= $HTTP_ENV_VARS;.

If (isset($HTTP_COOKIE_VARS)) $_COOKIE &= $HTTP_COOKIE_VARS;.

}.

If (!ini_get("register_globals")) {.

Extract($_GET, EXTR_SKIP);.

Extract($_POST, EXTR_SKIP);.

Extract($_COOKIE, EXTR_SKIP);.

}.

// start the timer for the page parse time log.

Define('PAGE_PARSE_START_TIME', microtime());.

// set the level of error reporting.

Error_reporting(E_ALL & ~E_NOTICE);.

// Check if register_globals is enabled..

// Since this is a temporary measure this message is hardcoded. The requirement will be removed before 2.2 is finalized..

/*if (function_exists('ini_get')) { // Register Globals MOD - http://www.magic-seo-url.com.

Ini_get('register_globals') or exit('Server Requirement Error: register_globals is disabled in your PHP configuration. This can be enabled in your php.ini configuration file or in the .htaccess file in your catalog directory.');.

}*/.

// Set the local configuration parameters - mainly for developers.

If (file_exists('includes/local/configure.php')) include('includes/local/configure.php');.

// include server parameters.

Require('includes/configure.php');.

If (strlen(DB_SERVER) < 1) {.

If (is_dir('install')) {.

Header('Location: install/index.php');.

}.

}.

// define the project version.

Define('PROJECT_VERSION', 'osCommerce 2.2-MS2');.

// set the type of request (secure or not).

$request_type = (getenv('HTTPS') == 'on') ? 'SSL' : 'NONSSL';.

// set php_self in the local scope.

If (!isset($PHP_SELF)) $PHP_SELF = $HTTP_SERVER_VARS['PHP_SELF'];.

If ($request_type == 'NONSSL') {.

Define('DIR_WS_CATALOG', DIR_WS_HTTP_CATALOG);.

} else {.

Define('DIR_WS_CATALOG', DIR_WS_HTTPS_CATALOG);.

}.

// include the list of project filenames.

Require(DIR_WS_INCLUDES'filenames.php');.

// include the list of project database tables.

Require(DIR_WS_INCLUDES'database_tables.php');.

// customization for the design layout.

Define('BOX_WIDTH', 125); // how wide the boxes should be in pixels (default: 125).

// include the database functions.

Require(DIR_WS_FUNCTIONS'database.php');.

// make a connection to the database... now.

Tep_db_connect() or die('Unable to connect to database server!');.

// set the application parameters.

$configuration_query = tep_db_query('select configuration_key as cfgKey, configuration_value as cfgValue from 'TABLE_CONFIGURATION);.

While ($configuration = tep_db_fetch_array($configuration_query)) {.

Define($configuration['cfgKey'], $configuration['cfgValue']);.

}.

// if gzip_compression is enabled, start to buffer the output.

If ( (GZIP_COMPRESSION == 'true') && ($ext_zlib_loaded = extension_loaded('zlib')) && (PHP_VERSION >= '4') ) {.

If (($ini_zlib_output_compression = (int)ini_get('zlib.output_compression')) < 1) {.

If (PHP_VERSION >= '4.0.4') {.

Ob_start('ob_gzhandler');.

} else {.

Include(DIR_WS_FUNCTIONS'gzip_compression.php');.

Ob_start();.

Ob_implicit_flush();.

}.

} else {.

Ini_set('zlib.output_compression_level', GZIP_LEVEL);.

}.

}.

// set the HTTP GET parameters manually if search_engine_friendly_urls is enabled.

If (SEARCH_ENGINE_FRIENDLY_URLS == 'true') {.

If (strlen(getenv('PATH_INFO')) > 1) {.

$GET_array = array();.

$PHP_SELF = str_replace(getenv('PATH_INFO'), '', $PHP_SELF);.

$vars = explode('/', substr(getenv('PATH_INFO'), 1));.

For ($i=0, $n=sizeof($vars); $i<$n; $i++) {.

If (strpos($vars[$i], '[]')) {.

$GET_array[substr($vars[$i], 0, -2)][] = $vars[$i+1];.

} else {.

$HTTP_GET_VARS[$vars[$i]] = $vars[$i+1];.

}.

$i++;.

}.

If (sizeof($GET_array) > 0) {.

While (list($key, $value) = each($GET_array)) {.

$HTTP_GET_VARS[$key] = $value;.

}.

}.

}.

}.

// define general functions used application-wide.

Require(DIR_WS_FUNCTIONS'general.php');.

Require(DIR_WS_FUNCTIONS'html_output.php');.

// set the cookie domain.

$cookie_domain = (($request_type == 'NONSSL') ? HTTP_COOKIE_DOMAIN : HTTPS_COOKIE_DOMAIN);.

$cookie_path = (($request_type == 'NONSSL') ? HTTP_COOKIE_PATH : HTTPS_COOKIE_PATH);.

// include cache functions if enabled.

If (USE_CACHE == 'true') include(DIR_WS_FUNCTIONS'cache.php');.

// include shopping cart class.

Require(DIR_WS_CLASSES'shopping_cart.php');.

// include navigation history class.

Require(DIR_WS_CLASSES'navigation_history.php');.

// some code to solve compatibility issues.

Require(DIR_WS_FUNCTIONS'compatibility.php');.

// check if sessions are supported, otherwise use the php3 compatible session class.

If (!function_exists('session_start')) {.

Define('PHP_SESSION_NAME', 'osCsid');.

Define('PHP_SESSION_PATH', $cookie_path);.

Define('PHP_SESSION_DOMAIN', $cookie_domain);.

Define('PHP_SESSION_SAVE_PATH', SESSION_WRITE_DIRECTORY);.

Include(DIR_WS_CLASSES'sessions.php');.

}.

// define how the session functions will be used.

Require(DIR_WS_FUNCTIONS'sessions.php');.

// set the session name and save path.

Tep_session_name('osCsid');.

Tep_session_save_path(SESSION_WRITE_DIRECTORY);.

// set the session cookie parameters.

If (function_exists('session_set_cookie_params')) {.

Session_set_cookie_params(0, $cookie_path, $cookie_domain);.

} elseif (function_exists('ini_set')) {.

Ini_set('session.cookie_lifetime', '0');.

Ini_set('session.cookie_path', $cookie_path);.

Ini_set('session.cookie_domain', $cookie_domain);.

}.

// set the session ID if it exists.

If (isset($HTTP_POST_VARS[tep_session_name()])) {.

Tep_session_id($HTTP_POST_VARS[tep_session_name()]);.

} elseif ( ($request_type == 'SSL') && isset($HTTP_GET_VARS[tep_session_name()]) ) {.

Tep_session_id($HTTP_GET_VARS[tep_session_name()]);.

}.

// start the session.

$session_started = false;.

If (SESSION_FORCE_COOKIE_USE == 'True') {.

Tep_setcookie('cookie_test', 'please_accept_for_session', time()+60*60*24*30, $cookie_path, $cookie_domain);.

If (isset($HTTP_COOKIE_VARS['cookie_test'])) {.

Tep_session_start();.

$session_started = true;.

}.

} elseif (SESSION_BLOCK_SPIDERS == 'True') {.

$user_agent = strtolower(getenv('HTTP_USER_AGENT'));.

$spider_flag = false;.

If (tep_not_null($user_agent)) {.

$spiders = file(DIR_WS_INCLUDES'spiders.txt');.

For ($i=0, $n=sizeof($spiders); $i<$n; $i++) {.

If (tep_not_null($spiders[$i])) {.

If (is_integer(strpos($user_agent, trim($spiders[$i])))) {.

$spider_flag = true;.

Break;.

}.

}.

}.

}.

If ($spider_flag == false) {.

Tep_session_start();.

$session_started = true;.

}.

} else {.

Tep_session_start();.

$session_started = true;.

}.

// Register Globals MOD - http://www.magic-seo-url.com.

If (!ini_get("register_globals")) {.

If (version_compare(phpversion(), "4.1.0", "<") === true) {.

If (isset($HTTP_SESSION_VARS)) $_SESSION &= $HTTP_SESSION_VARS;.

}.

Extract($_SESSION, EXTR_SKIP);.

}.

// set SID once, even if empty.

$SID = (defined('SID') ? SID : '');.

// verify the ssl_session_id if the feature is enabled.

If ( ($request_type == 'SSL') && (SESSION_CHECK_SSL_SESSION_ID == 'True') && (ENABLE_SSL == true) && ($session_started == true) ) {.

$ssl_session_id = getenv('SSL_SESSION_ID');.

If (!tep_session_is_registered('SSL_SESSION_ID')) {.

$SESSION_SSL_ID = $ssl_session_id;.

Tep_session_register('SESSION_SSL_ID');.

}.

If ($SESSION_SSL_ID != $ssl_session_id) {.

Tep_session_destroy();.

Tep_redirect(tep_href_link(FILENAME_SSL_CHECK));.

}.

}.

// verify the browser user agent if the feature is enabled.

If (SESSION_CHECK_USER_AGENT == 'True') {.

$http_user_agent = getenv('HTTP_USER_AGENT');.

If (!tep_session_is_registered('SESSION_USER_AGENT')) {.

$SESSION_USER_AGENT = $http_user_agent;.

Tep_session_register('SESSION_USER_AGENT');.

}.

If ($SESSION_USER_AGENT != $http_user_agent) {.

Tep_session_destroy();.

Tep_redirect(tep_href_link(FILENAME_LOGIN));.

}.

}.

// verify the IP address if the feature is enabled.

If (SESSION_CHECK_IP_ADDRESS == 'True') {.

$ip_address = tep_get_ip_address();.

If (!tep_session_is_registered('SESSION_IP_ADDRESS')) {.

$SESSION_IP_ADDRESS = $ip_address;.

Tep_session_register('SESSION_IP_ADDRESS');.

}.

If ($SESSION_IP_ADDRESS != $ip_address) {.

Tep_session_destroy();.

Tep_redirect(tep_href_link(FILENAME_LOGIN));.

}.

}.

// create the shopping cart & fix the cart if necesary.

If (tep_session_is_registered('cart') && is_object($cart)) {.

If (PHP_VERSION < 4) {.

$broken_cart = $cart;.

$cart = new shoppingCart;.

$cart->unserialize($broken_cart);.

}.

} else {.

Tep_session_register('cart');.

$cart = new shoppingCart;.

}.

// include currencies class and create an instance.

Require(DIR_WS_CLASSES'currencies.php');.

$currencies = new currencies();.

// include the mail classes.

Require(DIR_WS_CLASSES'mime.php');.

Require(DIR_WS_CLASSES'email.php');.

// set the language.

If (!tep_session_is_registered('language') || isset($HTTP_GET_VARS['language'])) {.

If (!tep_session_is_registered('language')) {.

Tep_session_register('language');.

Tep_session_register('languages_id');.

}.

Include(DIR_WS_CLASSES'language.php');.

$lng = new language();.

If (isset($HTTP_GET_VARS['language']) && tep_not_null($HTTP_GET_VARS['language'])) {.

$lng->set_language($HTTP_GET_VARS['language']);.

} else {.

$lng->get_browser_language();.

}.

$language = $lng->language['directory'];.

$languages_id = $lng->language['id'];.

}.

// include the language translations.

Require(DIR_WS_LANGUAGES$language'.php');.

// currency.

If (!tep_session_is_registered('currency') || isset($HTTP_GET_VARS['currency']) || ( (USE_DEFAULT_LANGUAGE_CURRENCY == 'true') && (LANGUAGE_CURRENCY != $currency) ) ) {.

If (!tep_session_is_registered('currency')) tep_session_register('currency');.

If (isset($HTTP_GET_VARS['currency'])) {.

If (!$currency = tep_currency_exists($HTTP_GET_VARS['currency'])) $currency = (USE_DEFAULT_LANGUAGE_CURRENCY == 'true') ? LANGUAGE_CURRENCY : DEFAULT_CURRENCY;.

} else {.

$currency = (USE_DEFAULT_LANGUAGE_CURRENCY == 'true') ? LANGUAGE_CURRENCY : DEFAULT_CURRENCY;.

}.

}.

// navigation history.

If (tep_session_is_registered('navigation')) {.

If (PHP_VERSION < 4) {.

$broken_navigation = $navigation;.

$navigation = new navigationHistory;.

$navigation->unserialize($broken_navigation);.

}.

} else {.

Tep_session_register('navigation');.

$navigation = new navigationHistory;.

}.

$navigation->add_current_page();.

// Shopping cart actions.

If (isset($HTTP_GET_VARS['action'])) {.

// redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled.

If ($session_started == false) {.

Tep_redirect(tep_href_link(FILENAME_COOKIE_USAGE));.

}.

If (DISPLAY_CART == 'true') {.

$goto = FILENAME_SHOPPING_CART;.

$parameters = array('action', 'cPath', 'products_id', 'pid');.

} else {.

$goto = basename($PHP_SELF);.

If ($HTTP_GET_VARS['action'] == 'buy_now') {.

$parameters = array('action', 'pid', 'products_id');.

} else {.

$parameters = array('action', 'pid');.

}.

}.

Switch ($HTTP_GET_VARS['action']) {.

// customer wants to update the product quantity in their shopping cart.

Case 'update_product' : for ($i=0, $n=sizeof($HTTP_POST_VARS['products_id']); $i<$n; $i++) {.

If (in_array($HTTP_POST_VARS['products_id'][$i], (is_array($HTTP_POST_VARS['cart_delete']) ? $HTTP_POST_VARS['cart_delete'] : array()))) {.

$cart->remove($HTTP_POST_VARS['products_id'][$i]);.

} else {.

If (PHP_VERSION < 4) {.

// if PHP3, make correction for lack of multidimensional array..

Reset($HTTP_POST_VARS);.

While (list($key, $value) = each($HTTP_POST_VARS)) {.

If (is_array($value)) {.

While (list($key2, $value2) = each($value)) {.

If (ereg ("(.*)\]\[(.*)", $key2, $var)) {.

$id2[$var[1]][$var[2]] = $value2;.

}.

}.

}.

}.

$attributes = ($id2[$HTTP_POST_VARS['products_id'][$i]]) ? $id2[$HTTP_POST_VARS['products_id'][$i]] : '';.

} else {.

$attributes = ($HTTP_POST_VARS['id'][$HTTP_POST_VARS['products_id'][$i]]) ? $HTTP_POST_VARS['id'][$HTTP_POST_VARS['products_id'][$i]] : '';.

}.

$cart->add_cart($HTTP_POST_VARS['products_id'][$i], $HTTP_POST_VARS['cart_quantity'][$i], $attributes, false);.

}.

}.

Tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));.

Break;.

// customer adds a product from the products page.

Case 'add_product' : if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) {.

$cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']);.

}.

Tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));.

Break;.

// performed by the 'buy now' button in product listings and review page.

Case 'buy_now' : if (isset($HTTP_GET_VARS['products_id'])) {.

If (tep_has_product_attributes($HTTP_GET_VARS['products_id'])) {.

Tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id='$HTTP_GET_VARS['products_id']));.

} else {.

$cart->add_cart($HTTP_GET_VARS['products_id'], $cart->get_quantity($HTTP_GET_VARS['products_id'])+1);.

}.

}.

Tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));.

Break;.

Case 'notify' : if (tep_session_is_registered('customer_id')) {.

If (isset($HTTP_GET_VARS['products_id'])) {.

$notify = $HTTP_GET_VARS['products_id'];.

} elseif (isset($HTTP_GET_VARS['notify'])) {.

$notify = $HTTP_GET_VARS['notify'];.

} elseif (isset($HTTP_POST_VARS['notify'])) {.

$notify = $HTTP_POST_VARS['notify'];.

} else {.

Tep_redirect(tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action', 'notify'))));.

}.

If (!is_array($notify)) $notify = array($notify);.

For ($i=0, $n=sizeof($notify); $i<$n; $i++) {.

$check_query = tep_db_query("select count(*) as count from "TABLE_PRODUCTS_NOTIFICATIONS" where products_id = '"$notify[$i]"' and customers_id = '"$customer_id"'");.

$check = tep_db_fetch_array($check_query);.

If ($check['count'] < 1) {.

Tep_db_query("insert into "TABLE_PRODUCTS_NOTIFICATIONS" (products_id, customers_id, date_added) values ('"$notify[$i]"', '"$customer_id"', now())");.

}.

}.

Tep_redirect(tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action', 'notify'))));.

} else {.

$navigation->set_snapshot();.

Tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));.

}.

Break;.

Case 'notify_remove' : if (tep_session_is_registered('customer_id') && isset($HTTP_GET_VARS['products_id'])) {.

$check_query = tep_db_query("select count(*) as count from "TABLE_PRODUCTS_NOTIFICATIONS" where products_id = '"$HTTP_GET_VARS['products_id']"' and customers_id = '"$customer_id"'");.

$check = tep_db_fetch_array($check_query);.

If ($check['count'] > 0) {.

Tep_db_query("delete from "TABLE_PRODUCTS_NOTIFICATIONS" where products_id = '"$HTTP_GET_VARS['products_id']"' and customers_id = '"$customer_id"'");.

}.

Tep_redirect(tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action'))));.

} else {.

$navigation->set_snapshot();.

Tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));.

}.

Break;.

Case 'cust_order' : if (tep_session_is_registered('customer_id') && isset($HTTP_GET_VARS['pid'])) {.

If (tep_has_product_attributes($HTTP_GET_VARS['pid'])) {.

Tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id='$HTTP_GET_VARS['pid']));.

} else {.

$cart->add_cart($HTTP_GET_VARS['pid'], $cart->get_quantity($HTTP_GET_VARS['pid'])+1);.

}.

}.

Tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));.

Break;.

}.

}.

// include the who's online functions.

Require(DIR_WS_FUNCTIONS'whos_online.php');.

Tep_update_whos_online();.

// include the password crypto functions.

Require(DIR_WS_FUNCTIONS'password_funcs.php');.

// include validation functions (right now only email address).

Require(DIR_WS_FUNCTIONS'validations.php');.

// split-page-results.

Require(DIR_WS_CLASSES'split_page_results.php');.

// infobox.

Require(DIR_WS_CLASSES'boxes.php');.

// auto activate and expire banners.

Require(DIR_WS_FUNCTIONS'banner.php');.

Tep_activate_banners();.

Tep_expire_banners();.

// auto expire special products.

Require(DIR_WS_FUNCTIONS'specials.php');.

Tep_expire_specials();.

// calculate category path.

If (isset($HTTP_GET_VARS['cPath'])) {.

$cPath = $HTTP_GET_VARS['cPath'];.

} elseif (isset($HTTP_GET_VARS['products_id']) && !isset($HTTP_GET_VARS['manufacturers_id'])) {.

$cPath = tep_get_product_path($HTTP_GET_VARS['products_id']);.

} else {.

$cPath = '';.

}.

If (tep_not_null($cPath)) {.

$cPath_array = tep_parse_category_path($cPath);.

$cPath = implode('_', $cPath_array);.

$current_category_id = $cPath_array[(sizeof($cPath_array)-1)];.

} else {.

$current_category_id = 0;.

}.

// include the breadcrumb class and start the breadcrumb trail.

Require(DIR_WS_CLASSES'breadcrumb.php');.

$breadcrumb = new breadcrumb;.

//$breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER);.

//$breadcrumb->add(HEADER_TITLE_CATALOG, tep_href_link(FILENAME_DEFAULT));.

// add category names or the manufacturer name to the breadcrumb trail.

If (isset($cPath_array)) {.

For ($i=0, $n=sizeof($cPath_array); $i<$n; $i++) {.

$categories_query = tep_db_query("select categories_name from "TABLE_CATEGORIES_DESCRIPTION" where categories_id = '"(int)$cPath_array[$i]"' and language_id = '"(int)$languages_id"'");.

If (tep_db_num_rows($categories_query) > 0) {.

$categories = tep_db_fetch_array($categories_query);.

$breadcrumb->add($categories['categories_name'], tep_href_link(FILENAME_DEFAULT, 'cPath='implode('_', array_slice($cPath_array, 0, ($i+1)))));.

} else {.

Break;.

}.

}.

} elseif (isset($HTTP_GET_VARS['manufacturers_id'])) {.

$manufacturers_query = tep_db_query("select manufacturers_name from "TABLE_MANUFACTURERS" where manufacturers_id = '"(int)$HTTP_GET_VARS['manufacturers_id']"'");.

If (tep_db_num_rows($manufacturers_query)) {.

$manufacturers = tep_db_fetch_array($manufacturers_query);.

$breadcrumb->add($manufacturers['manufacturers_name'], tep_href_link(FILENAME_DEFAULT, 'manufacturers_id='$HTTP_GET_VARS['manufacturers_id']));.

}.

}.

// add the products model to the breadcrumb trail.

If (isset($HTTP_GET_VARS['products_id'])) {.

$model_query = tep_db_query("select products_model from "TABLE_PRODUCTS" where products_id = '"(int)$HTTP_GET_VARS['products_id']"'");.

If (tep_db_num_rows($model_query)) {.

$model = tep_db_fetch_array($model_query);.

$breadcrumb->add($model['products_model'], tep_href_link(FILENAME_PRODUCT_INFO, 'cPath='$cPath'&products_id='$HTTP_GET_VARS['products_id']));.

}.

}.

// initialize the message stack for output messages.

Require(DIR_WS_CLASSES'message_stack.php');.

$messageStack = new messageStack;.

// set which precautions should be checked.

Define('WARN_INSTALL_EXISTENCE', 'true');.

Define('WARN_CONFIG_WRITEABLE', 'true');.

Define('WARN_SESSION_DIRECTORY_NOT_WRITEABLE', 'true');.

Define('WARN_SESSION_AUTO_START', 'true');.

Define('WARN_DOWNLOAD_DIRECTORY_NOT_READABLE', 'true');.

?>..

Comment #5

Extract($_SESSION, EXTR_SKIP);.

To.

@extract($_SESSION, EXTR_SKIP);.

All other extract cal to be @extract..

Satish..

Comment #6

That will let the script ignore any error caused by the SESSION and will continue the script with out causing a waring message..

Comment #7

Hi Guys,.

When I visit my OSC store for the very first time, or in a new browser I get these error messages -.

First, at the top of the screen above the actual iPage site -.

Warning: extract() [function.extract]: First argument should be an array in /home/sites/scorpiongymequipment.co.uk/public_html/includes/application_top.php on line.

221.

Then below my actual iPage site -.

Warning: Invalid argument supplied for foreach() in /home/sites/scorpiongymequipment.co.uk/public_html/includes/functions/sessions.php on line 111.

Funny thing is, as soon as I click an item, or page the errors dissapear and dont show up again? It only seems to happen on the very first page load and then it's gone..

This means that although the store seems to run unaffected, the very first thing a new customer see's are error messages, not good..

Any ideas, anyone?..

Comment #8

If you have Admin>Configuration>Sessions>Check User Agent = True, change it to False. See if that makes a difference...

Comment #9


This question was taken from a support group/message board and re-posted here so others can learn from it.