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
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 10-26-2005, 06:14 PM   #1
brand0n
been very busy
 
Join Date: Nov 2002
Location: the queen city
Posts: 26,983
Unable to add cookies, header already sent.

Unable to add cookies, header already sent.
File: /usr/home/sites/www.gfy.com/htdocs/includes/functions_showthread.php(640) : eval()'d code
Line: 20

odd error eh?
__________________
want to buy this spot for cheap? it is of course for sale. long term deals are always the best bet. brand0n/ at/ a o l dot commies.
brand0n is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-26-2005, 07:43 PM   #2
phpslave
Confirmed User
 
Join Date: Jan 2003
Location: San Jose
Posts: 548
kinda, header errors normally arn't worded just like that. Usually the php error will say something along the lines of unable to modifiy headers, but it looks like someone has put some error handling in checking with headers_sent().

Here is the problem:
somewhere in the code before the cookie was set with one of the following;
PHP Code:
setcookie(); 
or
PHP Code:
header('Set-Cookie: ...... 
it sent something to the client, it can be anything that goes to the client, anything at all, a blank line at the start of a page, end of a file any html anything. You can't write to the headers on a clients system after you've already started sending information (already sent the headers). Generally this isn't a big issue to fix. ;-)

btw:
eval() - this shouldn't be used, this usually can lead to security issues depending on how it is handled. Eval takes input and runs it as php code, all types of things can happen here, one example if remote fopen is on in the php.ini and eval accepts a variable, it could be possiable to execute code on one server on another server.

eval() in addition to being a possiable security issue, is a preformance hit as well.



have a good one
__________________

phpslave is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-26-2005, 07:59 PM   #3
phpslave
Confirmed User
 
Join Date: Jan 2003
Location: San Jose
Posts: 548
I just got an error as well;

Warning: Unexpected character in input: ' in /usr/home/sites/www.gfy.com/htdocs/showthread.php(1687) : eval()'d code on line 339

wonder if all this eval() code is in vBulletin, or something that has been tacked on.
__________________

phpslave is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-26-2005, 08:00 PM   #4
pornpf69
Too lazy to set a custom title
 
pornpf69's Avatar
 
Join Date: Jun 2004
Location: Brasil
Posts: 15,778
vBulletin is full of bugs...
pornpf69 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-26-2005, 08:05 PM   #5
phpslave
Confirmed User
 
Join Date: Jan 2003
Location: San Jose
Posts: 548
It surprises me that vBulletin a commercial product would use eval in their code, seems they could find a more efficiant / secure way to do things. Maybe, they have a good reason, i just can't think of any reason at all though.

__________________

phpslave is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-26-2005, 08:44 PM   #6
phpslave
Confirmed User
 
Join Date: Jan 2003
Location: San Jose
Posts: 548

Unexpected character in input: ' ' (ASCII=1) state=2 in .....

Seems to be a big vBulliten error do a google search for it all that shows up is vBulliten boards.

i was able to reproduce the problem, but don't have access to vBulliten code.

PHP Code:
<?php
 file_put_contents
('/test.php''<?php'.chr(1));
 
?>
or

PHP Code:
<?php 
eval(chr(1)); 
?>
The problem occurs where lower ascii characters in the php input stream so somewhere in your php file, there is a character (ASCII value of 1) which if you run one of the above samples, will produce;

PHP Warning: Unexpected character in input: 'hahaha9786;' (ASCII=1) state=1 in /var/www/htdocs/test.php on line 1

The Real Question is:
The real question is why are they eval()ing at all, there is no reason to use eval() in production code. just about the only legitimate use of eval() is making mock objects for testing.

they being vBulletin
__________________

phpslave is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-26-2005, 08:53 PM   #7
CS-Jay
Confirmed User
 
CS-Jay's Avatar
 
Join Date: Oct 2003
Location: Command Central, West Palm Beach, Fl
Posts: 1,794
Did they do an update? Because I'm not gettin that error at all...
__________________
I do stuff - aIm CS_Jay_D
CS-Jay 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



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.