1
seolio
Moving Server
  • 2006/4/5 4:38

  • seolio

  • Not too shy to talk

  • Posts: 196

  • Since: 2005/11/2


Just moving servers with one of my XOOPS sites, and am struggling, it says:
Quote:
XOOPS path check: Script is not inside XOOPS_ROOT_PATH and cannot run.

Can somebody help, I copied everything directly, and changed the db path etc.. in mainfile.php.

What else could be wrong, this happened before but I gave up trying in the end, but I really need to move this site as my host is charging rediculous costs for bandwidth, i.e. £60 just for bandwidth on top of my monthly cost!!

My new host is part of my reseller acount, anyway, the url at the moment is,http://72.20.4.6/~donotenter/enter/

You will see what I mean
Please can somebody help me this time?

Thanks in Advance

Nick

2
adrock
Re: Moving Server
  • 2006/4/5 8:22

  • adrock

  • Quite a regular

  • Posts: 291

  • Since: 2004/12/7


well....
can you show us what your mainfile is currently showing?

Each host/server is set up differently, so the path you use may need to be altered to match the new hosts set-up.
for instance at host A:
Quote:

// XOOPS Physical Path
// Physical path to your main XOOPS directory WITHOUT trailing slash
// Example: define('XOOPS_ROOT_PATH', '/home/www/mydomain.com');

// This is the same path as you'd see in your ftp app...each host/environment is a little different.

define('XOOPS_ROOT_PATH', '/home/www/mydomain.com');

// XOOPS Virtual Path (URL)
// Virtual path to your main XOOPS directory WITHOUT trailing slash
// Example: define('XOOPS_URL', 'http://www.my domain.com');
define('XOOPS_URL', 'http://www.mydomain.com');


but at host b:
Quote:

// XOOPS Physical Path
// Physical path to your main XOOPS directory WITHOUT trailing slash
// Example: define('XOOPS_ROOT_PATH', '/hsphere/local/home/userid/sub-if-any.domain.com');
define('XOOPS_ROOT_PATH', '/hsphere/local/home/userid/sub-if-any.domain.com');

// XOOPS Virtual Path (URL)
// Virtual path to your main XOOPS directory WITHOUT trailing slash
// Example: define('XOOPS_URL', 'http://my.domain.com');
define('XOOPS_URL', 'http://my.domain.com');


As you can see, these two hosts will not exactly swap across path structure.....

A quick easy way to see what the new host is doing is to install XOOPS into a new folder, and see what it tells you when it prompts you for the directory answers, as it will detect the correct path and initially populate it on it's own.
Affordable Web Hosting - Family - Fun!...and not always in that order!

3
jdseymour
Re: Moving Server

And a couple of additional items to remember:

If DNS is not transferred, as it seems your's is not,http://www.mydomain.com will not work as the virtual path, temporarily change it to the actual until you change the DNS.

Also, if you transfer files located inside the templates_c and cache folders, they will be compiled from the old paths, make sure you delete the files contained in these folders (except for index.html).

4
stefan88
Re: Moving Server
  • 2006/4/5 9:47

  • stefan88

  • Community Support Member

  • Posts: 1086

  • Since: 2004/9/20


Also don't forget for any XOOPS or module hacks, that may have hardcoded path ...
..

5
carnuke
Re: Moving Server
  • 2006/4/5 11:17

  • carnuke

  • Home away from home

  • Posts: 1955

  • Since: 2003/11/5


The first check is to drop an index.html into the root of the webspace
<html>
<
head></head>
<
body>
This is my site root
</body>
</
html>

Now call your site IPhttp://72.20.4.6/~donotenter/, or whatever the root address is and make sure the index page displays. It will take precedance of index.php of the XOOPS site, so dont forget to remove it!

If the page show OK, now call your domain name. If it displays the same page, it's resolved ok. If not, you have to wait a while.

Also make sure that your site URL is set correctly I mean

http://***** orhttp://www.***** it make a difference.
http://houseofstrauss.co.uk Resource for alternative health and holistic lifestyle
search xoops

6
seolio
Re: Moving Server
  • 2006/4/5 19:32

  • seolio

  • Not too shy to talk

  • Posts: 196

  • Since: 2005/11/2


Thanks all for your help,
I will have to try it all later on as the server has just gone down, Thanks, will reply again when server is back up and I have tried your tips.

Thanks All

7
seolio
Re: Moving Server
  • 2006/4/7 1:20

  • seolio

  • Not too shy to talk

  • Posts: 196

  • Since: 2005/11/2


Quote:

adrock wrote:
well....
can you show us what your mainfile is currently showing?

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', '/usr/local/psa/home/vhosts/donotenter.co.uk/httpdocs/enter');
    
define('XOOPS_ROOT_PATH''/home/donotenter/public_html/enter');

    
// XOOPS Virtual Path (URL)
    // Virtual path to your main XOOPS directory WITHOUT trailing slash
    // Example: define('XOOPS_URL', 'http://72.20.8.200/~donotenter/enter');
    
define('XOOPS_URL''http://72.20.8.200/~donotenter/enter');

    
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'];

Sorry it has taken so long, I have been really busy recently.

here is the mainfile.php, the parts that you wanted to see!

I changed the path as it is on another one of my sites on the same server, except for the /donotenter/enter part.

Hope you can help because it still isn't working.

Thanks all....

8
seolio
Re: Moving Server
  • 2006/4/7 1:27

  • seolio

  • Not too shy to talk

  • Posts: 196

  • Since: 2005/11/2


Me again,
Sorry for all of your trouble guys and thanks for all your help, I got onto my host, and he said that even though I host both on my reseller, the new domain, donotneter.co.uk, has been put on the new server, so he gave me the path and it works correctly now, thanks again....

Nick

Login

Who's Online

194 user(s) are online (128 user(s) are browsing Support Forums)


Members: 0


Guests: 194


more...

Donat-O-Meter

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

Latest GitHub Commits