Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
UBBDev.com
UBBWiki.com
Who's Online
1 registered (GregK), 31 Guests and 13 Spiders online.
Key: Admin, Global Mod, Mod
Featured Member
Registered: 12/20/03
Posts: 4920
Top Posters (30 Days)
Ruben 33
Gizmo 18
Rob Provencher 12
Rimex 9
SD 9
Bert 8
sw55 7
Eugene 5
TCS1 4
Matthias1976 4
Latest Photos
Uhm...
Mayan End of World
Gas Station Disco Video Shoot
Test Pictures
Audrey Kate
Page 1 of 3 1 2 3 >
Topic Options
#249949 - 08/25/12 04:41 AM config file wiped out
driv Offline

Carpal Tunnel
Registered: 01/10/04
Posts: 2543
Anyone come across a situation were each time you update a setting, config.inc.php gets wiped completely clean? (0 byte file-size.)
_________________________
Using version :: 7.5.7 ...sans SFS at the mo' crazy
Top
Express Hosting
Express Hosting "We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
#249950 - 08/25/12 06:00 AM Re: config file wiped out [Re: driv]
Dunny Offline
addict
Registered: 01/16/08
Posts: 545
Loc: DE USA
I have, but only once... and it was my fault...

I had the control panel opened and was looking at the config file there, while updating it at the same time on the server... when I updated the one in the CP, I went back to close it on the server side, and when I did the whole thing was wiped... had to go to a back-up and pull that file and insert it back on the server.

Dunny
_________________________
Dunny

Removed link due to bleedover spammers

Dawn of Iskirra
Top
#249951 - 08/25/12 06:55 AM Re: config file wiped out [Re: driv]
driv Offline

Carpal Tunnel
Registered: 01/10/04
Posts: 2543
It's different here; no ongoing maintenance.
Just click on Update - and 'poof' it's a blank file.
_________________________
Using version :: 7.5.7 ...sans SFS at the mo' crazy
Top
#249952 - 08/25/12 07:24 AM Re: config file wiped out [Re: driv]
driv Offline

Carpal Tunnel
Registered: 01/10/04
Posts: 2543
The portal boxes are also being written as zero byte files.
_________________________
Using version :: 7.5.7 ...sans SFS at the mo' crazy
Top
#249953 - 08/25/12 08:21 AM Re: config file wiped out [Re: driv]
driv Offline

Carpal Tunnel
Registered: 01/10/04
Posts: 2543
Anybody know if a template is used to build config.inc.php ?
_________________________
Using version :: 7.5.7 ...sans SFS at the mo' crazy
Top
#249954 - 08/25/12 09:23 AM Re: config file wiped out [Re: driv]
Dunny Offline
addict
Registered: 01/16/08
Posts: 545
Loc: DE USA
wow not sure what would cause that... unless you had a script inserted from outside..But over the years driv I have always known you to update when patches were released so shoot I am at a loss to explain that one.

I guess waiting for Giz, Ruben, or even the elusive SD would be better than me guessing, however check permissions.. I honestly think that it may be a corrupt DB table causing the issue, but then I wouldn't be able to tell you which one.

Dunny
_________________________
Dunny

Removed link due to bleedover spammers

Dawn of Iskirra
Top
#249955 - 08/25/12 10:31 AM Re: config file wiped out [Re: driv]
driv Offline

Carpal Tunnel
Registered: 01/10/04
Posts: 2543
Checked permissions. Can't see what db tables would have that effect..? I thought it might have been a language file or template but they all seem intact. Right now, I am going though the admin methods to try to track down the route to writing the config file.

Well thanks anyway buddy.
_________________________
Using version :: 7.5.7 ...sans SFS at the mo' crazy
Top
#249956 - 08/25/12 11:26 AM Re: config file wiped out [Re: driv]
driv Offline

Carpal Tunnel
Registered: 01/10/04
Posts: 2543
The admin script builds the new config file correctly.
The path variables echo out correctly to the config.inc.php.

It's here, that things go wrong and the file is wiped clean...
Code:
$check = lock_and_write("{$config['FULL_PATH']}/includes/config.inc.php",$newconf);
if ($check == "no_write") {
	$admin->error($ubbt_lang['NO_WRITE_CONFIG']);
} // end if

 if(!defined('INSTALL')) {

	rebuild_islands(1);

} // end if


I'm wondering if there is a setting that tells ubb whether or not it has been successfully installed?
_________________________
Using version :: 7.5.7 ...sans SFS at the mo' crazy
Top
#249957 - 08/25/12 01:11 PM Re: config file wiped out [Re: driv]
driv Offline

Carpal Tunnel
Registered: 01/10/04
Posts: 2543
Found the problem... (admin/doeditconfig.php)

I believe there may be an issue with the ubbthreads function lock_and_write (I haven't found it yet but will keep looking).

This was the offending code block. (n.b. I have changed he name of config.inc.php for testing.)

Code:
$check = lock_and_write("{$config['FULL_PATH']}/includes/config2.inc.php",$newconf);
if ($check == "no_write") {
	$admin->error($ubbt_lang['NO_WRITE_CONFIG']);
 } // end if


Whilst looking into this, I have replaced the code above with my code below.
I don't advocate doing this as there is no file lock.
I am simply reporting to keep this thread updated for anyone else with problems.

Code:
$check = file_put_contents("{$config['FULL_PATH']}/includes/config2.inc.php",$newconf);
if (empty($check)) {
$admin->error($ubbt_lang['NO_WRITE_CONFIG']);
}



This holds true also for custom islands etc.
_________________________
Using version :: 7.5.7 ...sans SFS at the mo' crazy
Top
#249958 - 08/25/12 02:11 PM Re: config file wiped out [Re: driv]
driv Offline

Carpal Tunnel
Registered: 01/10/04
Posts: 2543
_________________________
Using version :: 7.5.7 ...sans SFS at the mo' crazy
Top
Page 1 of 3 1 2 3 >



Moderator:  AllenAyres, Harold, Ian, Ron M 
Shout Box

Today's Birthdays
No Birthdays
Recent Topics
Express hosting.
by Ruben
05/16/13 03:54 PM
Level of detail in new user registration emails
by Mitch P.
05/15/13 10:20 PM
Approving users
by Bert
05/15/13 09:22 PM
Users randomly added to other group
by Bert
05/15/13 09:15 PM
Posting and other problems with 7.5.7
by Matthias1976
05/15/13 02:58 PM
Forum Stats
10964 Members
36 Forums
33956 Topics
183369 Posts

Max Online: 978 @ 06/24/07 10:19 PM
Random Image