Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 04-26-2002, 06:01 AM   #1
chodadog
Confirmed User
 
Join Date: Apr 2002
Posts: 9,736
Php problem... WTF!

ok, i've been working my ass off trying to get this damn site working.. then finally, it's done! finally fixed all the bugs.. or so i thought!

I try to login to my admin section, and when i get to the index.php of the admin directory, i get this message:

Warning: Cannot send session cookie - headers already sent by (output started at /home/virtual/site5/fst/var/www/get_env.php:1) in /home/virtual/site5/fst/var/www/html/tagadmin/index.php on line 14

What in fuck's name does that mean!
And how do i fix it?
chodadog is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-26-2002, 06:02 AM   #2
railz
Confirmed User
 
Join Date: Nov 2001
Posts: 2,531
What script(s) are you using?
__________________
This Space for Rent
railz is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-26-2002, 06:05 AM   #3
chodadog
Confirmed User
 
Join Date: Apr 2002
Posts: 9,736
It's called kDDL. It's a direct downloads script (intended for warez)
I got it back when i was a warez webmaster. But it's pretty much idealy suited for the TGP i wanna run, so i figured.. hey.. why not..
chodadog is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-26-2002, 06:07 AM   #4
sweandy
Confirmed User
 
Join Date: Jan 2002
Location: Europe
Posts: 422
It probably sent some text or blank space before you do a header("location"); redirect or similair..
sweandy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-26-2002, 06:09 AM   #5
chodadog
Confirmed User
 
Join Date: Apr 2002
Posts: 9,736
hmm.. any idea how to fix it though? :D
chodadog is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-26-2002, 06:12 AM   #6
sweandy
Confirmed User
 
Join Date: Jan 2002
Location: Europe
Posts: 422
Check the html source in your browser if it outputs some strange text before the php warning, could even be " " blank space etc that you miss at first.
sweandy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-26-2002, 06:14 AM   #7
chodadog
Confirmed User
 
Join Date: Apr 2002
Posts: 9,736
This is the source (after i've attempted to login, so there's another error)

PHP Code:
<a href=""></a><br>
<
b>Warning</b>:  Cannot send session cookie headers already sent by (output started at /home/virtual/site5/fst/var/www/get_env.php:1in <b>/home/virtual/site5/fst/var/www/html/tagadmin/index.php</bon line <b>14</b><br>
<
br>
<
b>Warning</b>:  Cannot send session cache limiter headers already sent (output started at /home/virtual/site5/fst/var/www/get_env.php:1in <b>/home/virtual/site5/fst/var/www/html/tagadmin/index.php</bon line <b>14</b><br>
<
br>
<
b>Warning</b>:  Cannot add header information headers already sent by (output started at /home/virtual/site5/fst/var/www/get_env.php:1in <b>/home/virtual/site5/fst/var/www/html/tagadmin/index.php</bon line <b>41</b><br
chodadog is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-26-2002, 06:17 AM   #8
railz
Confirmed User
 
Join Date: Nov 2001
Posts: 2,531
http://www.faqts.com/knowledge_base/...d/14388/fid/51

Quote:
quote from the amnual page for setcookie():

setcookie() defines a cookie to be sent along with the rest of the
header information. Cookies must be sent before any other headers are
sent (this is a restriction of cookies, not PHP). This requires you to
place calls to this function before any <html> or <head> tags.
HTML tags in the wrong place?
__________________
This Space for Rent
railz is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-26-2002, 06:20 AM   #9
sweandy
Confirmed User
 
Join Date: Jan 2002
Location: Europe
Posts: 422
Yep seems like you put the stuff in wrong order.. set session cookie first then html output.
sweandy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-26-2002, 06:29 AM   #10
chodadog
Confirmed User
 
Join Date: Apr 2002
Posts: 9,736
Cheers guys. I'll see if i can fix it now
chodadog is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-26-2002, 06:34 AM   #11
chodadog
Confirmed User
 
Join Date: Apr 2002
Posts: 9,736
ok.. i'm stumped..

this is from the index.php of the admin directory:

PHP Code:

<?php
$inn 
false;

require 
"../../config.php";
require 
"../../db.inc.php";
require 
"../../get_env.php";
require 
"sec/session.php";

session_start();
And this is from get_env.php:

PHP Code:

<?php

$env_q 
"SELECT * FROM $mysql_tb_info";
if (!
$env_get mysql_query($env_q$mysql_conn))
    die(
$mysql_error_msg."<br><br>".mysql_error());
list(
$user$pass$name$url$email$types$spam_protect$code_check$files_max$files_page$link_gateway$link_show_in$link_show_out$link_show_zero$link_cols$link_max$link_layout
$date_format$layout_ddl$layout_ddl_rows$layout_ddl_top) = mysql_fetch_row($env_get);

$files_page2 $files_page;
$type explode("|"$types);
$link_layout explode("|"$link_layout);
$layout_ddl explode("|"$layout_ddl);
?>
I haven't got a clue.. i suck so very bad with php
chodadog is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-26-2002, 06:36 AM   #12
railz
Confirmed User
 
Join Date: Nov 2001
Posts: 2,531
What's on line 14 of index.php?
__________________
This Space for Rent
railz is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-26-2002, 06:43 AM   #13
chodadog
Confirmed User
 
Join Date: Apr 2002
Posts: 9,736
PHP Code:
echo "Logged out!<br><br>\n"
chodadog is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-26-2002, 07:05 AM   #14
sweandy
Confirmed User
 
Join Date: Jan 2002
Location: Europe
Posts: 422
No errors in config.php or db.inc.php that outputs something?
sweandy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-26-2002, 07:08 AM   #15
chodadog
Confirmed User
 
Join Date: Apr 2002
Posts: 9,736
Hey.. i dunno how it happened.. but the admin index.php was modified.. i'm not sure if that's supposed to happen.. but anyways. i just replaced hte index.php from admin and the get_env.php from the originals on my hard disk, and it's fixed the problem..

Any idea why this happened in the first place? and how do i prevent it from happening. cheers
chodadog is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-26-2002, 07:19 AM   #16
sweandy
Confirmed User
 
Join Date: Jan 2002
Location: Europe
Posts: 422

No idea. But if you have any more php problems hit me up on icq.
sweandy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.