Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Pages: 1 [2]

Author Topic: Cannot modify header information [SOLVED]  (Read 1369 times)

sibas

  • Sr. Member
  • ****
  • Karma: 23
  • Posts: 451
    • www.simply4all.net
Re: Cannot modify header information [SOLVED]
« Reply #15 on: February 13, 2012, 07:33:13 PM »

I don't have it above the //TITLE, I change the order and stop have the warning :) ;D
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: Cannot modify header information [SOLVED]
« Reply #16 on: February 14, 2012, 02:21:51 AM »

 :o  ::)  8)
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

sibas

  • Sr. Member
  • ****
  • Karma: 23
  • Posts: 451
    • www.simply4all.net
Re: Cannot modify header information [SOLVED]
« Reply #17 on: March 05, 2012, 03:11:30 PM »

To continue with those Undefined variable's and index's

I found 2 E_NOTICE when you see an article with Enable comments ON

in // COMMENTS
find
Code: [Select]
if($_SESSION[_SITE.'comment']['fail'] == true)
and add
Code: [Select]
// if($_SESSION[_SITE.'comment']['fail'] == true)
if (isset($_SESSION[_SITE.'comment']['fail']) == true)

this eliminate  Undefined index "comment"

some lines bellow have $back_to_page
this generates  Undefined variable: back_to_page
to eliminate I add global $back_to_page in beginning of the function.


Now!
When you post a comment generate another 4 E_NOTICE
 
Undefined index: poster
in snews.php on line 832
function comment($freeze_status)
Code: [Select]
$doublecheck = $_SESSION[_SITE.'poster']['article'] === "$comment:|:$post_article_id" &&
(time()-$_SESSION[_SITE.'poster']['time']) < s('comment_repost_timer') ? 0 : 1;

I change it to
Code: [Select]
$doublecheck = isset($_SESSION[_SITE.'poster']['article']) === "$comment:|:$post_article_id" &&
(time()-$_SESSION[_SITE.'poster']['time']) < s('comment_repost_timer') ? 0 : 1;

Undefined variable: fail
in snews.php on line 891
function comment($freeze_status)
Code: [Select]
if ($fail){to eliminate I add global $fail in beginning of the function.

Undefined variable: parent
in snews.php on line 3172
function cat_rel($var, $column)
Code: [Select]
return $parent.$child;to eliminate I add global $parent in beginning of the function.


Undefined variable: link
in snews.php on line 1300
function new_comments
Code: [Select]
if (isset($r['csef'])) { $link .= $r['csef'].'/'; }
I dont know what to do with the above  ???
I add $link = '';
like this
Code: [Select]
unset($link); // Patch #10 - 1.7.0 - 4 strings
$link = '';
if (isset($r['xsef'])) { $link = $r['xsef'].'/'; }
if (isset($r['csef'])) { $link .= $r['csef'].'/'; }

Should I keep those changes I make or is some other ideas??

« Last Edit: March 05, 2012, 04:00:00 PM by sibas »
Logged

hy

  • Newbie
  • *
  • Karma: 1
  • Posts: 30
  • just hackin'
Re: Cannot modify header information [SOLVED]
« Reply #18 on: March 05, 2012, 08:28:08 PM »

I stumbled upon the $link just yesterday.
I altered the code (around line 1300 within function new_comments())
Code: [Select]
if (isset($r['xsef']))
{ $link = $r['xsef'].'/'; }
//***hy: let $link exist
else {$link='';}

Your solution is applicable as well.
I will post a reply regarding the other stuff you mentioned as soon as I have the time to check.
I'd be very careful with that global and $fail
My solution is:
Code: [Select]
function comment()
$fail=true;
If you look at the code you'll find fail is only initialized in the else-part as true.
Logged
Salu2 ***hy

Rui Mendes

  • Development,Testing, Support
  • Hero Member
  • *****
  • Karma: 195
  • Posts: 1009
  • sNews1.7
    • Comunidade Portuguesa
Re: Cannot modify header information [SOLVED]
« Reply #19 on: March 05, 2012, 08:38:30 PM »

Hello everybody.

I fix all problems/errors one week ago. Some dudes are are testing.

Very soon we publish as official (snews1.7.2).
Logged
Need a Job on Europe. Linkdin - Facebook / Group

hy

  • Newbie
  • *
  • Karma: 1
  • Posts: 30
  • just hackin'
Re: Cannot modify header information [SOLVED]
« Reply #20 on: March 05, 2012, 08:43:23 PM »

I fix all problems/errors one week ago. Some dudes are are testing.

What a pity. Trying to fix these errors gave me a great portion of insight into snews (and PHP).
)-;

Very soon we publish as official (snews1.7.2).
No I was just joking. I apreciate your work on the software.
Logged
Salu2 ***hy

Rui Mendes

  • Development,Testing, Support
  • Hero Member
  • *****
  • Karma: 195
  • Posts: 1009
  • sNews1.7
    • Comunidade Portuguesa
Re: Cannot modify header information [SOLVED]
« Reply #21 on: March 05, 2012, 08:57:17 PM »

Don't worry hy.

We apreciate all bugs/issues and we try help everybody as we can.

I send to you PM, see your messages
Logged
Need a Job on Europe. Linkdin - Facebook / Group

hy

  • Newbie
  • *
  • Karma: 1
  • Posts: 30
  • just hackin'
Re: Cannot modify header information [SOLVED]
« Reply #22 on: March 06, 2012, 03:17:40 PM »

Thanks. Well at least this forum is populated. I tried half a dozen other so-called 'lightweight' CMS before I found snews. But the major drawback was for almost all that the respective forums have been disabled or noone participated, and/or the whole thing led me to the conclusion that the project in question was 'dead'.
Logged
Salu2 ***hy

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: Cannot modify header information [SOLVED]
« Reply #23 on: March 06, 2012, 03:38:23 PM »

Hi Hy:
sNews is not dead by any means. Many sNews users (like me) don't post something on a daily basis any more because they are busy with other projects and have full time jobs to attend to... but they still log regularly. Besides, sNews is pretty stable as it is (1.71.) and we tend to keep the core project simple and leave it as it is... only making changes when necessary... like when someone reports something that needs fixing as is the case with this topic thread.

Also, the 'sNews Dudes' (the guys who moderate, provide assistance and apply patches) are volunteers... but we're always accessible and respond when emergencies arise...  8)
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

hy

  • Newbie
  • *
  • Karma: 1
  • Posts: 30
  • just hackin'
Re: Cannot modify header information [SOLVED]
« Reply #24 on: March 06, 2012, 05:38:17 PM »

Hi Keyrocks,
you may have got me wrong. The OTHER systems I tried before snews are (more or less) dead. And I am glad to have found a CMS that seems to work for me (at least up to 90%) AND there are active participants. I hope to be able to contribute to the project.
Logged
Salu2 ***hy
Pages: 1 [2]