Jump to content

v.6.1.0 local installation missing several elements


Recommended Posts

Hi

Have been working for several hours on making a local installation (Ubuntu 16.04.1LTS) of CC6.1.0 work fully...

CubeCart Version
6.1.0
PHP Version
7.0.12-1+deb.sury.org~xenial+1
MySQL Version
5.5.5-10.1.18-MariaDB-1~xenial
Image folder size
89.92 KB
Download folder size
0.00 KB
Max. Upload filesize
2M
Browser user-agent
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0
Server Software
Apache/2.4.18 (Ubuntu)
 
... can login to admin no problem, many facilities available eg. full dasboard, add/modify categories/products etc but MANY things are missing eg. cannot view the products, for example a call from the storefront (ie. index.php operates correctly) for the test product, gives a server 404 page...
 

Not Found

The requested URL /store/test-category/test-product.html was not found on this server.


Apache/2.4.18 (Ubuntu) Server at 127.0.1.1 Port 8088
... also eg. error log, when selected from the side of the dashboard just gives a blank page and there are many links which do only this.
 
Could anyone offer any ideas as to why I have this weird, partially operating test store ? (BTW: the bits that do work look excellent :-) )
 
thanks, RetroRocker
Link to comment
Share on other sites

If this is a localhost installation, please manually add the following to /includes/global.inc.php:

$glob['storeURL'] = 'http://127.0.0.1/store';
$glob['standard_url'] = 'http://127.0.0.1/store';
$glob['ssl_url'] = 'https://127.0.0.1/store';
$glob['cookie_domain'] = '127.0.0.1';
$glob['rootRel'] = '/store/'; // Must have trailing slash!

CC6 has an internal 404 page that is served provided that:

The .htaccess file has the directive:

## Default store 404 page
ErrorDocument 404 /store/index.php

You will also need these directives:

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /store/

The first two directives shown above may already be present.

CubeCart saves a working .htaccess file to the main CubeCart folder if one is not found there already.

Also, CubeCart's 404 page does not include the notice about what web server is being used, so the 404 you posted is not coming from CubeCart, but probably Apache. By which I am assuming there is a problem with the contents of the .htaccess file, and what overrides you have allowed in Apache's config file.

Link to comment
Share on other sites

Hi, firstly thank you for the responses, they are appreciated.

Al: mod_rewrite is enabled and the .htaccess is standard CubeCart. The generated url is SEO friendly, suitably 'slugified' :-) , so it appears that the rewrite is occuring but then the corresponding page is not displayed. This is shown in the 404 sample in the initial post which, as bsmither pointed out, is actually Apache's 404 and not CubeCart's 404 as we might have expected.

bsmither: I added to the global.inc.php the additional 'local' section you provided. The .htaccess file is CubeCart standard.

Bottom line unfortunately is that it all did not make any difference ;-(

I have tried many other things, including 'typical' localhost address ie. 127.0.0.1, different ports including everything on bog standard 127.0.0.1:80. I have php error reporting on, nothing has yet been reported. I've even substituted Apache2 with Nginx, with an appropriate location block rewrite directive... but always the same point is reached.

One glimmer, using chown and recursively changing ownership to www-data throughout CC's directory structure has given access to all facilities accessed via 'admin.php' eg. things such as the error log now work but no product pages still.

It's probably very simple but I'm really lost for further ideas. Do you have anymore ?

thanks, RR

Link to comment
Share on other sites

The URL Rewrite directives create a new querystring key/value pair:
seo_path=test-category/test-product

(assuming the RewriteBase directive works, otherwise there might be a /store/ as part of the new querystring)

If Apache was, in fact, doing any rewriting, then this key/value would appear in CC's debug area, GET section. (In admin, Store Settings, Advanced tab, enable Debug mode and enter your IP address - www.whatismyip.com -  in the adjacent field.) The debug area appears in a grey background below the regular CubeCart page.

Then you engaged Nginx with no discernible difference. I take that to mean you get Nginx's 404 page (as opposed to a CubeCart themed page with a 404 message where the Homepage content should be).

There is a way to have Apache log a diagnostic report on what decisions are being made in its URL Rewriting process. I did that once, just to see what it looked like, and it was very informative. But, later versions of Apache changed the syntax of these apache.conf config directives a bit in the latest versions, so I won't try to instruct you in how to enable the diagnostic report. I have to leave that up to you.

Again, let me stress that there should be a Allow Overrides (or something like that) in the main configuration file giving .htaccess directives permission to override the main configuration directives in order for URL Rewriting to work. (I don't know how Nginx does this.)

Link to comment
Share on other sites

Quote

 

20 hours ago, bsmither said:
Quote

Again, let me stress that there should be a Allow Overrides (or something like that) in the main configuration file giving .htaccess directives permission to override the main configuration directives in order for URL Rewriting to work. (I don't know how Nginx does this.)

Ok, it's time to put my hand up, I missed it the first time you told me and you stressed it ,as quoted, the second time ... AllowOverride !!!

In my defence, it wasn't he only issue. I had also missed an issue with recursive ownership in part the CubeCart directory structure which exacerbated the problem. Also of course I needed the additional directives for global.inc.php.  All is now fixed and working well. I genuinely appreciate the help, thank you.

By way of a small effort at redemption :-) , I am going to spend a bit of time working with Nginx / CubeCart in an attemt to get the same SEO functionality. It may have, probably has been, done before but I haven't found anything, or managed to devise anything, definitive yet. When I do, I'll post the Nginx configuration for general consumption.

all the best, RR.

 

Link to comment
Share on other sites

I have seen sites running on Nginx, and if I recall, Nginx does parse .htaccess directives having the same syntax as that for Apache -- at least the directives that CubeCart uses.

Should anyone want to use the Hiawatha web server, I have directives for that (does not use .htaccess).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...