-
☆ A M B ☆
- 24,524 Posts
The ubiquitous car analogy does fit MODX rather well
haha. well im 99% ona 400hp 350 vortec swap. bust knuckles and greasy arms. havet had a chance to revoew modx but will def have a look monday. yikes yeah - cars can be a pita, but the rewards far out weight that of a running server most of the time :p
I have a modx site online im trying to get to run locally.
I have copied all the dir contents across and changed the config files - the site is loading but its just text - no css or anything.
Im trying to get this to run locally so I can make some changes / fixes and put it back onto the live server.
Do I need the folders next to docs or can I just ignore those and drop everything inside docs into the www root? (im not doing that now - im just curious)
Any ideas? I have cleared the cache, updated the config files and db names, and altered the htaccess files to reflect the localhost.com instead of the live domain - Also imported the sql file into the local db..
Server is linux, im on xampp / windows.
Thanks
Hi fstarocka,
I was struggling with something similar yesterday. If you look at the generated html, check the value of <base href="[[++site_url]]" /> plus the location of any css, js. Most likely when you click on them it shows a page not found because the base URL is not correct. This is changed in core/config/config.inc.php file. There are also other settings to change as well.
Another problem I've heard of is add-ins that block the rendering of a page. If the above doesn't work, try another browser and/or disable browser add-ins.
Regards,
Tom
yeah im checking that issue as well.i just feel stupid co im going in circles, with all these options i could be sitting here all day again. rally been trying to get this done - 3rd day already. bloody heck it confusing. No indication or examples in the code, its a bloody hack job.
Can u tell me which paths must be absolute (file system: ie D:/xampp)
Obviously if u set the
webserver path (in my case /kypol-new/) which ones are then relative to that, or localhost - its messy man.
can u send me your 3 files so i can have a look perhaps?
config.core.php:
define('MODX_CORE_PATH', 'D:/xampp/htdocs/kypol-new/docs/core/');
define('MODX_CONFIG_KEY', 'config');
config.inc.php: - not ive deleted sections not related to paths
<?php
$pathfix='/kypol-new/';
$site_id = 'modx532759ccbac7d2.55337967';
$site_sessionname = 'SN52f90d6b8b797';
$https_port = '443';
$uuid = 'bcc70994-0780-4acb-b0e6-0d406297703d';
if (!defined('MODX_CORE_PATH')) {
$modx_core_path= $pathfix.'docs/core/';
define('MODX_CORE_PATH', $modx_core_path);
}
if (!defined('MODX_PROCESSORS_PATH')) {
$modx_processors_path= $pathfix.'docs/core/model/modx/processors/';
define('MODX_PROCESSORS_PATH', $modx_processors_path);
}
if (!defined('MODX_CONNECTORS_PATH')) {
$modx_connectors_path= $pathfix.'docs/connectors/';
$modx_connectors_url= '/connectors/';
define('MODX_CONNECTORS_PATH', $modx_connectors_path);
define('MODX_CONNECTORS_URL', $modx_connectors_url);
}
if (!defined('MODX_MANAGER_PATH')) {
$modx_manager_path= $pathfix.'docs/manager/';
$modx_manager_url= '/manager/';
define('MODX_MANAGER_PATH', $modx_manager_path);
define('MODX_MANAGER_URL', $modx_manager_url);
}
if (!defined('MODX_BASE_PATH')) {
#$modx_base_url= '/';
$modx_base_url= $pathfix.'docs/';
$modx_base_path= $pathfix.'docs/';
define('MODX_BASE_PATH', $modx_base_path);
define('MODX_BASE_URL', $modx_base_url);
}
if (!defined('MODX_HTTP_HOST')) {
if(defined('PHP_SAPI') && (PHP_SAPI == "cli" || PHP_SAPI == "embed")) {
$http_host='localhost';
define('MODX_HTTP_HOST', $http_host);
} else {
$http_host= $_SERVER['HTTP_HOST'];
if ($_SERVER['SERVER_PORT'] != 80) {
$http_host= str_replace(':' . $_SERVER['SERVER_PORT'], '', $http_host); // remove port from HTTP_HOST
}
$http_host .= ($_SERVER['SERVER_PORT'] == 80 || $isSecureRequest) ? '' : ':' . $_SERVER['SERVER_PORT'];
define('MODX_HTTP_HOST', $http_host);
}
}
if (!defined('MODX_ASSETS_PATH')) {
$modx_assets_path= $pathfix.'docs/assets/';
$modx_assets_url= '/assets/';
define('MODX_ASSETS_PATH', $modx_assets_path);
define('MODX_ASSETS_URL', $modx_assets_url);
}
im also noticing a / in front of all my source paths.. trying to find where this is coming from.. tx fr the ehads up - will let u know when ive got this working.
Hi fstafocka,
I'm still looking at my own local situation, but I could send you my files.
I just realized that it might be even easier (and more appropriate) to compare your local versus server version to make sure you didn't accidentally get rid of a forward slah.
In addition, check your system settings to make sure there isn't something you're assuming in place. For example, if you've enabled friendly urls on the site, make sure your settings in system settings reflect that as well, and you've got the appropriate ht.access files in place.
Regards,
Tom
dont know whats happening with this site but it keeps reposting my original text. man not going well here.
so for the 3rd time writing this, ive renamed the htacess. i seem to be getting a kypol-new folder inside docs, indicating a doubling up of paths somewhere.
Also, i disabled caching in the db but the cache folder still makes directories. ANd also - do i need the cgi, conf, etc directories next to docs for the site to run properly or can it run with all the contents inside docs inside the actual web folder?
Hi fstarocka,
I had a problem just now posting as well.
Your files are only 1 part of the equation. The database has to match as well. Make sure that your database matches and that your admin has full rights to the database.
Also take a look at all error logs during installation and those since, including the error logs.
Regards,
Tom