News:

Join the Facebook Fan Page.

Main Menu

settings.php is 0 bytes

Started by romanov, July 07, 2004, 11:23:22 PM

Previous topic - Next topic

romanov

http://forum.capefeare.com [nofollow]

This happened twice already. Suddenly the settings.php becomes 0 bytes, and the forum is not acessible.

Please help.

Thanks in advance.

[Unknown]

Is there any chance I can see a phpinfo.php?  Just create a file with the following contents:

<?php phpinfo(); ?>

There is actually sanity code in there to prevent ever making the file less than something like 10 lines.

-[Unknown]

romanov

I don't really understand what you said. Do you mean make a php file called phpinfo.php and add <?php phpinfo(); ?> in the file or was it something else?

Owdy

Quote from: romanov on July 08, 2004, 11:52:23 AM
Do you mean make a php file called phpinfo.php and add <?php phpinfo(); ?>
Yes, that is what ment. Put that file to your site.
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Ride

Sorry to bring up an old topic but the same thing has happened to me a few times.  Everything gets screwed up and then I see that settings.php is 0 bytes.  Any idea what causes this?  Message me for a phpinfo link if you need it.  Thanks.

Ben_S

If the server was out of disk space and the file was being written to it, that would cause the issue.
Liverpool FC Forum with 14 million+ posts.

Ride

Quote from: Ben_S on September 25, 2005, 03:29:51 PM
If the server was out of disk space and the file was being written to it, that would cause the issue.

I thought of that but isn't the settings file only written to if I were to change settings?  This happened both times while I was away so I know I wasn't doing anything.

Ben_S

If there is an error, smf writes the timestamp of the error to settings.php
Liverpool FC Forum with 14 million+ posts.

forumite

I had the same problem, but never found out why (it wasn't a server capacity problem). I initially thought I'd been hacked, but subsequently realized that the php start and end tags <?php ....  ?> were intact and everything else in the file was missing. I can't imagine a hacker taking the trouble to selectively remove the content and leave the tags.

I was left scratching my head, but my host kindly came to my rescue, quickly figured out the problem, and activated the backup copy of the file.

Ride

Quote from: rvforumite on September 25, 2005, 11:33:00 PM
I had the same problem, but never found out why (it wasn't a server capacity problem). I initially thought I'd been hacked, but subsequently realized that the php start and end tags <?php ....  ?> were intact and everything else in the file was missing. I can't imagine a hacker taking the trouble to selectively remove the content and leave the tags.

I was left scratching my head, but my host kindly came to my rescue, quickly figured out the problem, and activated the backup copy of the file.

I was thinking hack to because it happened both times on a saturday night.  Unknown, what are your thoughts on this issue?

forumite

#10
Here's Unknown's prior suggestion for this problem.

FWIW I've seen reference here to others having the same problem with this file and nobody knowing why.

Ride

Quote from: rvforumite on September 26, 2005, 10:57:54 PM
Here's Unknown's prior suggestion for this problem.

FWIW I've seen reference here to others having the same problem with this file and nobody knowing why.

I get  " The topic or board you are looking for appears to be either missing or off limits to you."  when trying to go to the link you posted.

forumite

Must be in the Charter Members area. Sorry. All it said was to protect the file by changing the permissions to make it non-writable. This presumably prevents accidental writing to the file & erasure of all or part of the contents, but I don't think it addresses the route cause of why the file is getting modified the way mine was.

BTW did you look at the contents of your file to see if contained something e.g. the php tags? I'm just curious.

Ride

Quote from: rvforumite on September 27, 2005, 12:49:49 AM
Must be in the Charter Members area. Sorry. All it said was to protect the file by changing the permissions to make it non-writable. This presumably prevents accidental writing to the file & erasure of all or part of the contents, but I don't think it addresses the route cause of why the file is getting modified the way mine was.

BTW did you look at the contents of your file to see if contained something e.g. the php tags? I'm just curious.

I changed the permissions to non-writable actually and it still happened.  It's possible the permissions got changed before then though, I'm not sure.  I didn't have anything inside mine, totally blank.

forumite

OK thanks Ride. Mine hasn't done it since I changed the permissions, but it's a PITA to change permissions back in order to do something as simple as putting the forum in maintenance mode. Sounds like what's remaining in the file is unpredictable. In any event, it breaks functionality of the forum, so hopefully someone will come up with a reason why this happens.

Advertisement: