phpbb forum files deleted but database safe. how to configure new files with the existing database? - phpbb

I have been using a phpbb forum.
It got deleted.
The database is intact. safe.
What are all the files i should modify.
I hope it is mostly one config file.
what are all the configurations i need to change?
so that the new files will work with the existing database.
I forgot the version. may be i can read it from the database.
Anyway... I need a help to restore my project.

If you have no files at all, the easiest way is to:
1 - download your database
2 - Create a new installation of Phpbb (easiest to use the same version you used to run)
3 - Once you have a new bare bones forum, log into Phpmyadmin, or whatever you use to manage databases, and drop all the tables from the new install, leaving a completely empty db.
4 - Import your saved DB to the empty database. This will restore all users and posts etc
5 - If your old forum used any mods you can either reinstall them (any db tables should still be there), or use the Support Toolkit (download from phpBB) and run the database cleaner. This will remove all non standard tables leaving your db as if it was a clean install but retaining all posts, users etc.
When I lost all my forums, I chose this route and cleaned the database. I then updated the forum to the latest version, and reinstalled all styles and mods from scratch. It's probably not the easiest way to do things, but I knew I had everything bug free, up to date, and no bits of unused mod cluttering the database.

First, you'll need the DB URL, (localhost) DB name,the user name and password for the database and the prefix for the tables. config example:
<?php
// phpBB 3.0.x auto-generated configuration file
// Do not change anything in this file!
$dbms = 'mysqli';
$dbhost = 'localhost';
$dbport = '';
$dbname = 'name_of_phpbb_db';
$dbuser = 'your_mysql_username';
$dbpasswd = 'your_mysql_pass';
$table_prefix = 'phpbb_';
$acm_type = 'file';
$load_extensions = '';
#define('PHPBB_INSTALLED', true);
// #define('DEBUG', true);
// #define('DEBUG_EXTRA', true);
Then you can delete or rename the install folder and go directly to your site. You'll have to tweak the DB in phpMyAdmin if you had a style other than default. and being your phpBB directory was gutted, all attachments, images, mod's and styles will be gone. You'll have to go into the modules_table in the DB and disable the non existent mods or you'll get errors in the ACP

I found out the answer from phpbb forum.
it worked.
Here it is...
http://www.phpbb.com/community/viewtopic.php?f=46&t=2110940&p=12899021#p12899021
:D
but still if people would like to comment or suggest then please do so.

Related

SQL Database in GitHub

I am building a Java app that uses an SQLite database to hold most of its data. For the end-user, the database would be almost entirely read-only, with very occasional edits. I'll (theoretically) be displaying/distributing it through my GitHub page, so my question is:
What's the best way to load the database into GitHub? (I'm using IntelliJ with DataGrip.)
I'd prefer to be able to update the database when I commit/push, instead of having to overwrite the whole file. The closest question I can find is How to include MySQL database schema on GitHub? but there could potentially be hundreds or thousands of entries, so I can't just rebuild the tables when the user installs the app.
I'm applying for entry-level developer jobs, and this project is going to be my main portfolio piece during job-hunting. I'm trying to make sure it is not only functional but also makes a good impression. Any help is (very) greatly appreciated.
EDIT:
After moving my .db file into the folder connected to GitHub (same level as my src folder) apparently I can now commit/push it with the rest of my files. How do I make sure that the connection from my Java code to the database stays valid once it is loaded onto another user's system? Can I just stick with
connection = DriverManager.getConnection("jdbc:sqlite:mydatabase.db");
or do I need to rework the path?
Upon starting, if your application can't find a corresponding sqlite database file, have it create one. Then do initial load of your tables from either CSV, JSON or XML files.
You can upload these files to Git, as they are text formats.

logrotate keep old file names

By default log rotate shifts file name's index on each rotation. I would like to keep names for old files. On each rotation: create new files + delete outdated.
Reason: every time I am rsycn those files with another sever, I have to download ALL file instead of simply downloading newly created ONE file and removing outdated ONE file.
Thanks
This web site and its users simply s#cks! This web site dedicated to newbie questions, which later will be replied by another group of newbies who will use google search to copy&paste reply (have no clue what they are saying) or by replying irrelevant clarification posts.

Play framework ignores evolution script

I'm currently covering the basics of SQL databases and using them in play framework. I have created postgres database and successfully configured it in my application.conf
db.default.driver=org.postgresql.Driver
db.default.url="jdbc:postgresql://database.example.com/playdb"
db.default.user=postgres
db.default.password=qwerty
I have also created 1.sql file in conf/evolutions/evolutions/default directory and wrote there same example SQL code to create simple table. The problem is that play seems to ignore the existence of this file. When I run my server and connect to localhost, I'm suppoused to be asked by Play, whether I would like to have my script applied to my database or not. Unfortunately I'm not and the only thing play is doing, is loading my home page (CREATE TABLE in 1.sql is not executed and I don't have any tables created). Any ideas what am I doing wrong?
Make sure you have following line in your build.sbt file
libraryDependencies += evolutions
In my case, evolution ignored 2.sql (and 1.sql).
To resolve this I had to remove those comments from 1.sql:
#--- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions
and add my own comment such as:
# Initial version
Also, viewing 1.sql file in VI revealed it contains ^M characters which had to be removed.
After those two steps, evolution stopped overwriting 1.sql and finally used the provided 2.sql file.
Evolution seems to overwrite 1.sql even if you do not perform the db update, so make sure you are editing the original version.
I am using play 2.4.1.

Storing Drupal SQL in Git

I have a drupal site, and I am storing the codebase in a git repository. This seems to be working out well, but I'm also making changes to the database. I'm considering doing periodic dumps of the database and committing to git. I had a few questions about this.
If I overwrite the file, will git think it is a brand new file or will it recognize that it is an altered version of the same file.
Will this potentialy make my repo huge (the database is 16mb)
Can I zip this file? or will this mess Git up ... the zipped version is only 3mb
Any other suggestions?
If you have enough space, a non-compressed dump in source control is pretty handy because you can compare using a diff program what rows were added/modified/deleted.
Another solution is to use the features module which is supposed to capture drupal config in code. It stores this captured data as a feature module which you can put into version control.
For my database applications, I store scripts of DDL statements (like CREATE TABLE) in some sort of version control system. These scripts sometimes include static "seed" data as well. All the version control systems I use are good at recognizing differences in these files, and they are much smaller than the full database with data.
For the dynamically-generated data, I store backups (e.g. from mysqldump) in an appropriate location (depending on the importance of the data, that may include offsite backups).
1) It's all text, so GIT will just see it as it would any other file.
2) No, due to the above it should add 16mb to the repo (or less, due to GITs own compression), it won't add a new file every time, just the changes, so the repo will change by the size of the additions to the repository
3) No, or GIT won't be able to see the differences - GIT does it's own compression anyway

Problems with moving my Wordpress site to another domain/server

I'm having problems moving a wordpress site from one domain to another. I've searched the site but couldn find a useful answer for my situation.
Here's what i did:
I made a backup of the website. Then i exported the database.
Then i installed Wordpress on the other domain.
Then i copied all my Wordpress files of the old website on the new server overwriting the new installation. Then i deleted everything from the database on the new server and imported the database of the old server. Then i changed the database name and bpassword in the wp-config file.
So i did all this but the new site isn't working, and i don't know where it went wrong?
So i'd like to start over, but what should i do different?
Thankyou for your help!
You can run these sql queries in phpmyadmin to change URLs in the database after the move for site options, post URLs and URLs in post/page content:
UPDATE wp_options SET option_value = replace(option_value, 'http://olddomain.com', 'http://newdomain.com') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'http://olddomain.com','http://newdomain.com');
UPDATE wp_posts SET post_content = replace(post_content, 'http://olddomain.com', 'http://newdomain.com');
4/22/2014 Edit: this is a much better solution that won't break PHP serialized data: interconnectit.com WordPress Serialized PHP Search Replace Tool
The main thing you need to do is update 2 fields in the database to the correct domain.
It can be done a few different ways.
Method 1:
Add this line to your wp-config.php file, then visit http://yournewdomain.com/wp-admin.php and log in. This will force the update:
define('RELOCATE',true);
After you log in, you should remove that line.
Method 2:
Add these 2 lines to your theme's functions.php file found at wp-content/themes/themename/functions.php
update_option('siteurl','http://example.com/blog');
update_option('home','http://example.com/blog');
After that, you need to update the GUID for each post. In phpMyAdmin or from the mysql command line issue this:
UPDATE wp_posts SET guid = REPLACE (
guid,
'http://exampleoldsiteurl.com',
'http://examplenewsiteurl.com');
replace exampleoldsite and examplenewsite with the respective domains.
All of this info can be found at http://codex.wordpress.org/Changing_The_Site_URL
You will probably need to edit some fields in your database and update the settings in the admin area. There is quite a nice guide here
http://codex.wordpress.org/Moving_WordPress#Moving_WordPress_to_a_New_Server
I think the easiest way is probably:
Install a new Wordpress blog
Go on old blog Admin panel. Here, in Manage > Export select "all" in menu
Restrict Author.
Click on Download Export File
In new blog go on Manage > Import, choose Wordpress item.
In the page that will be shown, select the file just exported. Click
Upload file and Import
It will appear a page. In Assign Authors, assign the author to users
that already exist or create new ones.
Click on Submit
At the end, click on Have fun
Instead of installing Wordpress on new server. Copy old files to new server, import database and change wp-config. I found this helpful How to Transfer a WordPress website to another Host
There is also a tool available for those who are not confident running SQL update scripts, found at:
Search and Replace for WordPress DB
Remember to delete files after performing the desired actions to the DB, because the script exposes DB username/password found in wp-config.php ;)