vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Administrative and Maintenance Tools - Suppress-o-matic - Stop database error spam (https://vborg.vbsupport.ru/showthread.php?t=228146)

John Lester 03-18-2014 05:57 AM

Downloaded but not installed yet. Hectic around here :D

AusPhotography 03-18-2014 10:26 PM

If you need a clean database for this mod this can be used:
(It said mine was corrupt)
Edit the path and run it with "php -f createdb.php" from the command line.

PHP Code:

<?php
// createdb.php 
// Run once module to create an empty SQLite database for this mod
// (c) Kym Farnik 2014 - permission given to use/modify as needed.

$sqliteerror='';
define('DIR','/home/XXXXXX/public_html/forum'); // Edit path to YOUR forum folder

unlink(DIR .'/sqlitedberrors.sqlite'); // delete existing DB

// Create a new Db and create the table and index
if ($sqlitedb = new SQLiteDatabase(DIR .'/sqlitedberrors.sqlite'0666$sqliteerror)) 
{
    
$sqlitedb->unbufferedQuery("CREATE TABLE dberrors (
time TIME PRIMARY KEY,
error TEXT,
errorcode INT(10),
ipaddress VARCHAR(39) ,
script VARCHAR(255)
);"
);
    
$sqlitedb->unbufferedQuery("CREATE INDEX dberrors_time ON dberrors(time);");
}    
    
?>


Zachery 04-02-2014 09:51 PM

Quote:

Originally Posted by AusPhotography (Post 2488199)
If you need a clean database for this mod this can be used:
(It said mine was corrupt)
Edit the path and run it with "php -f createdb.php" from the command line.

PHP Code:

<?php
// createdb.php 
// Run once module to create an empty SQLite database for this mod
// (c) Kym Farnik 2014 - permission given to use/modify as needed.
 
$sqliteerror='';
define('DIR','/home/XXXXXX/public_html/forum'); // Edit path to YOUR forum folder
 
unlink(DIR .'/sqlitedberrors.sqlite'); // delete existing DB
 
// Create a new Db and create the table and index
if ($sqlitedb = new SQLiteDatabase(DIR .'/sqlitedberrors.sqlite'0666$sqliteerror)) 
{
    
$sqlitedb->unbufferedQuery("CREATE TABLE dberrors (
time TIME PRIMARY KEY,
error TEXT,
errorcode INT(10),
ipaddress VARCHAR(39) ,
script VARCHAR(255)
);"
);
    
$sqlitedb->unbufferedQuery("CREATE INDEX dberrors_time ON dberrors(time);");
}    
 
?>


I assume you could also reupload a clean version of the file we provided, right?

AusPhotography 04-02-2014 11:59 PM

Quote:

Originally Posted by Zachery (Post 2491108)
I assume you could also reupload a clean version of the file we provided, right?

No, the file in the main product fails on our site. :(
Which is why I created a fresh one via the script.
[Also, Yes, I uploaded in binary mode. :) ]

Zachery 04-03-2014 01:13 AM

That is pretty odd, what are the permissions on the file, when you upload it, vs creating it?

AusPhotography 04-03-2014 03:15 AM

Quote:

Originally Posted by Zachery (Post 2491127)
That is pretty odd, what are the permissions on the file, when you upload it, vs creating it?

0666 as normal, we are on our own VM, so I have 100% control.

Zachery 04-03-2014 03:28 AM

That is weird, thanks for posting a work around.

AusPhotography 04-11-2014 07:17 AM

A cheap DB dump fragment...

PHP Code:

<?php
// dumpdb.php 
// Run module to dump SQLite database for this mod
// (c) Kym Farnik 2014 - permission given to use/modify as needed.

header('Content-type: text/csv');
header('Content-disposition: attachment;filename=dumpdb.csv');

$sqliteerror='';
define('DIR','/home/XXXXXX/public_html/forum'); // Edit path to YOUR forum folder

// Open the database
if ($sqlitedb = new SQLiteDatabase(DIR .'/sqlitedberrors.sqlite'0666$sqliteerror)) 
{
    
$sqlitequery $sqlitedb->unbufferedQuery("SELECT * FROM dberrors ORDER BY time DESC");
    while (
$sqliteresult $sqlitequery->fetch(SQLITE_ASSOC)) 
    {
        echo 
'"'.date("Y-m-d H:i:s",$sqliteresult['time']).'",'.
             
'"'.$sqliteresult['error'].'",'.
                 
$sqliteresult['errorcode'].','.
             
'"'.$sqliteresult['ipaddress'].'",'.
             
'"'.$sqliteresult['script'].'"'."\n";
    }
}    
else die (
$sqliteerror); // the SQLite failed -- yuck
    
?>


Mecho 04-26-2014 07:47 PM

installed - stopped MySQL to check but lots db errors.

vb 4.2.2
SQLITE3 enabled
sqlitedberrors.sqlite CHMOD is 0666

Thanks in advance

Zachery 04-26-2014 09:30 PM

Are you saying you were getting db errors after installing it? What errors?


All times are GMT. The time now is 11:56 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01183 seconds
  • Memory Usage 1,762KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete