Solved

Move php website from dedicated to shared hosted on godaddy

Posted on 2011-02-26
7
970 Views
Last Modified: 2012-05-11
I have a working site on a dedicated hosted linux box.
www.flattentheworld.com
I copied it to a godaddy shared hosted linux box.
This is the error I get.

      Warning: require_once(/var/chroot/home/content/16/7001316/html/main.php) [function.require-once]: failed to open stream: No such file or directory in /home/content/16/7001316/html/accessioncorp/config.php on line 3

      Fatal error: require_once() [function.require]: Failed opening required '/var/chroot/home/content/16/7001316/html/main.php' (include_path='.:/usr/local/php5/lib/php') in /home/content/16/7001316/html/accessioncorp/config.php on line 3

I'm not a PHP programmer but I'm hoping to be able to move this site to the new host.
Am I even close? What can I do to make this work?


first two lines of index.php
<?php
require_once('config.php');



The config.php file
<?php
// the orginal line follows
// require_once('SystemLib/main.php');
// this is what I tried but I still get the above error.
require_once($_SERVER['DOCUMENT_ROOT']).'/main.php';

require_once('Smarty/Smarty.class.php');

define('ORDER_EMAIL_ADDRESS', 'tobyd@softdesigns.com');

define('ACS_ANY',      0);
define('ACS_USER',      128);
define('ACS_ADMIN',      255);

require_once('config_local.php');
require_once('config_pages.php');

require_once('class.User.php');

#require_once('Admin.php');
#require_once('User.php');
#require_once('Order.php');
#require_once('Home.php');

?>
0
Comment
Question by:davidpm
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 4

Expert Comment

by:florjan
ID: 34987424
Have you tried chmoding files to 755?
0
 
LVL 4

Expert Comment

by:TTauri
ID: 34987456
Does this file actually exist at this path?
/var/chroot/home/content/16/7001316/html/main.php

The config file is in a slightly different place:
/home/content/16/7001316/html/accessioncorp/config.php
0
 

Author Comment

by:davidpm
ID: 34987507
Since this is a shared godaddy host I donn't belive I can go poking around on the server.
They do say on the control panel that the absolute hosting path is: /home/content/16/7001316/html

I'm assuming that main.php exists someplace as wordpress works on this host.

The 777 thing I donn't know what to do since I am limited to the hosting path.
0
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
LVL 4

Expert Comment

by:florjan
ID: 34987553
On the hosting panel you should have fix file permissions or something simular. If you don't you can change permissions via file manager from panel or via ftp
0
 

Author Comment

by:davidpm
ID: 34988814
Donn't mean to argue as I'm the one asking for help but what makes you think it is a permission problem?
If it is a permission problem for main.php I'm not going to have access to it as it is considered a shared system file, yes?

If it was a permission problem on config.php which I can get to would it open. It seems like it is opening as it finds the line number to error on.
0
 
LVL 4

Accepted Solution

by:
florjan earned 500 total points
ID: 34988863
http://www.flattentheworld.com/main.php
This is where main.php should be right? It returns 404 which either means that it doesn't exsist or isn't word readable (or it has a redirect unless some criteria is met).
Also can you put
echo $_SERVER['DOCUMENT_ROOT'];

Open in new window

after <?php and tell the output?
0
 

Author Closing Comment

by:davidpm
ID: 34989629
Thanks for the nudge. I examined the source computer and found a directory under /user/share/includes/SystemLib with the files referenced in the include.
I copied them to an includes folder I created under accessioncorp and adjusted the include path and it works now.
0

Featured Post

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
When the s#!t hits the fan, you don’t have time to look up who’s on call, draft emails, call collaborators, or send text messages. An instant chat window is definitely the way to go, especially one like HipChat. HipChat is a true business app. An…
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…
This Micro Tutorial walks you through using a remote console to access a server and install ESXi 5.1. This example is showing remote access and installation using a Dell server. The hypervisor is the very first component of your virtual infrastructu…

635 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question