I am trying to use Viart's multisite feature, the first site is say www.abcd.com and the second is www.abcd.com/folderx, in www.abcd.com, the site id was kept 1 while in www.abcd.com/folderx the site id is 2. The va_definitions as well as global settings were set accordingly. But, the strange thing is while accessing www.abcd.com/folderx, all the links are taking to www.abcd.com instead of www.abcd.com/folderx, also a message is appearing in the admin
Warning: fread(): supplied argument is not a valid stream resource in C:\Domains\abcd.com\wwwroot\admin\admin_global_settings.php on line 330
where I could have gone wrong?
majuki (Guest)
28 Mar 2009 1:09 PM
ok, could someone let me know if my va_definitions.php is correct or not?
Here it goes
// session settings
$session_prefix = "folderx";
// if you use multi-site functionality uncomment the following line and specify appropriate id
$site_id = 2;
// if you use VAT validation uncomment the following line
//$vat_validation = true;
// array of country codes for which VAT check is obligatory
//$vat_obligatory_countries = array("GB");
// array of country codes for which remote VAT check won't be run
//$vat_remote_exception_countries = array("NL");
$http_host = $_SERVER["HTTP_HOST"];
if (preg_match("/^(www\.)?abcd\.com/folderx$/i", $http_host)) {
$site_id = 2;
} else {
$site_id = 1;
TOCDCO
29 Mar 2009 5:46 AM
<?php
define("INSTALLED", true); // set to false if you want run install.php
define("DEBUG", true); // debug mode - set false on live site
You quoted the top part, I dont think there lies the problem, I quoted the bottom part of the code, where I though the problem could lie, for your convenience, I am reproducing the full code.
<?php
define("INSTALLED", true); // set to false if you want run install.php
define("DEBUG", true); // debug mode - set false on live site
// if you use multi-site functionality uncomment the following line and specify appropriate id
$site_id = 2;
// if you use VAT validation uncomment the following line
//$vat_validation = true;
// array of country codes for which VAT check is obligatory
//$vat_obligatory_countries = array("GB");
// array of country codes for which remote VAT check won't be run
//$vat_remote_exception_countries = array("NL");
$http_host = $_SERVER["HTTP_HOST"];
if (preg_match("/^(www\.)?abcd\.com/folderx$/i", $http_host)) {
$site_id = 2;
} else {
$site_id = 1;
}
?>
May be, the problem lies at if (preg_match("/^(www\.)?abcd\.com/folderx$/i", Am I writing it correctly?
TOCDCO
30 Mar 2009 4:33 AM
I don't have any of that content in my file, so I'm not sure as to why you've got that extra content?
majuki (Guest)
30 Mar 2009 6:08 AM
Well, that is because, you are probably not running multi sites, you need to specify which is the primary site and the seconday one's if you are using multisite feature.
Mediadot
31 Mar 2009 11:05 AM
Have You checked the .htaccess for Your secondary site? Have it got correct path?
majuki (Guest)
31 Mar 2009 1:54 PM
no, I did not. Do I need to specify a path in .htaccess everytime for viart installation?
TOCDCO
31 Mar 2009 2:49 PM
Yes, I am indeed running multi sites... thanks
majuki (Guest)
31 Mar 2009 8:10 PM
Hi Dan,
You are correct, in fact I added that code as the manual says so. See http://www.viart.com/shopping_cart_multisite_feature.html . However, I have been advised by Anjula that it is not required. Maybe, it is meant for previous versions.