Previous Thread
Next Thread
Print Thread
Rate Thread
#238414 02/28/2003 2:13 PM
Joined: Dec 2002
Posts: 173
Member
Member
Offline
Joined: Dec 2002
Posts: 173
Hi all

Does the one license alow you to make a test site...if ... how is it done and is it easy, my little scotch brain is getting scrambled now.


Thanks all


Thanks

Liahona
Sponsored Links
Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
My understanding that making a test site is permitted, provided it's used only as a test site.

Here are my notes on how to do it. These are based on using a Linux platform, and having shell access.

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

Cloning a test copy of a UBB.threads installation

Source board:
MySQL database name - foo1_db
MySQL user - foo_user
install dir - /example/htdocs/ubbt/foo1_dir
non-HTTP dir - /example/ubbt/foo1_dir
admin/MySQL log dir - /example/ubbt/foo1_dir/logs
cookie prefix - 1

Target board:
MySQL database name - foo2_db
MySQL user - foo_user
install dir - /example/htdocs/ubbt/foo2_dir
non-HTTP dir - /example/ubbt/foo2_dir
admin/MySQL log dir - /example/ubbt/foo2_dir/logs
cookie prefix - 2

1) Copy the database foo1_db to the database foo2_db.

The easiest way is probably to use mysqldump to back up foo1_db, and then restore the backup into foo2_db.

First create the database foo2_db, and if necessary, adjust foo_user's grants so that it has access to foo2_db.

Then:

mysqldump --quick --add-drop-table --add-locks --lock-tables -ufoo_user -p foo1_db >foo1_db.sql

mysql -ufoo_user -p foo2_db < foo1_db.sql

2) Copy all files from the source directories to the target directories.

If the target directories don't exist, create them:

mkdir /example/htdocs/ubbt/foo2_dir
mkdir /example/ubbt/foo2_dir

If the target directories already exist, delete their contents:

rm -R /example/htdocs/ubbt/foo2_dir/*
rm -R /example/ubbt/foo2_dir/*

Copy the files:

cp -a /example/htdocs/ubbt/foo1_dir/* /example/htdocs/ubbt/foo2_dir
cp -a /example/ubbt/foo1_dir/* /example/ubbt/foo2_dir

(Ensure that hidden files such as .htaccess were copied.)

3) Edit the configuration files to change the references.

Change all occurrences of "foo1" to "foo2" in the following files:

/example/htdocs/ubbt/foo2_dir/main.inc.php
/example/ubbt/foo2_dir/config.inc.php

Edit /example/ubbt/foo2_dir/config.inc.php and change $config['cookieprefix'] from "1" to "2".

4) Edit any other files that contain path references or otherwise need to be different for this clone. For example, the following files may need to be edited:

/example/htdocs/ubbt/foo2_dir/includes/header.php
/example/ubbt/foo2_dir/cron/php/doexpire.php
/example/ubbt/foo2_dir/cron/php/subscriptions.php

5) Delete the copied log files.

rm /example/ubbt/foo2_dir/logs/*

That's it.

Joined: Dec 2002
Posts: 173
Member
Member
Offline
Joined: Dec 2002
Posts: 173
Hi dave

I use my servers own software for dbases
called mpanel.

Org db = threads1
New db = Threads2

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

1. I made a new db threads2

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

2. Exported (dumped I believe) threads1 db to my own hard drive from within my servers mpanel as the one from the admin does not work.

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

3. Logged in to my new db threads2 mpanel.

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

4. Imported threads1 db sql file from my hard drive (using mpanel) which was called "threads1backup.sql" as follows..

=========================================================
Mpanel page reads .........

In order to import data into this database you must click on the "Browse..." button and select a previously dumped file. These files are just a long list of SQL commands which reconstruct any aspect of the database dumped.

Import file: ............Click browse.

==========================================================

It then askes for the name of the file to import from my hard drive so I click the orginal exported threads1 db sql file "threads1backup.sql".

It started to import and went on until the file looked like it had uploaded (the progress bar on status bas was full) then I received this..........

Fatal error - Maximum execution time of 30 seconds exceeded in ..address of mysql control panel via isp - not threads.

Checked threads2 db but nothing there.

Now stuck...So have I did something wrong??

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

If I get passed here sometime then...............

5. Where do I do the below from? - within the admin page msql command?

mysqldump --quick --add-drop-table --add-locks --lock-tables -ufoo_user -p foo1_db >foo1_db.sql

mysql -ufoo_user -p foo2_db < foo1_db.sql

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

6. (Your No.2) Copy all files from the source directories to the target directories.

Can I just copy all files to my hard drive then back to the new dir on web site.

That will do for now or I will get MORE

Thanks for your help, any more help with this that you can give will be helpful to me and I suppose others as well.






Thanks

Liahona
Joined: Dec 2002
Posts: 173
Member
Member
Offline
Joined: Dec 2002
Posts: 173
to hard


Thanks

Liahona
Joined: Dec 2002
Posts: 173
Member
Member
Offline
Joined: Dec 2002
Posts: 173
Hi

Okay .. I had a problem with my ISP in the sence that when I backed up my dbase to my hard drive so I that I could then import it to my test site the prog that they use for this adds carrage returns to end of lines or something, something to do with Unix to windows I don't know anyhow they did it for me and I now have a new dbase, I have copied all files to hard drive then back to my new site, so now ready to move on to the next part.

Wish me luck.... I will keep you informed, I hate being beaten at something like this, prob like the spider.

Thanks


Thanks

Liahona
Sponsored Links
Joined: Dec 2002
Posts: 173
Member
Member
Offline
Joined: Dec 2002
Posts: 173
Hi Anybody

I have finaly got my test site working, well, not really ...

Just (I think) one thing that's funny....

The main index page " /ubbthreads.php " comes up blank, I know the other pages work as I can type in the IIP address and get them all working from there that is except main index.

Even the config-inc.php works

Here is what I get when I view the ubbthreads.php page

====================================================

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD>
<BODY></BODY></HTML>

As you can see there is nothing there..........

====================================================

Maybe its the includes/header.php that Dave_L says to edit and change

[]4) Edit any other files that contain path references or otherwise need to be different for this clone. For example, the following files may need to be edited:

/example/htdocs/ubbt/foo2_dir/includes/header.php
/example/ubbt/foo2_dir/cron/php/doexpire.php
/example/ubbt/foo2_dir/cron/php/subscriptions.php [/]



The header file looks like below.
What have I to change in this ???

<?

$html = new html;

// Grab the tablewrapper
list($tbopen,$tbclose) = $html -> table_wrapper();

// Send the template
include("$thispath/templates/$tempstyle/header.tmpl");

?>


Anyone got an idea.

Thanks



Thanks

Liahona
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Usually if a page is blank.... it's a missing language file. Make sure you're not missing the ubbthreads.php language file.

Joined: Dec 2002
Posts: 173
Member
Member
Offline
Joined: Dec 2002
Posts: 173
Hi Josh

Wow you were to fast for me as I was editing my last post with the header.php changes.

But the ubbthreads.php is in the languages/english dir

Thanks any more ideas


Thanks

Liahona
Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
The note about changing includes/header.php doesn't apply to your board. In my case, I have some board-specific custom links added there, so I need to change them when cloning a test board.

I'm not sure what the problem is. It might require access to your server to see what's going on.

Joined: Dec 2002
Posts: 173
Member
Member
Offline
Joined: Dec 2002
Posts: 173
Hi Dave_L & JoshPet

I got the little it was in the ubbthreads.php file (ubbthreads root dir) this

require ("languages/${$config['cookieprefix']."w3t_language"}/ubbthreads.php");

had the " [:"red"]s [/] " missing from ubbthread[:"red"]s [/] .php

Must have been when I was replacing the site name.

Thanks for all your help.

I like to try and fix things myself as it helps to learn but I think the main thing is getting pointed in the correct direction by you guys, getting left with no answer is murder and frustrating.

Am jist rely chuffed weh ma sell, ir ee no.

So keep up the good work.

Thanks


Thanks

Liahona
Sponsored Links

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)