Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Move php website from dedicated to shared hosted on godaddy

Posted on 2011-02-26
7
Medium Priority
?
978 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
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 
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 2000 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

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

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

Originally, this post was published on Monitis Blog, you can check it here . It goes without saying that technology has transformed society and the very nature of how we live, work, and communicate in ways that would’ve been incomprehensible 5 ye…
August and September have been big months for VMware—from VMworld last month to our new Course of the Month in VMware Professional - Data Center Virtualization. We reached out to Andrew Hancock, resident VMware vExpert, to have a more in-depth discu…
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.
Suggested Courses

876 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