...

View Full Version : Switched hosting. Files can not be found



v1music
07-14-2007, 06:46 PM
I just recently moved a site over to a new host. with the new host i am getting files cant be found errors. i noticed the site was setup in stylesheets and im guess those are the files that cant be located. im alittle confused because i uploaded the exact same files.
attached are the urls for example.
if anyone might be able to help me that would be great! if you need additional info let me know.
Thanks!

koyama
07-14-2007, 06:57 PM
The error messages are coming from PHP because some of the included files were not found. Probably you have specified the wrong path. This is really not a HTML/CSS issue. If you show us the PHP file then maybe someone can help.

v1music
07-14-2007, 07:23 PM
the person who did the site named all the pages to have the extension php which i dont understand. the pages are setup in html using stylesheets. the only php files are for the forum. there are no other php files.

koyama
07-14-2007, 07:33 PM
the person who did the site named all the pages to have the extension php which i dont understand. the pages are setup in html using stylesheets. the only php files are for the forum. there are no other php files.
There must be some PHP sections in the files. Otherwise you wouldn't get those warning messages from PHP. You need to show us what you have for index.php.

v1music
07-14-2007, 08:17 PM
all the pages are named index.php.
here is the main file

koyama
07-14-2007, 08:27 PM
all the pages are named index.php.
here is the main file
As you can see there are PHP sections:


<html>

<head>
<meta http-equiv="trickpro motorsports" content="car store">
<title>Trickpro.com | HOMEPAGE</title>
<link rel="stylesheet" type="text/css" href="http://www.trickpro.net/stylesheet/main.css">
<?php include('/home/trickpro/public_html/stylesheet/meta.php') ?>
</head>

<body topmargin="0" leftmargin="0">

<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="100%">

<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="100%" background="http://www.trickpro.net/images/toplinebg2.jpg">
<p align="right">
<img border="0" src="http://www.trickpro.net/images/toplineedge2.jpg" width="8" height="43"></td>
</tr>
</table>

<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="50%" background="http://www.trickpro.net/images/greybackline3.jpg">
<p align="left">
<img border="0" src="http://www.trickpro.net/images/left4.jpg" width="390" height="105"><img border="0" src="http://www.trickpro.net/images/greybackline3.jpg" width="1" height="105"></td>
<td width="100%" background="http://www.trickpro.net/images/greybackline3.jpg">
<?php include('/home/trickpro/public_html/indexing/topleft/topleft.php') ?></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="100%" background="http://www.trickpro.net/images/menuline.jpg">
<p align="right"><?php include('/home/trickpro/public_html/indexing/trickpromenu/topmenu.php') ?></td>
</tr>
</table>
<?php include('/home/trickpro/public_html/indexing/midstrip/midstrip.php') ?>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="100%" background="http://www.trickpro.net/images/blueline.jpg">
<img border="0" src="http://www.trickpro.net/images/blueline.jpg" width="1" height="6"></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
<tr>
<td width="100%" align="left" valign="top" bgcolor="#FFFFFF">
<img border="0" src="http://www.trickpro.net/images/tags/news.jpg" width="266" height="23"><br>
<?PHP
$number = 5;
include('/home/trickpro/public_html/news/show_news.php');
?></font>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</td>
<td width="160" align="left" valign="top" background="http://www.trickpro.net/images/rightsidebg3.jpg">
<?php include('/home/trickpro/public_html/indexing/left/left.php') ?>
<p></b></font></p>
<p>&nbsp;<p>
&nbsp;</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="100%" background="http://www.trickpro.net/images/bottomline.jpg">
<img border="0" src="http://www.trickpro.net/images/bottomanchor.jpg" width="55" height="26"></td>
</tr>
</table>

</td>
</tr>
</table>

</body>

</html>
You have forgotten to copy some of the files from the old server to the new server. You should copy the entire contents of the public_html directory on the old server and put in on the new server where the index.php is currently located.

v1music
07-14-2007, 09:33 PM
those files are there thoughhttp://www.trickproauto.com/home/trickpro/public_html/indexing/topleft/topleft.php

koyama
07-14-2007, 10:10 PM
those files are there thoughhttp://www.trickproauto.com/home/trickpro/public_html/indexing/topleft/topleft.php
As far as I can tell this file:

http://www.trickproauto.com/home/trickpro/public_html/indexing/topleft/topleft.php

should have been put here:

http://www.trickproauto.com/indexing/topleft/topleft.php

Similarly, this file which is your start page

http://www.trickproauto.com/home/trickpro/public_html/index.php

should have been put here:

http://www.trickproauto.com/index.php

Make sure that you move the entire contents from this directory on the old server:

/home/trickpro/public_html/

to this directory on the new server

/home/content/t/r/i/trickpro/html/

Fix this and repost a link so we can check that you did it right. (It will still not be working because the include paths are wrong, but let's wait with that.)

v1music
07-15-2007, 12:11 AM
okay, i changed the directory

koyama
07-15-2007, 12:18 AM
okay, i changed the directory
So far that's fine, but what about all the other files? You need to move them too.

For example, this file:

http://www.trickpro.net/stylesheet/meta.php

should also be found here:

http://www.trickproauto.com/stylesheet/meta.php

But I get a 404 Not Found.

v1music
07-15-2007, 12:34 AM
okay heres what i have

www.trickproauto.com/

images
indexing
menus
pages
projects
services
stylesheets


/home/content/t/r/i/trickpro/html/

cgi-bin
events
featured
forums
gallery
junk
news
phpform
test

v1music
07-15-2007, 12:38 AM
i dont understand why its asking for the /home/content/t/r/i/trickpro/html/
in the old directory it only went home/html_public
thanks for the time in helping me by the way!

koyama
07-15-2007, 01:01 AM
i dont understand why its asking for the /home/content/t/r/i/trickpro/html/
in the old directory it only went home/html_public
That's because now you need to modify your includes. In include.php change this:


<?php include('/home/trickpro/public_html/stylesheet/meta.php') ?>

to this:


<?php include('/home/content/t/r/i/trickpro/html/stylesheet/meta.php') ?>

Make similar changes the 5 other places where you have includes in index.php.

Really it is better to do like this:


<?php include($_SERVER['DOCUMENT_ROOT'] . '/stylesheet/meta.php') ?>

Because that makes the site portable. You will not need to make all those corrections if you decide to move the site again.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum