Solved

Move php website from dedicated to shared hosted on godaddy

Posted on 2011-02-26
7
962 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
  • 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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Suggested Solutions

When converting a physical machine to a virtual machine using VMware vCenter Converter Standalone or vCenter Converter Enterprise, if an adapter type is not selected during the initial customization the resulting virtual machine may contain an IDE d…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

775 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