chrometweaks.org

Where can I get free web iPage hosting services?

Click Here To View All Answers...


Got a question, hope someone can answer... Where can I get free web iPage hosting services? Many thanks for any response. 2nd question I got is.. I have tried to install the all_products contribution - it didn't work, so I loaded a backup.

When ever I try to save a new product, og try to save changes to an old product, I get this error:.

Warning: Cannot add header information - headers already sent by (output started at /customers/hstrading.dk/hstrading.dk/httpd.www/catalog/admin/includes/application_top.php:11) in /customers/hstrading.dk/hstrading.dk/httpd.www/catalog/admin/includes/functions/general.php on line 18.

This I also happening if I try to load an SQL backup, it does, however - appear that the data actually IS saved, but the error appears..

I've gone pretty desperate, as I have loaded both SQL backups, and backups of the entire iPage site - but nothing has helped..

- Can anybody help me here ?

Comments (13)

I would like to know the answer too. Anyone here know what is the answer. I'll do some poking around and get back to you if I find an anything. You should email the people at iPage as they probably could answer your iPage question..

Comment #1

I didn't even think the all products contrib affected the admin area, you must have installed another contrib or really messed up your all products contrib install. those errors look weird though, does the rest of your iPage site work? Do you only get the error when you try and make changes with your admin?..

Comment #2

I have messed around a bit with a few other contribs - but it was after doing the all products contrib I saw the error for the first time..

My iPage site works perfectly - except I get this error..

I have only been able to get the error when working through the admin module, I even tried to make a test order - it worked fine..

So the error must be somewhere in the admin module... ? How do I find it... ?

Comment #3

Header Whitespace.

Download the file catalog/admin/includes/application_top.php open it and place your cursor after the last ?> then press delete several times, save the file and upload it..

Do not use the file manager to edit online as this can cause the whitespace..

Instead use an ftp program such as ws_ftp to download the file to a local machine and edit then upload using the ftp program.

If you require more information then.

Click..

Comment #4

Tried it just now, sad to say, it didn't solve the problem.... :-(..

Comment #5

I've read you link - but I do not understand what to do about this error..

I really would like it to 'go away' :-).

So if you have any suggestions what to do - please say so :-).

If it is of any help to you guys, here is my application_top.php:.

<?php.

Session_start ();.

// Use $HTTP_SESSION_VARS with PHP 4.0.6 or less.

If (!isset($_SESSION['IsAdminLoggedIn']) || $_SESSION['IsAdminLoggedIn'] != 1) {.

Header("Location: index_login.php?ALE=0");.

}.

?>.

<?php.

/*.

$Id: application_top.php,v 1.162 2003/07/12 09:39:03 hpdl Exp $.

OsCommerce, Open Source E-Commerce Solutions.

Http://www.oscommerce.com.

Copyright © 2003 osCommerce.

Released under the GNU General Public License.

*/.

// Start the clock 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')) {.

Ini_get('register_globals') or exit('FATAL ERROR: register_globals is disabled in php.ini, please enable it!');.

}.

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

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

// Include application configuration parameters.

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

// Define the project version.

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

// set php_self in the local scope.

$PHP_SELF = (isset($HTTP_SERVER_VARS['PHP_SELF']) ? $HTTP_SERVER_VARS['PHP_SELF'] : $HTTP_SERVER_VARS['SCRIPT_NAME']);.

// Used in the "Backup Manager" to compress backups.

Define('LOCAL_EXE_GZIP', '/usr/bin/gzip');.

Define('LOCAL_EXE_GUNZIP', '/usr/bin/gunzip');.

Define('LOCAL_EXE_ZIP', '/usr/local/bin/zip');.

Define('LOCAL_EXE_UNZIP', '/usr/local/bin/unzip');.

// 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).

// Define how do we update currency exchange rates.

// Possible values are 'oanda' 'xe' or ''.

Define('CURRENCY_SERVER_PRIMARY', 'oanda');.

Define('CURRENCY_SERVER_BACKUP', 'xe');.

// 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 application wide 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']);.

}.

// define our general functions used application-wide.

Require(DIR_WS_FUNCTIONS'general.php');.

Require(DIR_WS_FUNCTIONS'html_output.php');.

// initialize the logger class.

Require(DIR_WS_CLASSES'logger.php');.

// include shopping cart class.

Require(DIR_WS_CLASSES'shopping_cart.php');.

// some code to solve compatibility issues.

Require(DIR_WS_FUNCTIONS'compatibility.php');.

// check to see if php implemented session management functions - if not, include php3/php4 compatible session class.

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

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

Define('PHP_SESSION_PATH', '/');.

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('osCAdminID');.

Tep_session_save_path(SESSION_WRITE_DIRECTORY);.

// set the session cookie parameters.

If (function_exists('session_set_cookie_params')) {.

Session_set_cookie_params(0, DIR_WS_ADMIN);.

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

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

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

}.

// lets start our session.

Tep_session_start();.

// 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');.

$current_page = basename($PHP_SELF);.

If (file_exists(DIR_WS_LANGUAGES$language'/'$current_page)) {.

Include(DIR_WS_LANGUAGES$language'/'$current_page);.

}.

// define our localization functions.

Require(DIR_WS_FUNCTIONS'localization.php');.

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

Require(DIR_WS_FUNCTIONS'validations.php');.

// setup our boxes.

Require(DIR_WS_CLASSES'table_block.php');.

Require(DIR_WS_CLASSES'box.php');.

// initialize the message stack for output messages.

Require(DIR_WS_CLASSES'message_stack.php');.

$messageStack = new messageStack;.

// split-page-results.

Require(DIR_WS_CLASSES'split_page_results.php');.

// entry/item info classes.

Require(DIR_WS_CLASSES'object_info.php');.

// email classes.

Require(DIR_WS_CLASSES'mime.php');.

Require(DIR_WS_CLASSES'email.php');.

// file uploading class.

Require(DIR_WS_CLASSES'upload.php');.

// calculate category path.

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

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

} 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;.

}.

// default open navigation box.

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

Tep_session_register('selected_box');.

$selected_box = 'configuration';.

}.

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

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

}.

// the following cache blocks are used in the Tools->Cache section.

// ('language' in the filename is automatically replaced by available languages).

$cache_blocks = array(array('title' => TEXT_CACHE_CATEGORIES, 'code' => 'categories', 'file' => 'categories_box-language.cache', 'multiple' => true),.

Array('title' => TEXT_CACHE_MANUFACTURERS, 'code' => 'manufacturers', 'file' => 'manufacturers_box-language.cache', 'multiple' => true),.

Array('title' => TEXT_CACHE_ALSO_PURCHASED, 'code' => 'also_purchased', 'file' => 'also_purchased-language.cache', 'multiple' => true).

);.

// check if a default currency is set.

If (!defined('DEFAULT_CURRENCY')) {.

$messageStack->add(ERROR_NO_DEFAULT_CURRENCY_DEFINED, 'error');.

}.

// check if a default language is set.

If (!defined('DEFAULT_LANGUAGE')) {.

$messageStack->add(ERROR_NO_DEFAULT_LANGUAGE_DEFINED, 'error');.

}.

If (function_exists('ini_get') && ((bool)ini_get('file_uploads') == false) ) {.

$messageStack->add(WARNING_FILE_UPLOADS_DISABLED, 'warning');.

}.

Define('FILENAME_POLLS', 'polls.php');.

// entry/item info classes.

Require(DIR_WS_CLASSES'poll_info.php');.

?>..

Comment #6

The code you have posted shows a whitespace after the last ?> here.

Require(DIR_WS_CLASSES'poll_info.php');.

?>.

This may just be due to the post, but if you highlight the code you will see an extra space highlighted...

Comment #7

No, i'm sorry - i've edited the file in dreamweaver - and there is no space after the very last "?>"..

Comment #8

Ok lets take care of the application_top.php so that it is ruled out of the equation..

The differences in your file to a default file are thus.

Blank lines.

2,4,10,12,57,58.

Additional code.

<?php.

Session_start ();.

// Use $HTTP_SESSION_VARS with PHP 4.0.6 or less.

If (!isset($_SESSION['IsAdminLoggedIn']) || $_SESSION['IsAdminLoggedIn'] != 1) {.

Header("Location: index_login.php?ALE=0");.

}.

?>.

<?php.

And the polls code.

Define('FILENAME_POLLS', 'polls.php');.

// entry/item info classes.

Require(DIR_WS_CLASSES'poll_info.php');.

I do remember having some issues with the polls before but I think this was due to a non closed brace } which would give a parse error, I cannot recall a header error from this..

The error states.

Which is line 11 the.

<?php.

However this very often means the line before which is the blank line 10..

Comment #9

I found out, that if I remove this:.

<?php.

Session_start ();.

// Use $HTTP_SESSION_VARS with PHP 4.0.6 or less.

If (!isset($_SESSION['IsAdminLoggedIn']) || $_SESSION['IsAdminLoggedIn'] != 1) {.

Header("Location: index_login.php?ALE=0");.

}.

?>.

It works fine, but I need the code, as it is part of a contribution that puts a password on my admin section.

Please help .....

Comment #10

Try stripping it down to.

Session_start ();.

// Use $HTTP_SESSION_VARS with PHP 4.0.6 or less.

If (!isset($_SESSION['IsAdminLoggedIn']) || $_SESSION['IsAdminLoggedIn'] != 1) {.

Header("Location: index_login.php?ALE=0");.

}.

And placing this code further down the page nearer the rest of the session information...

Comment #11

And then it works ! :-).

Thank you very much for your help you guys !..

Comment #12

Perseverance, patience and a ton of elbow grease and a correct attitude of approach will out...

Comment #13

Have a nice weekend Steve (241) you just made mine ! :-)..

Comment #14


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