How to modify the root install directory ???

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
eric
Forum Members
Forum Members
Posts: 10
Joined: Wed Oct 08, 2008 11:47 am

How to modify the root install directory ???

Post by eric »

I have a problem to change the configuration of my CMSMS install.
I first installed it in a directory named "cms". I created my website, very nice, but now I would want to change the directory name of the installation, from "cms", to "fr".
So I empty the cache in "global parameters", then change the name of the directory, then change the config.php lines Path settings in order to point to the right directories.
However, this does not work : instead, I have the following errors  ??? :

Warning: require_once(/home/www/vhosts/le-valombre.fr/httpdocs/cms/fileloc.php) [function.require-once]: failed to open stream: No such file or directory in /home/www/vhosts/le-valombre.fr/httpdocs/cms/index.php on line 23

Fatal error: require_once() [function.require]: Failed opening required '/home/www/vhosts/le-valombre.fr/httpdocs/cms/fileloc.php' (include_path='.:.:/usr/share/php') in /home/www/vhosts/le-valombre.fr/httpdocs/cms/index.php on line 23

It seems it is still searching for a cms directory , but I changed all the directories in the config.php in the Path Settings part ! What's happening ? It should be possible to change the root directory or what ?
alby

Re: How to modify the root install directory ???

Post by alby »

eric wrote: It seems it is still searching for a cms directory , but I changed all the directories in the config.php in the Path Settings part ! What's happening ? It should be possible to change the root directory or what ?
Are you sure that you have changed ALL paths and urls?
My advice is run again install/index.php, install but in step 5 UNCHECK write tables and samples in DB
This rewrite a  correct config.php

Alby
eric
Forum Members
Forum Members
Posts: 10
Joined: Wed Oct 08, 2008 11:47 am

Re: How to modify the root install directory ???

Post by eric »

I changed that part :
#-------------
#Path Settings
#-------------

#Document root as seen from the webserver.  No slash at the end
#If page is requested with https use https as root url
#e.g. http://blah.com
$config['root_url'] = 'http://le-valombre.fr/cms';         <-- changed
if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on')
{
$config['root_url'] = str_replace('http','https',$config['root_url']);
}

#Path to document root. This should be the directory this file is in.
#e.g. /var/www/localhost
$config['root_path'] = '/home/www/vhosts/le-valombre.fr/httpdocs/cms';   <-- changed

#Name of the admin directory
$config['admin_dir'] = 'admin';

#Where do previews get stored temporarily?  It defaults to tmp/cache.
$config['previews_path'] = '/home/www/vhosts/le-valombre.fr/httpdocs/cms/tmp/cache';  <-- changed

#Where are uploaded files put?  This defaults to uploads.
$config['uploads_path'] = '/home/www/vhosts/le-valombre.fr/httpdocs/cms/uploads';  <-- changed

#Where is the url to this uploads directory?
$config['uploads_url'] = $config['root_url'] . '/uploads';


Is it necessary to free up the cahce directory "manually" ? There are files in it (contentcache.php, csshash.dat and index.html), and also the templates_c directory ?

About the install procedure to redo, is it really safe for the DB if I uncheck write tables and samples in DB ? If I have to do that I will do a backup  :-\ ...
alby

Re: How to modify the root install directory ???

Post by alby »

eric wrote: I changed that part :
I have five items ...

eric wrote: About the install procedure to redo, is it really safe for the DB if I uncheck write tables and samples in DB ? If I have to do that I will do a backup  :-\ ...
Yes is real safe for DB if you UNCHECK writing but my advice is ALWAYS BACKUP

Alby
eric
Forum Members
Forum Members
Posts: 10
Joined: Wed Oct 08, 2008 11:47 am

Re: How to modify the root install directory ???

Post by eric »

Thank you for your help. Hem, what is your fifth item  ::) ?
Locked

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