Root directory problem after server transfer

Hi everyone i have a problem which is driving me crasy! I am a web designer but programming is not my strong point, especially when things dont work! lol

So the problem is this.

I had a site on a shared hosting account.

I now have my own dedicated linux hosting account.

I want to take the site from the shared account to my dedicated server.

The site is for a sports league which keeps stats on players goals etc and is driven by a mysql database.

I downloaded all the site files and exported the mysql database.

I then uploaded them all to my server ran the mysql install (having changed the database name to reflect the new one) and it worked perfect.

However there is a problem somewhere in the code, as you can see from how the site currently looks here:

http://server7336.dedicated.webfusion.co.uk:81/niinline/

It seems to be trying to call on a path called “htdocs” which seems to be what the root directory was called from my previous hoster.

My dedicated server root is called public_html

i have spoke with my dedicated supplier and they say that somewhere in my files the root must be named “htdocs” i have searched manually and ran a search with windows Grep(as i use pc) and nither has found any mention of htdocs in any of the files.

When i look at my index.php shown below i see it is calling on ($_SERVER[‘DOCUMENT_ROOT’].

which i think means it should find the root nomatter what it is called but it seems to find somewhere the root called htdocs.

Can anyone help ???

index.php

<?php $BodyID = "Home"; $Title = "Northern Ireland Inline Hockey Association"; ?> <?php include ($_SERVER['DOCUMENT_ROOT']."/includes/page_header.php");?>
<?php include ($_SERVER['DOCUMENT_ROOT']."/content/News/latest_news2.php");?>
<?php include ($_SERVER['DOCUMENT_ROOT']."/content/News/recent_news2.php");?>
<?php include ($_SERVER['DOCUMENT_ROOT']."/content/Fixtures/last.php");?>
<?php include ($_SERVER['DOCUMENT_ROOT']."/content/Fixtures/next.php");?>
<?php include ($_SERVER['DOCUMENT_ROOT']."/includes/page_footer.php");?>

if you have your own dedicated you should have access to htdocs and could have placed the documents there it sounds like maybe you might not have set everything up right one option you could use is change all instances of DOCUMENT_ROOT to HTTP_HOST but again that depends on how the site script is setup. you could give it a shot otherwise you are going to have to set up a redirect in the server to point everything to the right file, or move the files!

thanks for your suggestions i changed it to HTTP_HOST

but it now shows these problems.

http://server7336.dedicated.webfusion.co.uk:81/niinline/

my server provider has informed me that my root name cannot be changed from public_html

im lost as to what to do now :frowning:

as I mentioned in the pm to you I do not feel this is an issue that someone can just give the “ANSWER” to fix. it would take a look at the server and what you have going on to figure out what is happening. we don’t know how your dns is setup for your website, how the redirects are handled, or how your directory structure is or where on the server you are placing the files. As I mentioned in the pm I would be willing to help you out right now for free and take a look at the server because I am in between programming jobs right now and have a few moments. Other than that I don’t feel I can do anything else

Sponsor our Newsletter | Privacy Policy | Terms of Service