News:

Click here for Toll-Free Service for your business starting at $2.00 per month

Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Jrrwizard

#16
Index.php includes auth config... but I already tried setting cookies in there and it didnt work :(

I went with output buffering and it works now, but I am interested to see how I can make tihngs better by not having to do that. If you can flat out help me please PM me some contact info so we can work it out easier

Thanks for your help guys
#17
I completely understand what you are saying, but I cannot see that I have already entered code prior to the cookie.

Oh my god I am on the brink of insanity here... I am so frustrated with this it is not even funny. I have no idea why index.php would even cause a problem, im not setting cookies or session ANYWHERE in it because it is just acting as a template where other pages are being dynamically included in them.

I have no idea what is up with all this cokkie stuff and session, I really need someone to look over my files and solve it for me cause I am completely lost in this php. My head hurts :(
#18
Here is a screenshot of the problem for further help:



As you can see the "user login" section is in question. While it is all located in "index.php"
I have used php dynamic inclusion for the "user login" section, so actually all that is in that box is called up in "form.php" and, once logged in, goes to "mem_welcome.php"

But it seems the problem is either in index or checkmembers? Maybe even authconfig... what I dont understand is why it tells me the problem is in line 12 of index.php which bears no significance (as far as I can see) to the session start command.

Argh, this is driving me crazy

The problem now seems to lie in checkmember.php?
$i=0;
while ($thisrow=mysql_fetch_row($result))  //get one row at a time
{
$gname="access_".$i;
setcookie ($gname, $thisrow[0]);
$i++;
  }
setcookie ("access_num", $i);

mysql_free_result($result);
  mysql_close($connection);

Anything wrong with those lines in conjunction with the rest of the code?
#19
Um doesn't seem to work either... At the top of authconfig.php I have

<?
session_start();
$dbhost="localhost";
...
...
...
...
and so on


Well... Now Im down to just 2 errors
Warning: Cannot modify header information - headers already sent by (output started at /home/jim/public_html/index.php:12) in /home/jim/public_html/check_member.php on line 40

Warning: Cannot modify header information - headers already sent by (output started at /home/jim/public_html/index.php:12) in /home/jim/public_html/check_member.php on line 43
#20
Webzone... I tihnk I tried that before :-/

Where do I need to put session start, what php file?

I tried putting <? session_start() ?> at the top of index.php but it resulted in more problems for me :(
#21
Um.. I have tried reading it but it was basically all a blur to me.
It seems like I need a lot more than just a simple start -  end insert in the pages.

If anyone else knows where / what I should put the commands in my coding please reply and help me out.
#22
Ok first things first... I have already mentioned that Im hopelessly lost in php haha

Please let me know how I can

a) send the session data BEFORE you send output to the browser

-I think i tried to do this but it didnt work? haha Please tell me exactly where I need to insert coding and what to insert.

b) please explain this output buffering.

- it makes it look like it will alter the effects of my coding? What is the deal with output bufering and how can I use it if it will fix my problem.
#23
Hey everyone,

I figure since there is a contest regarding this it can be answered fast. The problem lies in my user system. When I ( or any user) logs in they experience errors, I'm guessing regarding cookies but I'm no good with php :P.

Heres what I get:

Warning: session_register(): Cannot send session cache limiter - headers already sent (output started at /home/jim/public_html/index.php:5) in /home/jim/public_html/mem_index.php on line 6

-In one section and then two more in another (all on same page, just different areas on the page)

Warning: Cannot modify header information - headers already sent by (output started at /home/jim/public_html/index.php:5) in /home/jim/public_html/check_member.php on line 40

Warning: Cannot modify header information - headers already sent by (output started at /home/jim/public_html/index.php:5) in /home/jim/public_html/check_member.php on line 43


Here are the files in question by the errors

Checkmember.php
<?

   include ("admin/authconfig.php");

   if (isset($_COOKIE['LMUSERNAME']) && isset($_COOKIE['LMPASSWORD']))
    {
        // Get values from superglobal variables
        $USERNAME = $_COOKIE['LMUSERNAME'];
        $PASSWORD = $_COOKIE['LMPASSWORD'];

        $CheckSecurity = new auth();
        $check = $CheckSecurity->page_check($USERNAME, $PASSWORD,$dbhost,$dbusername,$dbpass,$dbname);

$connection = mysql_connect($dbhost, $dbusername, $dbpass);
$SelectedDB = mysql_select_db($dbname);
$result0=mysql_query("SELECT signup from authuser where uname='$USERNAME' and reg_validate=1 and status=1");
while($row = mysql_fetch_array($result0, MYSQL_NUM)) {
$v=$row[0];
}
if($v=='1') {
$query = "SELECT access_name FROM authaccess WHERE signup=1";
}
else {
$query = "SELECT access_name FROM memberaccess WHERE uname='$USERNAME'";
}
$result = mysql_query($query) or die("Query failed : " . mysql_error());

//get group_name value
$i=0;
while ($thisrow=mysql_fetch_row($result))  //get one row at a time
{
$gname="access_".$i;
setcookie ($gname, $thisrow[0]);
$i++;
  }
setcookie ("access_num", $i);

mysql_free_result($result);
  mysql_close($connection);

    }
    else
    {
        $check = false;
    }

if ($check == false)
{

echo "<META http-EQUIV='Refresh' content='0; URL=$url_root/login.php'>";
exit;
}


function getip() {
if (getenv(HTTP_X_FORWARDED_FOR)) {
$ip=getenv(HTTP_X_FORWARDED_FOR);
}
else {
$ip=getenv(REMOTE_ADDR);
}
return $ip;
}
?>


Index.php
<HTML>
<HEAD><link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<TITLE>[+] - JimsResource Version 4.0 - [+]</TITLE>
<style type="text/css">
<!--
@import url("style.css");
.style13 {color: #CCCCCC}
.style24 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 9px;
}
-->
</style>
</HEAD>


Please let me know if it could be a problem elsewhere? But it looks like the problem is in the css style and that doesn't make any sense to me. I tried almost everything regarding session starts and all that. Please help me as soon as possible  ;D

Thanks a lot!
-JWiz