1

Topic: Beginners problem

Just to get it mentioned, I'm not that updated on php, PunBB and MySQL stuff (and that might be the problem wink)

My problem is:
I installed PunBB soon a year ago, first time doing anything like it. It works fine for standard use, but I've made a few mistakes, so I can't do anything more than to just "have a forum". Somehow, somewhere in the installation I must have missunderstood the part where you spessify the DB you'll be using. So I don't really think my forum uses any DB at all (?) I've been looking in the SQLite looking for a DB that I can lead back to PunBB queries without any luck.
- This prevents me from installing any mods etc.
- And also when I moved the server once I had to manually configure the cache/cache_config.php with the new IP address to be able to do anything as an Administrator (As I'll allways be rederected to the IP spessified in Options). If I do any changes in Options, the forum rederects me back to the old IP. (This makes me think the data must be stored somewhere, but I just can't figure out where).

So my questions are as follow:
- How can I check what DB my current forum is using?
- If there is no working DB for my forum, can I create one?

I guess you need more info to help me, but I wouldn't know what info, so don't essitate ask for more details.

Have my hopes up for advices on this!
IB

2 (edited by Lurker.boi 2008-09-02 11:50)

Re: Beginners problem

Well,  Since you've been running for a year,I'm assuming this is a version 1.2.x.

If your forum is working, you surely have a database of some sort.  Open your config.php file, which is in your forum root, and look for the $db_type, which should be the first line.  This is the database you are using, and you should see all your connecting information there.

The issue you have with the forum redirect is the same issue you have where you manually had to change a cache_config.php.  The base url of the forum needs to be changed.

To do this, you need to go into your database. (depending on which database you have will determine how you can do this).  you need to go into your config table and find the row o_base_url and change it to match your new url.  You would then likely want to delete the files in  your cache folder and you'll be all set.

3

Re: Beginners problem

Yes, I'm running version 1.2.x. I started with 1.2.17 and have updated it. Atm I got 1.2.20.

When I open my config.php I find the info:

$db_type = 'sqlite';
$db_name = 'forum2';

This is correct, I installed sqlite.
When I log onto sqlite I see a DB named forum2 ...but this DB have 0 tables in it. So it kinda leeds nowhere. I also find 4 other databases in it (who of them I've created I can't remember):
-PunBB (17 tables, all starting with fs_*)
-web (36 tables, all starting with jos_*)
-mysql (17 tables, no pre-marking)
-information_schema (16 tables, no pre-marking)

This is the reason I manaully changed the IP adress in the cache file, because I never found o_base_url.

I don't really think I created a DB here before I installed the forum for the first time, as I didn't exactly know what I was doing. After reading alot about PunBB over the last year, I now have a better understanding and would know how to set up a forum from scratch again. But since I don't want to loose anything on my existing forum I wonder if there's any way of saving the one I got smile

Anyways, thanks for the reply!

Re: Beginners problem

IBTB wrote:

Yes, I'm running version 1.2.x. I started with 1.2.17 and have updated it. Atm I got 1.2.20.

When I open my config.php I find the info:

$db_type = 'sqlite';
$db_name = 'forum2';

This is correct, I installed sqlite.
When I log onto sqlite I see a DB named forum2 ...but this DB have 0 tables in it. So it kinda leeds nowhere. I also find 4 other databases in it (who of them I've created I can't remember):
-PunBB (17 tables, all starting with fs_*)
-web (36 tables, all starting with jos_*)
-mysql (17 tables, no pre-marking)
-information_schema (16 tables, no pre-marking)

This is the reason I manaully changed the IP adress in the cache file, because I never found o_base_url.

I don't really think I created a DB here before I installed the forum for the first time, as I didn't exactly know what I was doing. After reading alot about PunBB over the last year, I now have a better understanding and would know how to set up a forum from scratch again. But since I don't want to loose anything on my existing forum I wonder if there's any way of saving the one I got smile

Anyways, thanks for the reply!

The last two files are made by phpmyadmin and are required. Web sounds like a joomola open source database.

Changing the IP in the chace is useless as the cache is updated according to the database.

The best way from here is delete your config.php file and reinstall it to forum2. This will update it with the correct databases and base url.

Btw, o_base_url is located on the second page of config database wink

Sorry. Unactive due to personal life.

5

Re: Beginners problem

What will happend when I delete the config.php file? What configurations will I loose?
And what will I loose by re-installing?

Will try this once I've made a backup! smile

Re: Beginners problem

Well you have no configurations, no posts or forums.

Sorry. Unactive due to personal life.

7 (edited by IBTB 2008-09-02 20:22)

Re: Beginners problem

Hmmmm, is there no way to transfer my posts from the forum I currently have?
I wouldn't like to loose everything in it.

edit:
What you're saying is that I should delete all and start all over again? That I would've managed, but that reason I asked for help was to be able to keep users/posts from my currently one.

8 (edited by Utchin 2008-09-02 20:25)

Re: Beginners problem

From the tables you have shown me, you dont have any users or posts. Unless you have used the once called "web"? But that looks like a joomla installation.

Or are you talking about another host, Which i dout you are?

Sorry. Unactive due to personal life.

9

Re: Beginners problem

I have no idèa of what I'm talking about! tongue

Ok, to start from scratch:
-I have a forum (with users, posts etc etc.)
-Works normal for all "normal" users.
-When I try to "upgrade" the forum with "addons" I fail because they can't access/find/write to the database.
-I do not find the database myself neighter (accessing phpMyAdmin to look for it). However there is a file called forum2 in / that "grows" over time. My guess is that this is the file that have all my data? But how to get this info into sqlite/phpMyAdmin so the computer understands it?

Does this mean I don't have a database, or is it hiding? tongue
Can I do something about it, or do I have to let it be as it is to be able to keep all users/posts?

10

Re: Beginners problem

I have no idea how diffrent sqlite is to normal sql? AS far as i can tell phpmyadmin dont work with sqlite so it wont pic it up, however if you go to sqlitemanager you might find it there? ( that is the sqlite program i have so you might not have it?)

Sorry. Unactive due to personal life.

11

Re: Beginners problem

You're right, phpMyAdmin sais it runs MySQL. Maybe this is the problem. May I ask how you access the sqlite? Is sqlitemanager a program installed with sqlite or do I need to download this seperatly?

Thanks for helping me progress! smile

12

Re: Beginners problem

How are you running your forum? Via a web host or your own local PC?

If you are running it via your pc then did you use a Prebuilt installer like WAMP?

Sorry. Unactive due to personal life.

13

Re: Beginners problem

It's accually running on a QNap NAS server. I have a Linux box as well (the one I spoke of from ~2000) but failed installing php on that one, so the NAS was a easy solution for me. It got phpMyAdmin and sqlite installed.

14

Re: Beginners problem

check out http://www.sqlitemanager.org/

Sorry. Unactive due to personal life.

15

Re: Beginners problem

Allright, now I'm getting somewhere!! smile

I load the forum2 DB with sqlitemanager, find the o_base_url row and edit it.
But then I'm halted again tongue
I tried the "Export", with many different options checked out, but the new file I get end up beeing 2/3 of the original one, not the same file-type and my forum won't accept it. Says it's eighter encrypted or not readable.

I've tried rename the file to the same name without any luck.

I didn't know the file "forum2" in my / was the database itself. But now I know atleast yikes

Hoping you can guide me further on to my next step!

And again, thanks for all help!
IB

16

Re: Beginners problem

What file type are you exporting it to, and where are you trying to import it?

If you have mysql installed, why dont you use that?

Sorry. Unactive due to personal life.

17

Re: Beginners problem

Hmmmm, I don't know if I'm accually importing it anywhere. When I push "Export" I get a new file (forum2.sql) that I replace the forum2-file I have in my / with. How else do I import anything?

And what should I be using mysql for? (Does SQLite count as MySQL?) And how?

18 (edited by Utchin 2008-09-03 15:11)

Re: Beginners problem

if you use MySql, then you will be using phpmyadmin. I dont see why you are exporting it then replacing it to that file.

What you want to do is to export the code, Just looked at sqlite now and when you export it, copy the code, then open up phpmyadmin, click on the forum and go SQL.

Just looking back, you have a MySQL database which has files in? The one called "punbb". Does that have users in, or posts?

Also try changing

$db_type = 'sqlite';
$db_name = 'forum2';

To

$db_type = 'mysqli';
$db_name = 'punbb';
Sorry. Unactive due to personal life.

19

Re: Beginners problem

The PunBB thingie is something I created I think. I tried to do a new installation once, and that works. I can accually see all things in this now (Didn't quite understand it untill now!).

Where is this $db_name ? Is it inside myPhPAdmin I should look for this? Or in the file called "forum2" in my forum folder?

And as it seems like the database installed correctly the second time I installed it (another forum tho), is there any way I can "kidnap" that db and make it the counting one for my original forum (if anything of that made any sense yikes).

Anyways, I'm to tiered to look trough this now. Gonna have a look tomorrow. I've learned alot allready tho, so I am indeed gratefull for all your help! smile

20

Re: Beginners problem

$db_name is in config.php where you say what database you are using/

Sorry. Unactive due to personal life.

21

Re: Beginners problem

When changing $db_type to mysqli I get this when trying to open the forum again:

This PHP environment doesn't have Improved MySQL (mysqli) support built in. Improved MySQL support is required if you want to use a MySQL 4.1 (or later) database to run this forum. Consult the PHP documentation for further assistance.

Also, I tried to import the "forum2" file I had into the phpMyAdmin thingie, getting the error that it's a sqlite DB.

It might just be me, but I didn't quite understand how I manage the sqlite DB? When using that program you spoke of, I needed to import the DB's. With phpMyAdmin I can log in and get to this page with easy overview over the databases etc. I wonder if there is any way to log into the sqlite thingie in any simular way?

This is getting more and more complicated, hehe.

22

Re: Beginners problem

Gonna do a little bump here!

Ok, so as it is now, I have found my SQLite database, managed to configure it. But I'm still stuck at the "Export" part. How do I update my database? I'm abit afraid to click all the options that "SQLiteManager" have on the Export part.

If anyone know how the export works, I would appriciate if they could inform me.

-What options need to be checked?
Add "DROP" (?)
Complete inserts (?)
send (?)
CRLF (?)

And what do I export?
-Structure only
-Structure and data
-Data only

23

Re: Beginners problem

IBTB wrote:

Add "DROP" (?)
Complete inserts (?)
send (?)
CRLF (?)

None. (dont the question marks tell you?)

IBTB wrote:

And what do I export?
-Structure only
-Structure and data
-Data only

Structure and data

Sorry. Unactive due to personal life.

24

Re: Beginners problem

Still no luck yikes

Ok, here is how it goes:
- I enter SQLiteManager
- I add a new Database (name it the same as my database is named and browse, select and upload the database-file)
- I can now browse this database.
- Everything seems fine.


But I don't get the same info as I can see if I open the file with notepad. When I open the database with notepad, all IP's listed in there are my "old one", but every post is in it (all new as well), so it got to be my working database? Tho, in SQLiteManager o_base_url and all other rows containing a url are set with my new IP. This confuses me, as I can't change it to the IP I currently have, couse it allready is!
So, since I don't know any other way, I export the file. Now, when opening the database, all the IP's are as the old one again.
As I said, confusing yikes

So, next question: When I export, what happends? Couse none of the files I see accually update (looking at the database itself and the file created in the SQLiteManager folder when I add a database there).

Are you sure I should now check any of the options when exporting?

Again:
Structure : 
[ ] Add "DROP"

Data : 
[ ] Complete inserts

--------------------

[ ] send   [ ] CRLF



Sorry for beeing back bothering you, but I really want to get this to work smile

25

Re: Beginners problem

Bump! roll