|
Posted by Rik Wasmus on June 5, 2008, 6:17 pm
Please log in for more thread options
On Fri, 06 Jun 2008 00:02:28 +0200, Lawrence Krubner
>
> This is one of the more bizarre things I've seen in a while.
>
> We've a function called getListOfAllDatabaseTables that does about what
> you'd expect. It lives in a file called getListOfAllDatabaseTables.php.
> The file is included when the function needs to be called. The function
> is called when users are adding in new information. Most of the time, if
> a user fills in a form to (say for instance) create a new weblog post,
> the user would hit "Submit" and then the action of adding that
> information to the database would occur before the next page loads
> (before any HTML is sent to the user's browser).
>
> Suddenly, yesterday, when testing the development site, I started
> getting errors when adding new material "Cannot send headers, output
> already started in getListOfAllDatabaseTables.php". So I open up
> getListOfAllDatabaseTables.php and, sure enough, there is a single white
> space that has suddenly been added to the end of the file, outside of
> the closing ?> tag. I delete the white space and thus fix the problem.
>
> I want to know who is to blame for this so I look at the files history
> in Subversion. Turns out, no one has edited this file since it was first
> checked in back in November.
>
> The whole site is under Subversion. We use Springloops.com which has a
> nice auto-deploy feature. No one has FTP access to the site. No one has
> SSH access to the site, except root. Really, the only way a white space
> could appear in that file is if someone ssh to the server, logged in as
> root, opened that file, added a white space, and then closed it without
> making any other change.
>
> Which does not seem likely. There are only two people with the root
> password to the server, myself, and one other programmer. Neither of us
> had any reason to touch that file, nor do either of us have any memory
> of touching that file yesterday.
>
> Any other way a white space can suddenly appear at the end of a file?
That's no PHP question, but at least some process has had to do something
to the file, or the servers configuration. Usually, in these cases, it WAS
a user, just not someone willing to own up to it. I'd check the time the
file was last changed (which you probably can't get as you changed it
back), and compare them to other logs. Then again, it could just be a
simple configuration change on the server, making the problem only visible
now (output buffering and the like).
The answer to the question 'what could do that?' is actually: almost
anything. There is no way for use to tell you without full logs & root
access to your server, and even then it's probably untracable.
--
Rik Wasmus
...spamrun finished
|