1 (edited by pilch73 2006-02-23 19:53)

Topic: this is a mypunbb issue but can someone answer my question please?

http://www.mypunbb.com/viewtopic.php?id=6707

trying to move my modded mypunbb to my own server

i know how to upload the punbb forum to my server

I v'e  got  a back up the database from mypunbb


will the database work on a normal punbb installation or will i have to recreate the modded forum state?

only asking because i can't get an answer on mypunbb ,sorry !

2

Re: this is a mypunbb issue but can someone answer my question please?

It'll work.
Just install punbb, edit the config manually so that it points to the correct db, load your backup, and that should be it.

Re: this is a mypunbb issue but can someone answer my question please?

pilch73 wrote:

http://www.mypunbb.com/viewtopic.php?id=6707

trying to move my modded mypunbb to my own server

i know how to upload the punbb forum to my server

I v'e  got  a back up the database from mypunbb


will the database work on a normal punbb installation or will i have to recreate the modded forum state?

only asking because i can't get an answer on mypunbb ,sorry !

The database should work, minus any of the mod features in it. If you want those, you have to reinstall the mods

Re: this is a mypunbb issue but can someone answer my question please?

used the mypunbb database back up plugin to get the data base  but it seems to be missing tables

File: /home/pilch73/public_html/include/functions.php
Line: 45

PunBB reported: Unable to fetch user information

Database reported: Table 'pilch73_pilc.users' doesn't exist (Errno: 1146)

Re: this is a mypunbb issue but can someone answer my question please?

That should be there: is that the right prefix?

Re: this is a mypunbb issue but can someone answer my question please?

god knows im a total amateur,can get a blank databse to work on the new server but once i try puttting that database o n it goes boobs up so to speak

Re: this is a mypunbb issue but can someone answer my question please?

Can you paste a bit of the dump here? wink

Re: this is a mypunbb issue but can someone answer my question please?

not sure what to post so i could msn you it if you dont mind ,so i don't embarras myself

pilch73@hotmail.com

9

Re: this is a mypunbb issue but can someone answer my question please?

go to your punbb folder, and look at the file "config.php"
it the first part there is:

$db_type = 'pgsql';
$db_host = '127.0.0.1';
$db_name = 'punbb';
$db_username = 'somename';
$db_password = 'somepassword';
$db_prefix = '';
$p_connect = false;

...

You probably have some different settings.
What is important here is de dbname, dbprefix and username and password.
Are these the same as the name and prefix of the database? and are the username and password correct?

Re: this is a mypunbb issue but can someone answer my question please?

I just took a look at the dump wink
Change $db_prefix to 'hucknalltownfc_'

Re: this is a mypunbb issue but can someone answer my question please?

did that and got


File: /home/pilch73/public_html/include/functions.php
Line: 110

PunBB reported: Unable to fetch guest information

Database reported: Table 'pilch73_1sql.hucknalltownfc_users' doesn't exist (Errno: 1146)

Re: this is a mypunbb issue but can someone answer my question please?

And you did import the tables into the database plich73_1sql, right?

Re: this is a mypunbb issue but can someone answer my question please?

??????????????

which means lol


i tought this server changeover was straight forwards ,or am i just thick?

no,don't answer that question.


Is anyone willing to sort me out lol ?

Re: this is a mypunbb issue but can someone answer my question please?

Is anyone willing to sort me out lol ?

You have to answer my question tongue
The database your PunBB is using is named plich73_1sql. It can't find the tables you imported (I'm assuming you did import them tongue). Since I have a copy of the dump and can see the prefixes are right, that means you imported the SQL dump was not imported into the database.

15 (edited by pilch73 2006-02-25 13:51)

Re: this is a mypunbb issue but can someone answer my question please?

i think there might be a problem with the uploading  process???


do you fancy trying?

i can give you my server access


im not sure if im doing something wrong or if something else is going wrong!


looked in the my phpadmin thing and it said there were only 2 records in the users table???????

Re: this is a mypunbb issue but can someone answer my question please?

Did you try uploading it through phpMyAdmin?

17 (edited by pilch73 2006-02-25 13:56)

Re: this is a mypunbb issue but can someone answer my question please?

yep but doesnt seem right

half the problem is i dont know what im looking for.

18 (edited by Smartys 2006-02-25 14:46)

Re: this is a mypunbb issue but can someone answer my question please?

pilch73 wrote:

yep but doesnt seem right

That's because your dump is too large to do that way tongue

Here's what you should do:
0. (I forgot to add this before tongue) Install a fresh copy of PunBB
1. Upload the dump to the fresh copy's website in the plugins folder. Call it backup.sql
2. Download the DB Management plugin
3. Open the code up, find

elseif ( isset($_POST['restore_start']) ) {
    // Restore SQL Dump
    //
    // Handle the file upload ....
    // If no file was uploaded report an error...
    //
    $backup_file_name = (!empty($HTTP_POST_FILES['backup_file']['name'])) ? $HTTP_POST_FILES['backup_file']['name'] : "";
    $backup_file_tmpname = ($HTTP_POST_FILES['backup_file']['tmp_name'] != "none") ? $HTTP_POST_FILES['backup_file']['tmp_name'] : "";
    $backup_file_type = (!empty($HTTP_POST_FILES['backup_file']['type'])) ? $HTTP_POST_FILES['backup_file']['type'] : "";
    if($backup_file_tmpname == "" || $backup_file_name == "")
    {
        message('No file was uploaed or the upload failed, the database was not restored');
    }
    if( preg_match("/^(text\/[a-zA-Z]+)|(application\/(x\-)?gzip(\-compressed)?)|(application\/octet-stream)$/is", $backup_file_type) )
    {
        if( preg_match("/\.gz$/is",$backup_file_name) )
        {
            $do_gzip_compress = FALSE;
            $phpver = phpversion();
            if($phpver >= "4.0")
            {
                if(extension_loaded("zlib"))
                {
                    $do_gzip_compress = TRUE;
                }
            }
            if($do_gzip_compress)
            {
                $gz_ptr = gzopen($backup_file_tmpname, 'rb');
                $sql_query = "";
                while( !gzeof($gz_ptr) )
                {
                    $sql_query .= gzgets($gz_ptr, 100000);
                }
            }
            else
            {
                message('Sorry the database could not be restored');
            }
        }
        else
        {
            $sql_query = fread(fopen($backup_file_tmpname, 'r'), filesize($backup_file_tmpname));
        }
    }
    else
    {
        message('Error the file name or file format caused an error, the database was not restored');
    }

Replace with

elseif ( isset($_POST['restore_start']) ) {
    $sql_query = fread(fopen('backup.sql', 'r'), filesize('backup.sql'));

3. Upload the plugin, go to the plugin's page and hit the Restore button. It might take a while, but it should restore

Re: this is a mypunbb issue but can someone answer my question please?

ARRRGH !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

that didn't work.


i give up.(the advice is great though)

my interprtation must be bad !!!!

Re: this is a mypunbb issue but can someone answer my question please?

What went wrong?

Re: this is a mypunbb issue but can someone answer my question please?

god knows


something about files not found on line 496 in db management

Re: this is a mypunbb issue but can someone answer my question please?

Did you upload the backup to the same folder as the plugin?

Re: this is a mypunbb issue but can someone answer my question please?

yes i did

24 (edited by pilch73 2006-02-25 19:20)

Re: this is a mypunbb issue but can someone answer my question please?

Warning: fopen(backup.sql): failed to open stream: No such file or directory in /home/pilch73/public_html/plugins/AP_DB_management.php on line 496

Warning: filesize(): Stat failed for backup.sql (errno=2 - No such file or directory) in /home/pilch73/public_html/plugins/AP_DB_management.php on line 496

Warning: fread(): supplied argument is not a valid stream resource in /home/pilch73/public_html/plugins/AP_DB_management.php on line 496

Re: this is a mypunbb issue but can someone answer my question please?

And you called it backup.sql?