Zen Cart Logo
Forums / Installing on a Linux/Unix Server / admin and ezpage links missing on move to directory

admin and ezpage links missing on move to directory

Views: 1,677

Results 1 to 12 of 12
18 Nov 2015, 3:13 PM
#1
iaing avatar

iaing

New Zenner

Join Date:
Feb 2012
Posts:
19
Plugin Contributions:
0

admin and ezpage links missing on move to directory

I am testing an install of ZC 1.5.4 on a PHP 5.4 server, the install is in a directory on a subdomain (dev.domainname.com/folder). My local copy works fine, and I have the site up and running in a the folder on the host server - but the EZ page links do not work: hovering them shows the directory name is missing from the URL, manually typing the directory name in brings up 'page not found'. Same is true for the admin login, and product category pages. All images and styles are displaying OK on home page, as are individual product pages, and Contact page (links to those work fine).

I've been over and over the two configure.php pages and just can't see what Ive got wrong?

Any suggestions appreciated.
Iain

18 Nov 2015, 3:23 PM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: admin and ezpage links missing on move to directory

Ezpages are database stored... Are the ezpages present in the admin side of the live store? Do they have the same id for what is coded to display it/them? How have they been setup to display as in are they hard coded/referenced or is it just to display all in the header/footer, etc..

18 Nov 2015, 3:23 PM
#3
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: admin and ezpage links missing on move to directory

Can you post the contents of the configure files, without the sensitive stuff?

18 Nov 2015, 4:32 PM
#4
iaing avatar

iaing

New Zenner

Join Date:
Feb 2012
Posts:
19
Plugin Contributions:
0

Re: admin and ezpage links missing on move to directory

Design75:

Can you post the contents of the configure files, without the sensitive stuff?

inc/congure.php :

  define('HTTP_SERVER', 'http://dev.domainname.co.uk');
  define('HTTPS_SERVER', 'https://dev.domainname.co.uk');

  // Use secure webserver for checkout procedure?
  define('ENABLE_SSL', 'true');

// NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
// * DIR_WS_* = Webserver directories (virtual/URL)
  // these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
  define('DIR_WS_CATALOG', '/foldername/');
  define('DIR_WS_HTTPS_CATALOG', '/foldername/');

  define('DIR_WS_IMAGES', 'images/');
  define('DIR_WS_INCLUDES', 'includes/');
  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', DIR_WS_CATALOG . 'pub/');
  define('DIR_WS_TEMPLATES', DIR_WS_INCLUDES . 'templates/');

  define('DIR_WS_PHPBB', '/');

// * DIR_FS_* = Filesystem directories (local/physical)
  //the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
  define('DIR_FS_CATALOG', '/home/user/public_html/dev/foldername/');

  //the following path is a COMPLETE path to the /logs/ folder  eg: /var/www/vhost/accountname/public_html/store/logs ... and no trailing slash
  define('DIR_FS_LOGS', '/home/user/public_html/dev/foldername/logs');

//nothing edited below here =========

admin/include/configure.php :

define('HTTP_SERVER', 'https://dev.domainname.co.uk');
 define('HTTPS_SERVER', 'https://dev.domainname.co.uk');
 define('HTTP_CATALOG_SERVER', 'http://dev.domainname.co.uk');
 define('HTTPS_CATALOG_SERVER', 'https://dev.domainname.co.uk');

// secure webserver for admin?  Valid choices are 'true' or 'false' (including quotes).
 define('ENABLE_SSL_ADMIN', 'true');

 // secure webserver for storefront?  Valid choices are 'true' or 'false' (including quotes).
 define('ENABLE_SSL_CATALOG', 'false');

 define('DIR_WS_ADMIN', preg_replace('#^' . str_replace('-', '\-', zen_parse_url(HTTP_SERVER, '/path')) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/');
 define('DIR_WS_CATALOG', '/foldername/');
 define('DIR_WS_HTTPS_ADMIN', preg_replace('#^' . str_replace('-', '\-', zen_parse_url(HTTPS_SERVER, '/path')) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/');
 define('DIR_WS_HTTPS_CATALOG', '/foldername/');

nothing in the next chunk edited.

// * DIR_FS_* = Filesystem directories (local/physical)
  define('DIR_FS_ADMIN', preg_replace('#.includes$#', '', realpath(dirname(__FILE__) . '/../') . '/'));
  //the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
  define('DIR_FS_CATALOG', '/home/user/public_html/dev/foldername/');

  //the following path is a COMPLETE path to the /logs/ folder  eg: /var/www/vhost/accountname/public_html/store/logs ... and no trailing slash
  define('DIR_FS_LOGS', '/home/user/public_html/dev/foldername/logs');

leaving out database chunk - obviously connected OK

  // The next 2 "defines" are for SQL cache support.
  // For SQL_CACHE_METHOD, you can select from:  none, database, or file
  // If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache 
  // or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder
  // ie: /path/to/your/webspace/public_html/zen/cache   -- leave no trailing slash  
  define('SQL_CACHE_METHOD', 'none'); 
  define('DIR_FS_SQL_CACHE', '/home/user/public_html/dev/cache');

I think that's all the edited bits,

thanks for looking!
Iain

18 Nov 2015, 4:37 PM
#5
iaing avatar

iaing

New Zenner

Join Date:
Feb 2012
Posts:
19
Plugin Contributions:
0

Re: admin and ezpage links missing on move to directory

sorry, this reply by mistake

18 Nov 2015, 4:41 PM
#6
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: admin and ezpage links missing on move to directory

What about .htaccess files? Do you have one at the root of the store, the subdomain, or in the directory structure above the subdomain? What are the contents? Using a uri rewriter?

18 Nov 2015, 4:45 PM
#7
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: admin and ezpage links missing on move to directory

DIR_FS_CACHE doesn't point to foldername... In one case above...

18 Nov 2015, 5:02 PM
#8
iaing avatar

iaing

New Zenner

Join Date:
Feb 2012
Posts:
19
Plugin Contributions:
0

Re: admin and ezpage links missing on move to directory

Thanks - updated that cache line, no change though. Discovered that if I type the admin address in full (including index.php) I can get into admin, and see the EZ Pages in there, those pages still won't show on the front end though. Product pages still show, but not their category pages. Does sound like a database issue.

yes there's a .htaccess file with rewrite stuff:

## BEGIN CEON URI MAPPING REWRITE RULE

RewriteEngine On

# Don't rewrite any URIs ending with a file extension (ending with .[xxxxx])
RewriteCond %{REQUEST_URI} !\.[a-z]{2,5}$ [NC]
# Don't rewrite any URIs for some, popular specific file format extensions,
#   which are not covered by main file extension condition above
RewriteCond %{REQUEST_URI} !\.(mp3|mp4|h264)$ [NC]
# Don't rewrite any URIs for some specific file format extensions,
#   which are not covered by main file extension condition above
#   Uncomment the following line to apply this condition! (Remove the # at the start of the next line)
#RewriteCond %{REQUEST_URI} !\.(3gp|3g2|h261|h263|mj2|mjp2|mp4v|mpg4|m1v|m2v|m4u|f4v|m4v|3dml)$ [NC]
# Don't rewrite admin directory
RewriteCond %{REQUEST_URI} !^/adminfolder [NC]
# Don't rewrite editors directory
RewriteCond %{REQUEST_URI} !^/editors/ [NC]
# Don't rewrite cgi-bin directory
RewriteCond %{REQUEST_URI} !^/cgi\-bin/ [NC]
# Don't rewrite feed directory
RewriteCond %{REQUEST_URI} !^/feed/ [NC]
# Don't rewrite logs directory
RewriteCond %{REQUEST_URI} !^/logs/ [NC]
# Don't rewrite ScriptLibrary directory
RewriteCond %{REQUEST_URI} !^/ScriptLibrary/ [NC]
# Don't rewrite sitemap directory
RewriteCond %{REQUEST_URI} !^/sitemap/ [NC]
# Don't rewrite tempEP directory
RewriteCond %{REQUEST_URI} !^/tempEP/ [NC]
# Handle all other URIs using Zen Cart (its index.php)
RewriteRule .* index.php [QSA,L]

## END CEON URI MAPPING REWRITE RULE
18 Nov 2015, 6:05 PM
#9
iaing avatar

iaing

New Zenner

Join Date:
Feb 2012
Posts:
19
Plugin Contributions:
0

Re: admin and ezpage links missing on move to directory

Found the problem - your last comment got me thinking on the right lines about rewrite rules - the CEON plugin that added the clean URLS at the bottom of each edit page, if I ticked auto generate URI instead of my manually added ones from before it sorts it, so applied to EZ pages and category pages,

Thanks both of you for looking!

18 Nov 2015, 6:06 PM
#10
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: admin and ezpage links missing on move to directory

In which directory(ies) is the content of the .htaccess file?

Have you tried resaving the ezpages leaving the rewritten path blank/asking it to generate a new one?

May come down to that path structure of original site is different from the current, which could explain why clicking on the link(s) goes to an unknown page.

18 Nov 2015, 6:09 PM
#11
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: admin and ezpage links missing on move to directory

Well, looks like we both posted at the same time.

For future reference, if going to use CEON URI rewriter, path from the store's server name... Ie. Use the subdomain to your advantage so that the database can be moved from one to the other location and the uris not lost...

18 Nov 2015, 6:10 PM
#12
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: admin and ezpage links missing on move to directory

Ohh, and be sure to change your admin folder name and update the .htaccess to reflect it...