Jump to content


Photo

Page Control


  • Please log in to reply
36 replies to this topic

#21 OldManRiver

OldManRiver
  • Members
  • PipPipPip
  • Advanced Member
  • 88 posts

Posted 28 September 2006 - 11:08 PM

ok, is session_start() at the top of all the pages?

This error is common if you're sending something to the browser before you call session_start().

I tend to make it the first thing on every page by default, e.g.

<?php
session_start();
include('header.php');
include_once('connect.php')

echo <<<HTML
<html>
 <head>
  .....
?>

Regards
Huggie


Huggie,

Made it the first line in the code, and now get a blank page, basically.  Look and see!

OMR

#22 HuggieBear

HuggieBear
  • Members
  • PipPipPip
  • Advanced Member
  • 1,899 posts
  • LocationEngland, UK

Posted 28 September 2006 - 11:10 PM

Is that a frame at the top of the page?

Huggie
Advice to MySQL users: Get phpMyAdmin and test your queries work there first, take half the hassle out of diagnosis, also check the reserved words list.

Links: PHP Docs :: RegEx's :: MySQL :: DevGuru :: w3schools

#23 OldManRiver

OldManRiver
  • Members
  • PipPipPip
  • Advanced Member
  • 88 posts

Posted 28 September 2006 - 11:14 PM

H,

Per your example all the HTML has to have an echo.  It this true?

I don't have it that way so can you look at the uploaded form file and tell me where I screwed myself?

OMR

[attachment deleted by admin]

#24 OldManRiver

OldManRiver
  • Members
  • PipPipPip
  • Advanced Member
  • 88 posts

Posted 28 September 2006 - 11:15 PM

Is that a frame at the top of the page?

Huggie

H,

Naw! Customer signed this up with GoDaddy on a paid account, so not supposed to have the ads, but won't kick there butt for config'ing the domain wrong to get a clean page.

Think it's a javascript!

OMR

#25 HuggieBear

HuggieBear
  • Members
  • PipPipPip
  • Advanced Member
  • 1,899 posts
  • LocationEngland, UK

Posted 28 September 2006 - 11:19 PM

Your code looks ok, if you added session_start() to the top of login.php you can remove it.  I know I said the top of everypage, but as your including it into cleanpcr.php, there's no need to have it twice.

Huggie
Advice to MySQL users: Get phpMyAdmin and test your queries work there first, take half the hassle out of diagnosis, also check the reserved words list.

Links: PHP Docs :: RegEx's :: MySQL :: DevGuru :: w3schools

#26 OldManRiver

OldManRiver
  • Members
  • PipPipPip
  • Advanced Member
  • 88 posts

Posted 28 September 2006 - 11:37 PM

Your code looks ok, if you added session_start() to the top of login.php you can remove it.  I know I said the top of everypage, but as your including it into cleanpcr.php, there's no need to have it twice.

Huggie


H,

Obviously I can't write any output now, so if I figure this out, I think I'm good.

What do you think is my problem now?  I even tried putting all the HTML into a var so I could
use an echo, as you suggested, but now have blank screen!

OMR

[attachment deleted by admin]

#27 HuggieBear

HuggieBear
  • Members
  • PipPipPip
  • Advanced Member
  • 1,899 posts
  • LocationEngland, UK

Posted 28 September 2006 - 11:41 PM

Get rid of the exit; at the bottom of login.php

and where you have $html_str .= $_SESSION['display_block']; change it to:

$html_str .= {$_SESSION['display_block']};

Regards
Huggie
Advice to MySQL users: Get phpMyAdmin and test your queries work there first, take half the hassle out of diagnosis, also check the reserved words list.

Links: PHP Docs :: RegEx's :: MySQL :: DevGuru :: w3schools

#28 OldManRiver

OldManRiver
  • Members
  • PipPipPip
  • Advanced Member
  • 88 posts

Posted 28 September 2006 - 11:59 PM

H,

Sorry, was coding like mad and found the "exit" so knocked it.

However went back to non-echo codes so here is where I'm at:

Was having problems with the "header" and realized it can not be called on the "require" so moved it.

That stopped the endless loop.  Took it out but that doesn't work.  Right now the code is working, sort of, because the new values for $_SESSION['display_block'] don't get set or displayed.

Just put some echo traps in the login.php file to show it is processing OK!  The incorrect login has a problem, but everything else works!  (Edit)Even got that fixed now!

OMR

[attachment deleted by admin]

#29 OldManRiver

OldManRiver
  • Members
  • PipPipPip
  • Advanced Member
  • 88 posts

Posted 29 September 2006 - 12:35 AM

Get rid of the exit; at the bottom of login.php

and where you have $html_str .= $_SESSION['display_block']; change it to:

$html_str .= {$_SESSION['display_block']};

Regards
Huggie


H,

Tried the var assignment with the "{}'s" and got errors!  Any other suggestions?

OMR

#30 OldManRiver

OldManRiver
  • Members
  • PipPipPip
  • Advanced Member
  • 88 posts

Posted 29 September 2006 - 01:06 AM

All,

Is my problem that I'm also using the require to the same processing file? ???  Should I use another file for the require to preload my page? ???  :-\ ;D

OMR

#31 HuggieBear

HuggieBear
  • Members
  • PipPipPip
  • Advanced Member
  • 1,899 posts
  • LocationEngland, UK

Posted 29 September 2006 - 08:39 AM

Tried the var assignment with the "{}'s" and got errors!  Any other suggestions?


I think I missed the quotes off that one... try:
$html_str .= "{$_SESSION['display_block']}";


Regards
Huggie

Advice to MySQL users: Get phpMyAdmin and test your queries work there first, take half the hassle out of diagnosis, also check the reserved words list.

Links: PHP Docs :: RegEx's :: MySQL :: DevGuru :: w3schools

#32 scottybwoy

scottybwoy
  • Members
  • PipPipPip
  • Advanced Member
  • 532 posts
  • LocationUK

Posted 29 September 2006 - 09:35 AM

Theres another bug in your site E-Worldpeace.com great ideas, keep it up:

Could not delete old search id sessions

DEBUG MODE

SQL Error : 1054 Unknown column 'search_time' in 'where clause'

DELETE FROM phpbb_search_results WHERE search_time < 1159518767

Line : 657
File : search.php

#33 OldManRiver

OldManRiver
  • Members
  • PipPipPip
  • Advanced Member
  • 88 posts

Posted 29 September 2006 - 05:40 PM

Huggie,

Got it fixed late last night with this code in each file:

     if (!isset($sess_id)) {
          session_start();
          $started = true;
          $sess_id = session_id();
     }

Added the processing to logout, etc., since.  Still working on some of the DB backend, like "lastlogin", etc.

Now trying to get it to transfer to the secondary pages.  Not having much luck with that.

Do I need to add a "globals" for the vars to pass?

OMR

#34 OldManRiver

OldManRiver
  • Members
  • PipPipPip
  • Advanced Member
  • 88 posts

Posted 29 September 2006 - 05:43 PM

Theres another bug in your site E-Worldpeace.com great ideas, keep it up:

Could not delete old search id sessions

DEBUG MODE

SQL Error : 1054 Unknown column 'search_time' in 'where clause'

DELETE FROM phpbb_search_results WHERE search_time < 1159518767

Line : 657
File : search.php


Did you like the default topics?  Would you have more to suggest?

OMR

#35 HuggieBear

HuggieBear
  • Members
  • PipPipPip
  • Advanced Member
  • 1,899 posts
  • LocationEngland, UK

Posted 29 September 2006 - 06:11 PM

Now trying to get it to transfer to the secondary pages.  Not having much luck with that.  Do I need to add a "globals" for the vars to pass?


No, there's no need for 'globals' you should just be able to use any of those $_SESSION variables on any of your pages where you've started the session.

Regards
Huggie
Advice to MySQL users: Get phpMyAdmin and test your queries work there first, take half the hassle out of diagnosis, also check the reserved words list.

Links: PHP Docs :: RegEx's :: MySQL :: DevGuru :: w3schools

#36 OldManRiver

OldManRiver
  • Members
  • PipPipPip
  • Advanced Member
  • 88 posts

Posted 29 September 2006 - 06:19 PM

H,

Great, Godaddy took down the Blog, so opened a ticket for restore and they axed the main page.

Can't proceed, till they fix their #$@#$%.

Right hand never knows what the left is doing, must be the tech support idiots in India!  Can't read simple instructions.

OMR

#37 OldManRiver

OldManRiver
  • Members
  • PipPipPip
  • Advanced Member
  • 88 posts

Posted 03 October 2006 - 10:51 PM

All,

Site backup now and running, with changes working, but still working the secondary pages.

OMR





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users