Forums / General Questions / ZenCart can't figure out forum location.

ZenCart can't figure out forum location.

Locked

Views: 1,999

Results 1 to 15 of 15
This thread is locked. New replies are disabled.
25 Feb 2007, 9:24 PM
#1
feratechinc avatar

feratechinc

New Zenner

Join Date:
Feb 2007
Posts:
27
Plugin Contributions:
0

ZenCart can't figure out forum location.

So I set up to install ZenCart with phpBB forums. I set the install path correctly. I know because it's on my own server. However, the forum link takes me to "<site root>/store//forum/index.php" which needless to say doesn't exist.

my forums are in:
"<site root>/forum/index.php"

I need to know how to change this and what could be cause this error.

Any immediate help would be GREATLY appreciated.

I went through the admin panel and these settings are nowhere to be found. This seems very counter intuitive since even phpBB has the ability to change all location directories. Obviously ZenCart directory recognition is not perfect and it would be nice to be able to manually change it's mistakes.

25 Feb 2007, 9:38 PM
#2
feratechinc avatar

feratechinc

New Zenner

Join Date:
Feb 2007
Posts:
27
Plugin Contributions:
0

Re: ZenCart can't figure out forum location.

I checked the config files. This is where the zencart files are:
/var/www/web1/web/store/

Here is where my forum files are:
/var/www/web1/web/forum/

Yet zencart decided my forum is /var/www/web1/web/store//forum/index.php

I need help plz...

25 Feb 2007, 9:40 PM
#3
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: ZenCart can't figure out forum location.

I wouldn't be quite so quick to blame Zen Cart for this. It simply takes the information that you give it during installation and puts it in the configure.php file for the catalog.

I recommend taking a look in your includes/configure.php and in particular at the define statement for DIR_WS_PHPBB to ensure that it is appropriately formed.

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

25 Feb 2007, 11:02 PM
#4
feratechinc avatar

feratechinc

New Zenner

Join Date:
Feb 2007
Posts:
27
Plugin Contributions:
0

Re: ZenCart can't figure out forum location.

As I have said in my second post. That is the exact directory in my config file.
/var/www/web1/web/forum/
This is the directory it should be for it is the exact path of the forums.

25 Feb 2007, 11:09 PM
#5
feratechinc avatar

feratechinc

New Zenner

Join Date:
Feb 2007
Posts:
27
Plugin Contributions:
0

Re: ZenCart can't figure out forum location.

This does look like a zencart problem.

For some reason it keeps adding "<root site>/store/" before the forums folder. It seems like it's adding it from some preset site root. I placed the entire site in a folder /store I am thinking zencart wants to be placed as root?

25 Feb 2007, 11:15 PM
#6
feratechinc avatar

feratechinc

New Zenner

Join Date:
Feb 2007
Posts:
27
Plugin Contributions:
0

Re: ZenCart can't figure out forum location.

WOW... ok

so I tried changing the directory to /var/www/web1/web/../forum/index.php to make try to redirect from /shop/ but the forum link disappears. So ZenCart detects it is the incorrect folder and doesn't display the forum link but incorrectly handles the actual link...

Wow, this is rediculous. Is there any way to directly change the ZenCart generated forum link?

25 Feb 2007, 11:33 PM
#7
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: ZenCart can't figure out forum location.

What values do you have defined for HTTP_SERVER, DIR_WS_CATALOG and DIR_FS_CATALOG?

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

25 Feb 2007, 11:56 PM
#8
feratechinc avatar

feratechinc

New Zenner

Join Date:
Feb 2007
Posts:
27
Plugin Contributions:
0

Re: ZenCart can't figure out forum location.

'HTTP_SERVER', 'http://www.mywebsite.com'
'DIR_WS_CATALOG', '/store/'
'DIR_FS_CATALOG', '/var/www/web1/web/store/'

26 Feb 2007, 12:42 AM
#9
feratechinc avatar

feratechinc

New Zenner

Join Date:
Feb 2007
Posts:
27
Plugin Contributions:
0

Re: ZenCart can't figure out forum location.

If I remove /store/ from:
'DIR_WS_CATALOG', '/store/'

The forums link works fine. However, it is the ONLY thing that works fine. The text on the site appears no images or css is applied.

This makes no sense, why would you code to inject the ZenCart directory into where the forums are located?

26 Feb 2007, 2:19 AM
#10
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: ZenCart can't figure out forum location.

OK. I have replicated your problem and then fixed it on the site where I replicated it. You're right Zen Cart is a bit screwy in this area. It looks to me as though some problems have crept in when a Zen Cart is placed in a sub directory, and the forum is outside of the cart's directory structure.

Here's a quick hack to get around it ...

  1. In your includes/configure.php file, make sure that your DIR_WS_PHPBB constant is set as follows: > define('DIR_WS_PHPBB', '/var/www/web1/web/forum/');

  2. In the same file, create a new define as follows: > define('DIR_WS2_PHPBB', '/forum/');

  3. If you don't already have one, create a new includes/modules/sideboxes/YOUR_TEMPLATE/ directory and copy includes/modules/sideboxes/information.php into it. Open the file and replace the line starting $information[] with > $information[] = '<a href="' . HTTP_SERVER . DIR_WS2_PHPBB . FILENAME_BB_INDEX . '" target="_blank">' . BOX_BBINDEX . '</a>';

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

26 Feb 2007, 2:40 AM
#11
feratechinc avatar

feratechinc

New Zenner

Join Date:
Feb 2007
Posts:
27
Plugin Contributions:
0

Re: ZenCart can't figure out forum location.

I figured it out. This is a ZenCart problem. The problem will only arise if you have ZenCart installed as a subdirectory, for example:

https://www.mywebsite.com/ZenCart/

The script tries to look for the forums in the ZenCart directory. In order to get around this. You need to do the following.

Edit your /includes/configure.php and change the following:

('DIR_WS_PHPBB', '../<your forum directory>/')
You need to add the "../" instead of your root directory.

That's it. I'm hoping this gets changed in future releases. But just in case I posted this for anybody with future problems.

26 Feb 2007, 2:54 AM
#12
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: ZenCart can't figure out forum location.

You're mostly right. The script does look for the forum in the right place and only when it finds it and all the important components (such as the forum config files) will it display a link. The problem is that it then messes up constructing the link by calling a routine that build links relative to the store root.

There are some problems with using relative links in Zen Cart's config file - they're not universally respected, but in this case the constant is used in a very limited way and you get away with it, making your fix better than mine :lamo: Nice work.

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

26 Feb 2007, 3:06 AM
#13
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
4

Re: ZenCart can't figure out forum location.

did they ever close the holes in phpbb security?
I know at one time in the not so distant past, it was an open door for injections

Zen cart PCI compliant Hosting

26 Feb 2007, 10:34 AM
#14
feratechinc avatar

feratechinc

New Zenner

Join Date:
Feb 2007
Posts:
27
Plugin Contributions:
0

Re: ZenCart can't figure out forum location.

I believe the security holes have been fixed. However, do not take my word for it.

As for the forum link thanks for the help kuroi.

Where can I request or post this as a bug and have it possibly fixed for future releases?

26 Feb 2007, 10:57 AM
#15
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: ZenCart can't figure out forum location.

FeraTechInc:

Where can I request or post this as a bug and have it possibly fixed for future releases?Already done

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)