Solved

Move php website from dedicated to shared hosted on godaddy

Posted on 2011-02-26
7
967 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…

738 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