The free forums are no longer in use. It remains available as read-only archive.
11:51 am
I think the application is excellent, but would be much better if you can move the configuration file outside the public_html folder because in this way greatly reduces the risk of data falling into the wrong hands. In the configuration file are saved password of the database and Amazon S3 keys, how I can move the configuration file at home?
You can do that with XCloner as well, simply move the cloner.config.php file to the new location, and replace the old location file code with an include to the new path. One thing that will not work anymore is the config save, but i don't think you need to deal with that once all settings are properly setup.
Ovidiu
5:43 am
Yes, that solution is very good. Thank you very much.
And friends, I like to give their facebook:
http://www.facebook......8963742631
12:37 pm
I modified xCloner to suit my needs.
I am running a live/test environment on the same domain. The live site is located in the public_html/, and the test site at public_html/test/.
Joomlas configuration.php that as an example for the live site has been moved to /randomFolderName/configuration.php that is defined in /public_html/defines.php and /public_html/administrator/defines.php as JPATH_CONFIGURATION.
What the modification does is that it does an reversed-recursive lookup of defines.php to locate where the configuration directory really is.
This essentially means that I am able to move both Joomlas configuration file and as well xcloner – with the possibility to clone sites and read/write independantly to the configuration files as long as each site has it's own randomFolderName for storing the configuration files outside of public_html.
The drawback is that there is no backup taken of the configuration files since they don't reside withing Joomlas directory.
My modifications may very well suit your own needs if you incorporate it with moving Joomlas config files.
I modified admin.cloner.php with this:
define("_VALID_MOS", 1);//load configuration/* Modification Start */// Set Joomla flag to be able to load defines.phpdefine('_JEXEC', 1); //Fake Joomla authoritydefine('DS', DIRECTORY_SEPARATOR);// Locate defines.php upwards in tree structure$xclonedir = dirname(__FILE__);$joomlaroot = $xclonedir;$defines = DS.'defines.php';//Try to locate and load defines.phpwhile(!include_once($joomlaroot.$defines)) {$joomlaroot = dirname($joomlaroot);}//Append true configurationfolder to config file$config_file = JPATH_CONFIGURATION.DS.'cloner.config.php';//Debug dumps//die(var_dump($joomlaroot));//die(var_dump($config_file));/* Modification End */require_once($config_file);
1:22 pm
Chri said:
I modified xCloner to suit my needs.
I am running a live/test environment on the same domain. The live site is located in the public_html/, and the test site at public_html/test/.
Joomlas configuration.php that as an example for the live site has been moved to /randomFolderName/configuration.php that is defined in /public_html/defines.php and /public_html/administrator/defines.php as JPATH_CONFIGURATION.
What the modification does is that it does an reversed-recursive lookup of defines.php to locate where the configuration directory really is.
This essentially means that I am able to move both Joomlas configuration file and as well xcloner – with the possibility to clone sites and read/write independantly to the configuration files as long as each site has it's own randomFolderName for storing the configuration files outside of public_html.
The drawback is that there is no backup taken of the configuration files since they don't reside withing Joomlas directory.
My modifications may very well suit your own needs if you incorporate it with moving Joomlas config files.
I modified admin.cloner.php with this:
<?phpdefine("_VALID_MOS", 1);//load configuration/* Modification Start */// Set Joomla flag to be able to load defines.phpdefine('_JEXEC', 1); //Fake Joomla authoritydefine('DS', DIRECTORY_SEPARATOR);// Locate defines.php upwards in tree structure$xclonedir = dirname(__FILE__);$joomlaroot = $xclonedir;$defines = DS.'defines.php';//Try to locate and load defines.phpwhile(!include_once($joomlaroot.$defines)) {$joomlaroot = dirname($joomlaroot);}//Append true configurationfolder to config file$config_file = JPATH_CONFIGURATION.DS.'cloner.config.php';//Debug dumps//die(var_dump($joomlaroot));//die(var_dump($config_file));/* Modification End */require_once($config_file);
Spoke to soon.
Didn't realize XCloner has hardcoded to import the config in more places.
The correct solution therefore is:
Move your configfile to the same directory as Joomlas configuration file.
Create a new file were cloner.config.php was and put this code in WITH OPENING PHP TAG (can't get code formatting to work on this forum, moderator may edit):
/* Modification Start */
// Set Joomla flag to be able to load defines.php
define('_JEXEC', 1); //Fake Joomla authority
define('DS', DIRECTORY_SEPARATOR);// Locate defines.php upwards in tree structure
$xclonedir = dirname(__FILE__);
$joomlaroot = $xclonedir;
$defines = DS.'defines.php';
//Try to locate and load defines.php
while(!include_once($joomlaroot.$defines)) {
$joomlaroot = dirname($joomlaroot);
}
//Append true configurationfolder to config file
$config_file = JPATH_CONFIGURATION.DS.'cloner.config.php';
//Debug dumps
//die(var_dump($joomlaroot));
//die(var_dump($config_file));
/* Modification End */
require_once($config_file);
8:40 am
February 18, 2013
@Chri - Thanks for providing this solution. Can you please clarify the following
- You said to copy the code "WITH OPENING PHP TAG". Does that mean copy within the <?php... >tag.
- After copying this code, do we save the new file as cloner.config.php? So technically replacing the default cloner.config.pgh file which has now been relocated to the new location outside of the Joomla root?
Thanks
2:34 pm
Omo said:
@Chri - Thanks for providing this solution. Can you please clarify the following
- You said to copy the code "WITH OPENING PHP TAG". Does that mean copy within the <?php... >tag.
- After copying this code, do we save the new file as cloner.config.php? So technically replacing the default cloner.config.pgh file which has now been relocated to the new location outside of the Joomla root?
Thanks
Omo,
To be perfectly honest I can't remember how I solved it.
1. Yes - add "<?php" in the beginning of the PHP-file.
(skip the ending of PHP-tag, it can only cause problems)
2.
I think my solution was to do the following:
Move default configuration file.
Create a new configuration file with the same name as the default, but put in the code above.
What happens is that XCloner loads the file as it normally would - but that now contains the modified code, which then in turns searches for the TRUE configfile through recursive lookup and includes it through the require statement.
1 Guest(s)