Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

database.php issues

edited November 2007 in Vanilla 1.0 Help
Hello everyone,

For the past few months I have been having a problem with my Vanilla install where parts of the conf/database.php file are being overwritten and it causes the whole board to die until I fix it.

When it first happens, it just swaps the <? to a ?> at the start of the file, and it would flash my setting to the world, so I now include the settings file offsite (with require_once()) so that my settings are safe.

The only permissions on that file are 400 (user read only), but there is something that is giving write permissions to that file. Is is something Vanilla is doing and can I turn it off?

Here is what it is doing to my database file:

?>php require_once("/home/xxx/.../xxx/inc/conf/database.php"); ?>

Any help would be appreciated.



  • Options
    I'm sorry. There are quite a few other threads about this. I'll take a look there and see if they help first.
  • Options
    No go. The other threads suggest moving the file out of the web accessible directory and changing the file permissions.

    If anyone can tell me if Vanilla changes permissions to that file, that would be great.
  • Options
    Vanilla doesnt make any file permissions changes (that I'm aware of for sure) but it could be that there is a similar fault with database.php as there was for settings.php What extensions are you running?
  • Options
    Add Comments 1.2
    AjaxQuote 1.0
    Applicant Discovery 1.2
    Audio Player 1.0
    Better BB Code 1.0
    Category Jumper 1.0
    Comment Protection 2.0
    Custom Styles 2.1
    Discussion Filters 2.0
    Extended Application Form 1.0
    Extended Text Formatter 1.2
    Flickrizer 0.3
    Hidden Text 1.4
    Hide Success 1.0
    Html Formatter 2.3
    Legends 1.0
    LiveSearch 1.1
    Low-Cal Vanilla 0.4.1
    New Applicants 1.3
    Panel Lists 1.2
    Preview Post 2.5.1
    Private Accounts 1.0
    Quick Keys 1.0
    Quicktags 0.5
    Quotations 1.5
    RSS2 Feed 1.0.2
    Role History 1.0
    Text Mode Switch 2.0
    Thankful People 1.1
    Transmogrifier 1.1
    Vanillacons 1.1
    Vanillazilla 1.0.1
    Who's Online 1.2


    As an aside - that is a fair few extensions. I didn't think I had that much in there :P
  • Options
    It is still happening. What was the cause of the settings.php problem? Could it be a similar issue? This happens at least once a day.
  • Options
    extensions edit conf/database.php, so its one of your extensions. you can look in database.php, check the last entry and find out which extension added it by doing a folder wide search
  • Options
    Just tell us what is the last entry and set the permission of database.php to 400 or 440 while we are looking for a fix.
  • Options
    it says it is Thankful People. I thought I was using the latest version of this, but I will take a look, to be sure.
  • Options
    edited October 2007
    Do you have $Configuration['THANKFULPEOPLE_VERSION'] = 1; in conf/settings.php?
  • Options
    I'm experiencing a similar problem like this with the hidden text extension.
    Hidden Text # 27:

    New question:
    I've been finding my Database.php file is getting wiped out, and replaced with just ?> . After fixing it today, I changed the permissions of it from 777 to 755. Now hidden comments is giving me a configuration error/warning on my form saying changes can't be saved.

    Why does hidden text care about the permissions of my database.php?

    So I set the permissions of my database.php file to 755, and my users started getting this error when they tried to login:
    Notice: Undefined variable: NoticeCollector in
    /****/forums/extensions/HiddenText/default.php on line 43

    Fatal error: Call to a member function AddNotice() on a non-object in /*****l/forums/extensions/HiddenText/default.php on line 43

    Line 43 is:
  • Options
    Sorry for not getting back here sooner.

    I turned off the HiddenText extension and that fixed it all up.

    @Dinoboff - yes I do.
  • Options
    Yeah it seems all of a sudden people are having issues with HiddenText.
  • Options
    edited November 2007
    You should remove Line 35 of HiddenText's default.php if (!AppendToConfigurationFile($Configuration['APPLICATION_PATH'].'conf/settings.php', '')) $Errors = 1;
    That could be bad for settings.php.

    But It can't be bad for database.php.
  • Options
    Thanks Dinoboff, made the change and it works on my local. (
This discussion has been closed.