PDA

View Full Version : [Configuration] Moved my catalog, now admin is broken



tcshadow
08-24-2011, 05:22 PM
I moved my catalog from one domain to a folder in another and now my admin is doing funny things. Some options work, others kick me back to the login screen. Did I break something or is this a bug?

Using 2.5RC1

michael_s
08-24-2011, 06:27 PM
You broke something.

tcshadow
08-24-2011, 06:44 PM
What should the configure.php(both normal and admin) file look like for a site in a subfolder? ie www.domain.com/subfolder

Also it looks like I'm getting session id's ?osCAdminID=1dfca62a28c2ff5429d14b1eeca08646

michael_s
08-24-2011, 06:57 PM
It would be easier to find the problem if you posted your configure.php files with the database information removed.

tcshadow
08-24-2011, 07:24 PM
So then


define('HTTP_SERVER', 'www.mydomain.com/devsite');
define('HTTPS_SERVER', 'www.mydomain.com/devsite');
define('ENABLE_SSL', false);
define('HTTP_COOKIE_DOMAIN', 'www.mydomain.com/devsite');
define('HTTPS_COOKIE_DOMAIN', 'www.mydomain.com/devsite');
define('HTTP_COOKIE_PATH', '/');
define('HTTPS_COOKIE_PATH', '/');
define('DIR_WS_HTTP_CATALOG', '/');
define('DIR_WS_HTTPS_CATALOG', '/');
define('DIR_WS_IMAGES', 'images/');
define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
define('DIR_WS_INCLUDES', 'includes/');
define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');


define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
define('DIR_FS_CATALOG', '/home/thecartr/public_html/devsite/');
define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');


// define our database connection

?>
define('HTTP_SERVER', 'www.mydomain.com/devsite');
define('HTTP_CATALOG_SERVER', 'www.mydomain.com/devsite');
define('HTTPS_CATALOG_SERVER', 'www.mydomain.com/devsite');
define('ENABLE_SSL_CATALOG', 'false');
define('DIR_FS_DOCUMENT_ROOT', '/home/thecartr/public_html/devsite/');
define('DIR_WS_ADMIN', '/admin/');
define('DIR_FS_ADMIN', '/home/thecartr/public_html/devsite/admin/');
define('DIR_WS_CATALOG', '/');
define('DIR_FS_CATALOG', '/home/thecartr/public_html/devsite/');
define('DIR_WS_IMAGES', 'images/');
define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');
define('DIR_WS_INCLUDES', 'includes/');
define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/');
define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');
define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');
define('DIR_FCKEDITOR', DIR_FS_CATALOG . 'FCKeditor/');
define('DIR_WS_FCKEDITOR', DIR_WS_CATALOG . 'FCKeditor/');

tcshadow
08-24-2011, 07:41 PM
My coder was able to find a workaround

admin/includes/functions/html_output.php Added


if (strpos($page, "?"))
$link = $link . $page . '&' . SID;
else

to
if ($parameters == '') {
if (strpos($page, "?"))
$link = $link . $page . '&' . SID;
else
$link = $link . $page . '?' . SID;
} else {
$link = $link . $page . '?' . $parameters . '&' . SID;
}

michael_s
08-24-2011, 10:05 PM
So then


define('HTTP_SERVER', 'www.mydomain.com/devsite');
define('HTTPS_SERVER', 'www.mydomain.com/devsite');
define('ENABLE_SSL', false);
define('HTTP_COOKIE_DOMAIN', 'www.mydomain.com/devsite');
define('HTTPS_COOKIE_DOMAIN', 'www.mydomain.com/devsite');
define('HTTP_COOKIE_PATH', '/');
define('HTTPS_COOKIE_PATH', '/');
define('DIR_WS_HTTP_CATALOG', '/');
define('DIR_WS_HTTPS_CATALOG', '/');
define('DIR_WS_IMAGES', 'images/');
define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
define('DIR_WS_INCLUDES', 'includes/');
define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');


define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
define('DIR_FS_CATALOG', '/home/thecartr/public_html/devsite/');
define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');


// define our database connection

?>
define('HTTP_SERVER', 'www.mydomain.com/devsite');
define('HTTP_CATALOG_SERVER', 'www.mydomain.com/devsite');
define('HTTPS_CATALOG_SERVER', 'www.mydomain.com/devsite');
define('ENABLE_SSL_CATALOG', 'false');
define('DIR_FS_DOCUMENT_ROOT', '/home/thecartr/public_html/devsite/');
define('DIR_WS_ADMIN', '/admin/');
define('DIR_FS_ADMIN', '/home/thecartr/public_html/devsite/admin/');
define('DIR_WS_CATALOG', '/');
define('DIR_FS_CATALOG', '/home/thecartr/public_html/devsite/');
define('DIR_WS_IMAGES', 'images/');
define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');
define('DIR_WS_INCLUDES', 'includes/');
define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/');
define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');
define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');
define('DIR_FCKEDITOR', DIR_FS_CATALOG . 'FCKeditor/');
define('DIR_WS_FCKEDITOR', DIR_WS_CATALOG . 'FCKeditor/');




My coder was able to find a workaround

admin/includes/functions/html_output.php Added


if (strpos($page, "?"))
$link = $link . $page . '&' . SID;
else

to
if ($parameters == '') {
if (strpos($page, "?"))
$link = $link . $page . '&' . SID;
else
$link = $link . $page . '?' . SID;
} else {
$link = $link . $page . '?' . $parameters . '&' . SID;
}

Your configure.php files are wrong.

Your HTTP_SERVER and HTTPS_SERVER constants are incorrect, as are your HTTP_COOKIE_DOMAIN and HTTPS_COOKIE_DOMAIN, both COOKIE_PATH , and DIR_WS_HTTP_CATALOG settings.

The HTTP_SERVER should have the http:// in the url like this:


define('HTTP_SERVER', 'http://www.mydomain.com/devsite');

and the COOKIE_DOMAIN constants should not contain anything but the host name (No paths!). Like this:


define('HTTP_COOKIE_DOMAIN', '.mydomain.com');

The COOKIE_PATH should be your "/devsite" path.

Your DIR_WS_HTTP_CATALOG should also be "/devsite"

You somehow managed to get pretty much every setting wrong. If you get them right, there is no need to edit code elsewhere.

tcshadow
08-24-2011, 10:10 PM
it's interesting that i managed to get everything wrong, since I literally copied the files over and only changed anything olddomain.com/ to newdomain.com/devsite/

Everything in the original configure.php files was set up by the installer script and I only changed the database settings.

Good to know how it's supposed to be set though.