1
tazeo
Moving from Localhost to a REAL server
  • 2006/2/17 6:38

  • tazeo

  • Just popping in

  • Posts: 5

  • Since: 2006/2/16


Okay done a search, and scanned the documentation I have, but am tiring, and getting lost.

I am working on WAMP to work out how to use XOOPS, when I am happy with what I am doing, which could be a ways off yet, how do I move this to my server?

Don't need specific on how just specific on where to look.

Thanks in Advance

2
dargosch
Re: Moving from Localhost to a REAL server
  • 2006/2/17 9:57

  • dargosch

  • Friend of XOOPS

  • Posts: 118

  • Since: 2004/12/21


My Gentoo + PVR-350 + IVTV + MythTV blog is on
http://gentoomythtv.blogspot.com/

3
carnuke
Re: Moving from Localhost to a REAL server
  • 2006/2/17 10:00

  • carnuke

  • Home away from home

  • Posts: 1955

  • Since: 2003/11/5


I have done this several times and it's not especially difficult. Here's the point guide.

1- Create a directory (or use root) on your online server

2- URLs in files: On your local file set, you need to make sure that any hard-coded references tohttp://localhost/xoopssitename/filename.ext is changed tohttp://yourdomain.com/xoopssitename/filename.ext

Ideally you will have used SITE_URL or similar, which extract the correct address regardless of root installation. If you dont do this, your adresses online will be wrong.

3- Prepare the database. Download the database from your local installation. Open it in a text editor able to handle large files ... NOT NOTEPAD! Seach and replace the following:

any refrences tohttp://localhost/ whatever etc
with
http://yourdomain.com/whatever etc.

This is similar to the preping of files above.

change you database name (in the top lines of the file) to reflect your new database name to be created on your online server. Dont forget, some naming conventions use

usernam_databasename

where usernam is your 7 digit username for the account

4-save the Database file in the original GZ format.

5-upload all files to your server in the appropriate directory.

6- CHMOD cache templates_c and uploads to 777

7- Delete all files in cache folder!

8 Prep the mainfile.php Here you need to make all the changes required to reflect the new server settings. here's atypical setting . Change the red items to reflect new server.

------------------
if ( !defined("XOOPS_MAINFILE_INCLUDED") ) {
define("XOOPS_MAINFILE_INCLUDED",1);

// XOOPS Physical Path
// Physical path to your main XOOPS directory WITHOUT trailing slash
// Example: define('XOOPS_ROOT_PATH', 'C:/WM/www/xoops1');
define('XOOPS_ROOT_PATH', 'C:/WM/www/xoops1');
// XOOPS Virtual Path (URL)
// Virtual path to your main XOOPS directory WITHOUT trailing slash
// Example: define('XOOPS_URL', 'http://localhost/xoops1');
define('XOOPS_URL', 'http://localhost/xoops1');

define('XOOPS_CHECK_PATH', 1);
// Protect against external scripts execution if safe mode is not enabled
if ( XOOPS_CHECK_PATH && !@ini_get('safe_mode') ) {
if ( function_exists('debug_backtrace') ) {
$xoopsScriptPath = debug_backtrace();
if ( !count($xoopsScriptPath) ) {
die("XOOPS path check: this file cannot be requested directly");
}
$xoopsScriptPath = $xoopsScriptPath[0]['file'];
} else {
$xoopsScriptPath = isset($_SERVER['PATH_TRANSLATED']) ? $_SERVER['PATH_TRANSLATED'] : $_SERVER['SCRIPT_FILENAME'];
}
if ( DIRECTORY_SEPARATOR != '/' ) {
// IIS6 may double the \ chars
$xoopsScriptPath = str_replace( strpos( $xoopsScriptPath, '\\\\', 2 ) ? '\\\\' : DIRECTORY_SEPARATOR, '/', $xoopsScriptPath);
}
if ( strcasecmp( substr($xoopsScriptPath, 0, strlen(XOOPS_ROOT_PATH)), str_replace( DIRECTORY_SEPARATOR, '/', XOOPS_ROOT_PATH)) ) {
exit("XOOPS path check: Script is not inside XOOPS_ROOT_PATH and cannot run.");
}
}

// Database
// Choose the database to be used
define('XOOPS_DB_TYPE', 'mysql');

// Table Prefix
// This prefix will be added to all new tables created to avoid name conflict in the database. If you are unsure, just use the default 'xoops'.
define('XOOPS_DB_PREFIX', 'xoops');

// Database Hostname
// Hostname of the database server. If you are unsure, 'localhost' works in most cases.
define('XOOPS_DB_HOST', 'localhost');

// Database Username
// Your database user account on the host
define('XOOPS_DB_USER', 'root');

// Database Password
// Password for your database user account
define('XOOPS_DB_PASS', '');

// Database Name
// The name of database on the host. The installer will attempt to create the database if not exist
define('XOOPS_DB_NAME', 'xoops1');

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

9 CHMOD mainfile.php to 444

10 create a datbase with the same name as the one you prepared (also the same name as the one in mainfile.php

In phpmyadmin, browse to that database and upload the database file. This will usually be a query. Alternatively if you have cpanel, you can simply restore a database, using the one you prepared for this site. Provideing you have the same named database already created, the restore database function will simply overwrite the empty one.

Check that all the tabels are there.

11- Ok you should be good to go, The one crucial part of all this is that the mainfile php is correctly ammended for your new installation online.

Go to your new site URL.
http://houseofstrauss.co.uk Resource for alternative health and holistic lifestyle
search xoops

4
terrion
Re: Moving from Localhost to a REAL server
  • 2006/2/17 10:39

  • terrion

  • Friend of XOOPS

  • Posts: 299

  • Since: 2004/9/19


And if you'd like a sandbox to play in, as a test run so to speak, I'd love to help out.

I could give you an account that you could use to work out all the twists and tangles and make as many trial runs as you need to get comfortable with your migration.

You would have a few days with it to work out all these great suggestions until you're ready to go live.
Terrion
Purchase, renew, or transfer your domain name to Ultranet Domains and get a FREE 10GB hosting account. Virtual Dedicated Servers around $35/monthly, no contract. FREE 24/7 telephone ...

5
tazeo
Re: Moving from Localhost to a REAL server
  • 2006/2/19 22:51

  • tazeo

  • Just popping in

  • Posts: 5

  • Since: 2006/2/16


Thanks for the feedback. Just started playing with group permisisons ect, so I am a little way of yet, but XOOPS is a great way to do it.

Login

Who's Online

195 user(s) are online (135 user(s) are browsing Support Forums)


Members: 0


Guests: 195


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits