[SOLVED] The server move that went pear-shaped...

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
Deak

[SOLVED] The server move that went pear-shaped...

Post by Deak »

CMSMS version: 1.4.x
Environment: CentOS, Apache2, PHP 5.2

This is a horrible question, I can only apologise.  ;D I can't think of a succinct way to phrase it that the forum's search feature might turn up.

We're moving our site from our old host to a new one. I think the problems we've experienced are in the config.php file, specifically relating to the values given to variables like root_path, upload_path, etc (basically the ones that reference the file structure of the server).

I don't know PHP at all, but back in my VB days you could get around specifying actual paths by using a function like Server.MapPath and it'd figure it out for you. Anyway, I digress!

On our old host (for example) the root_path is:
/var/www/vhosts/ourdomain.com/httpdocs
I'm pretty sure that the file structure on the new server is different, however what I've been told by my host is that the equivelent path for root_path would be:
/home/websiteusername/public_html
I've highlighted in red part of what I think looks dubious, although I think the entire path looks too small. We have a VPS running DirectAdmin, which allows us to have multiple users and resellers. I'd definitely expect a longer path. SSH'ing as our admin user, the path from our lowest level directory is:
/var/www/vhosts/ourdomain.com/httpdocs
But all of these values result in the same errors when trying to reach the /admin screen:
Warning: opendir(/home/websiteusername/domains/ourdomain.com/public_html/admin/lang) [function.opendir]: failed to open dir: No such file or directory in /home/websiteusername/domains/ourdomain.com/public_html/admin/lang.php on line 33

Warning: readdir(): supplied argument is not a valid Directory resource in /home/websiteusername/domains/ourdomain.com/public_html/admin/lang.php on line 34

Warning: closedir(): supplied argument is not a valid Directory resource in /home/websiteusername/domains/ourdomain.com/public_html/admin/lang.php on line 39

Warning: Cannot modify header information - headers already sent by (output started at /home/websiteusername/domains/ourdomain.com/public_html/admin/lang.php:33) in /home/websiteusername/domains/ourdomain.com/public_html/admin/login.php on line 211

Warning: Cannot modify header information - headers already sent by (output started at /home/websiteusername/domains/ourdomain.com/public_html/admin/lang.php:33) in /home/websiteusername/domains/ourdomain.com/public_html/admin/login.php on line 212

Warning: include(/home/websiteusername/domains/ourdomain.com/public_html/admin/themes/default/login.php) [function.include]: failed to open stream: No such file or directory in /home/websiteusername/domains/ourdomain.com/public_html/admin/login.php on line 221

Warning: include() [function.include]: Failed opening '/home/websiteusername/domains/ourdomain.com/public_html/admin/themes/default/login.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/websiteusername/domains/ourdomain.com/public_html/admin/login.php on line 221
Apache error log says:
[Fri Jan 09 16:09:17 2009] [warn] RewriteCond: NoCase option for non-regex pattern '-f' is not supported and will be ignored.
[Fri Jan 09 16:09:17 2009] [warn] RewriteCond: NoCase option for non-regex pattern '-d' is not supported and will be ignored.
[Fri Jan 09 16:09:17 2009] [error] [client 213.208.100.91] File does not exist: /var/www/html/home, referer: http://stagingipaddress/~websiteusernam ... /login.php
[Fri Jan 09 16:09:17 2009] [error] [client 213.208.100.91] File does not exist: /var/www/html/404.shtml, referer: http://stagingipaddress/~websiteusernam ... /login.php
[Fri Jan 09 16:09:23 2009] [warn] RewriteCond: NoCase option for non-regex pattern '-f' is not supported and will be ignored.
[Fri Jan 09 16:09:23 2009] [warn] RewriteCond: NoCase option for non-regex pattern '-d' is not supported and will be ignored.
[Fri Jan 09 16:09:24 2009] [warn] RewriteCond: NoCase option for non-regex pattern '-f' is not supported and will be ignored.
[Fri Jan 09 16:09:24 2009] [warn] RewriteCond: NoCase option for non-regex pattern '-d' is not supported and will be ignored.
(FYI, it's just running off an IP address whilst we get it sorted -- will repoint the DNS later. The root_url variable is set correctly for this.)

Happy new year everyone!
Last edited by Deak on Wed Jan 14, 2009 3:17 pm, edited 1 time in total.
User avatar
neeltje57
Forum Members
Forum Members
Posts: 18
Joined: Sat Nov 08, 2008 4:44 pm
Location: Netherlands

Re: The server move that went pear-shaped...

Post by neeltje57 »

The way i see it your path is:

/home/websiteusername/domains/ourdomain.com/public_html

and not the two possibilities you gave. See also the wiki http://wiki.cmsmadesimple.org/index.php/How_to#How_to_move_your_CMSms_installation_to_a_new_server_.281.29

neeltje57
Deak

[SOLVED] Re: The server move that went pear-shaped...

Post by Deak »

You are correct about the paths, thanks for that. However, it didn't fix the problem.

To make sure I hadn't missed something, I went back to the original installation and started the whole process again. I can only assume something in my first attempt was missed because it subsequently worked! Thank goodness!
Locked

Return to “[locked] Installation, Setup and Upgrade”