Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Warning: Cannot modify header information error


poon

Recommended Posts

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/admin/AdminNavigation.php:5) in /var/www/html/admin/includes/functions/general.php on line 18

 

i get this error when i try to change/edit Store Configurations.....the change/edit works but i get this error every time i try to save the edit...

anyone know whats wrong?

theres no white space...and on line 18 its this;

////

// Redirect to another page or site

function tep_redirect($url) {

global $logger;

 

header('Location: ' . $url);

 

if (STORE_PAGE_PARSE_TIME == 'true') {

if (!is_object($logger)) $logger = new logger;

$logger->timer_stop();

}

 

exit;

}

 

////

Link to comment
Share on other sites

The problem is most likely to be generated in AdminNavigation.php line 5. If you can post it, could be of some help.

Have you installed some contributions that affect the admin area?

 

Can you navigate through other pages in the admin area?

 

The problem says the following.

 

In AdminNavigation.php line 5, the output of the http headers was started to be send. Later, there is a call to the tep_redirect() function. This is no possible to do, because the tep_redirect() function tell the user agent about a new location, but the user agent has begun to receive data from the page requested. This is probably due to misplaced echo or something like that in AdminNavigation.php, or a misplaced tep_redirect in the page you are trying to see (from which you get this error).

 

Regards,

Hey!!... I still need help with this http://www.oscommerce.com/forums/index.php?showtopic=309208. Please, take a look on it.

Link to comment
Share on other sites

AdminNavigation.php

<html>
<head>
<title>Admin Panel</title>

LINE 5: <style>
a.Nav {font-family:verdana, arial; font-size:11; font-weight:bold; color:black; text-decoration:none}
a.Nav:hover {text-decoration:underline}

.DNav {font-family:verdana, arial; font-size:11; font-weight:bold; color:red; text-decoration:none}

body, td {font-family:verdana; font-size:11}
</style>

<script>

function open_window(url) {
window.open(url,"MyWin",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizab
le=yes,width=450,height=250'); 
}

</script>

</head>

<BODY leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 bgcolor=white> 

<table align=center width="100%" border=0 cellpadding=2 cellspacing=0>
<tr bgcolor=silver>
<td> | <a class=Nav href="index.php">Admin Home</a> | <a class=Nav href="logout.php">Log Out</a> | <a class=Nav href="editpass.php">Chane Password</a> |</td>
</tr>
</table>

 

and i did edit the admin folder, i added a password...it worked without errors the first time then i had to reinstall it and added/edited the same ways and i got the error..i used this admin password...

http://www.oscommerce.com/community/contri...rch,admin+login

 

thanks

Link to comment
Share on other sites

mmm

 

I don´t know that contrib, so it's difficult to me to guess if the problem is caused by that contribution. However, I can see you have posted the html source of the AdminNavigation.php. To see what the error is caused by, we need to see the php source code. Please, post that.

 

Another question. which version of the osC are you running?. I am runnin v2.2 RC1, and I don't have any file named AdminNavigation.php. Is that a file from the contribution you mentioned before?

Hey!!... I still need help with this http://www.oscommerce.com/forums/index.php?showtopic=309208. Please, take a look on it.

Link to comment
Share on other sites

  • 3 months later...

This ERROR normall comes from Old osCommerce Version especially runs on php5 Server

 

I fixed it by eliminate the use of AdminNavigation.php as it used Only Once in access.php in the whole programs.

 

admin/ACCESS.php

 

Line 2 add

+

ob_start();

 

Line 17

change ->

include_once("AdminNavigation.php";
>> to >>
# include_once("AdminNavigaion.php");

 

Copy the belows line and replace until the end of the file

echo '<html>

<head>

<title>Admin Panel</title>

 

<style>

a.Nav {font-family:verdana, arial; font-size:11; font-weight:bold; color:black; text-decoration:none}

a.Nav:hover {text-decoration:underline}

 

.DNav {font-family:verdana, arial; font-size:11; font-weight:bold; color:red; text-decoration:none}

 

body, td {font-family:verdana; font-size:11}

</style>

 

<script>

 

function open_window(url) {

window.open(url,"MyWin",\'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizab

le=yes,width=450,height=250\');

}

 

</script>

 

</head>

 

<BODY leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 bgcolor=white>

 

<table align=center width="100%" border=0 cellpadding=2 cellspacing=0>

<tr bgcolor=silver>

<td> | <a class=Nav href="index.php">Admin Home</a> | <a class=Nav href="logout.php">Log Out</a> | <a class=Nav href="editpass.php">Chane Password</a> |</td>

</tr>

</table>';

}

ob_end_clean();

?>

 

Hope this can fix all problems for you like me.

Link to comment
Share on other sites

SMALL CHANGE

------------------

In admin/access.php

 

Line 2 add( add after <? )

 

ob_start();

 

In admin/AdminNavigation.php

Copy the belows line and replace until the end of the file

 

echo '<html>

<head>

<title>Admin Panel</title>

 

<style>

a.Nav {font-family:verdana, arial; font-size:11; font-weight:bold; color:black; text-decoration:none}

a.Nav:hover {text-decoration:underline}

 

.DNav {font-family:verdana, arial; font-size:11; font-weight:bold; color:red; text-decoration:none}

 

body, td {font-family:verdana; font-size:11}

</style>

 

<script>

 

function open_window(url) {

window.open(url,"MyWin",\'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizab

le=yes,width=450,height=250\');

}

 

</script>

 

</head>

 

<BODY leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 bgcolor=white>

 

<table align=center width="100%" border=0 cellpadding=2 cellspacing=0>

<tr bgcolor=silver>

<td> | <a class=Nav href="index.php">Admin Home</a> | <a class=Nav href="logout.php">Log Out</a> | <a class=Nav href="editpass.php">Chane Password</a> |</td>

</tr>

</table>';

}

ob_end_clean();

?>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...