-
154 fresh install template css not loading
I tried to do a fresh install of zencart 154.
First, I tried installing zencart with softaculous, then I also tried manually installing it, but both times I got the same result. All the content is there (demo content, pages, products…), admin panel works fine, but there’s no css/template visible on the front-end. Front-end looks white and unformatted, not loading the classic default template.
- I installed a new free template, and select it from the admin panel but it made no difference.
- I cleaned the cache in the browser
- I opened the site with different browsers, but had the same frustrating result, no css/template in the front-end.
- I researched the net and found some possible fixes, such as renaming include/.htaccess and admin/include/.htaccess to htaccess_OFF.
I tried these solutions, but it made no difference.
The site is on a VPS with linux, php 5.4.42.
On the same server I run several other scripts with no problems (magento, wordpress, joomla) there are no shortage of resources or memory limits and indeed I got running another zencart (still in version 1.5.1).
Any help would be much appreciated.
-
Re: 154 fresh install template not loading
What happens when you View Source of the page, find the stylesheet, and try to load that directly in your browser?
What's the URL where we can see this in action?
-
Re: 154 fresh install template not loading
I get this message:
Secure Connection Failed
An error occurred during a connection to "mysite".org. SSL received a record that exceeded the maximum permissible length. (Error code: ssl_error_rx_record_too_long)
The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
Please contact the web site owners to inform them of this problem.
-
Re: 154 fresh install template not loading
Actually...
if i copy the link includes/templates/classic/css/stylesheet.css (as in the source code) and put it after "mydomain" it load the stylesheet in the browser..
as to say "mydomain".org/includes/templates/classic/css/stylesheet.css do load the stylesheet in the browser
if I insted just click on the link in source code it will go to the error message as described above
-
Re: 154 fresh install template not loading
What is the link to where it is possible to see what is being generated on the page so that perhaps the appropriate settings could be advised?
-
Re: 154 fresh install template not loading
the site is:
globalnetservices.org
by the way, having had a look at what DrByte wrote, i noticed that in the source code of the homepage there is a
<base href="https://globalnetservices.org which should be instead http://
in the config.php ssl is set to "false", so I don't see why base href=https.. this might be what generate the error...
-
Re: 154 fresh install template not loading
What is in your configure.php file for these 2 lines
Code:
define('HTTP_SERVER', 'http://www.your_domain.com');
define('HTTPS_SERVER', 'https://www.your_domain.com');
-
Re: 154 fresh install template not loading
Quote:
Originally Posted by
kobra
What is in your configure.php file for these 2 lines
Code:
define('HTTP_SERVER', 'http://www.your_domain.com');
define('HTTPS_SERVER', 'https://www.your_domain.com');
in catalog/include:
define('HTTP_SERVER', 'http://globalnetservices.org');
define('HTTPS_SERVER', 'https://globalnetservices.org');
in admin/include:
define('HTTP_SERVER', 'http://globalnetservices.org');
define('HTTPS_SERVER', 'https://globalnetservices.org');
define('HTTP_CATALOG_SERVER', 'http://globalnetservices.org');
define('HTTPS_CATALOG_SERVER', 'https://globalnetservices.org');
and
define('ENABLE_SSL', 'false');
define('ENABLE_SSL_ADMIN', 'false');
-
Re: 154 fresh install template not loading
Is this posted from a local copy or a fresh copy from your server?
Also, do you have a htaccess file at the root of your install?
-
Re: 154 fresh install template not loading
just to make it easier, I post the whole configure.php (from catalog/include) just downloaded from the server.
<?php
/**
* @package Configuration Settings circa 1.5.4
* @copyright Copyright 2003-2014 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* File Built by zc_install on 2015-09-19 00:17:35
*/
/*************** NOTE: This file is similar, but DIFFERENT from the "admin" version of configure.php. ***********/
/*************** The 2 files should be kept separate and not used to overwrite each other. ***********/
// Define the webserver and path parameters
// HTTP_SERVER is your Main webserver: eg-http://www.your_domain.com
// HTTPS_SERVER is your Secure webserver: eg-https://www.your_domain.com
define('HTTP_SERVER', 'http://globalnetservices.org');
define('HTTPS_SERVER', 'https://globalnetservices.org');
// Use secure webserver for checkout procedure?
define('ENABLE_SSL', 'false');
// 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', '/');
define('DIR_WS_HTTPS_CATALOG', '/');
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/xxxxxxxxx/public_html/');
//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/xxxxxxxxx/public_html/logs');
define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
define('DIR_WS_UPLOADS', DIR_WS_IMAGES . 'uploads/');
define('DIR_FS_UPLOADS', DIR_FS_CATALOG . DIR_WS_UPLOADS);
define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');
// define our database connection
define('DB_TYPE', 'mysql');
define('DB_PREFIX', 'zen_');
define('DB_CHARSET', 'utf8');
define('DB_SERVER', 'localhost');
define('DB_SERVER_USERNAME', 'xxxxxxxxx');
define('DB_SERVER_PASSWORD', 'xxxxxxxxx');
define('DB_DATABASE', 'xxxxxxxxx');
// 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/xxxxxxxxx/public_html/cache');
// EOF
-
Re: 154 fresh install template not loading
Your thought about the base ref being https is spot on
Now just to find where it is picking this up from
-
Re: 154 fresh install template not loading
there is no .htaccess file in the root of the server.
there are .htaccess files in both catalog/include and admin/include, but none in the root.
-
Re: 154 fresh install template not loading
Check your hosting account control panel for any redirect or such
This has to be generated from somewhere
-
Re: 154 fresh install template not loading
-
Re: 154 fresh install template not loading
I don't see any redirect from the account control panel (cPanel). I could send you privately the access to that individual cPanel, in case there is something I overlooked.
-
Re: 154 fresh install template not loading
I just downloaded a copy of zen151 and did a manual install, and it works beautifully. no problems whatsoever. same domain, same server. (it's there now..)
Just half an hour before, I did an extra manual install (just in case..) with zen154 and had same problem, not loading css, base href=https!
now with the zen151 I get in the source code of homepage base href=http, and everything is smooth.
crazy stuff. zen154 must be handling something in a different way comparing to zen151.
-
Re: 154 fresh install template not loading
I'm going to try now to do a manual install with zen 153 to see if it works, in order to try to pinpoint the problem.
-
Re: 154 fresh install template not loading
Nope!
zen153 it's the same as zen 154.
in the source code i get base href=https and css not loading.
so whatever is causing my problem it's something that has changed from zen151 to zen153
-
Re: 154 fresh install template not loading
Quote:
so whatever is causing my problem it's something that has changed from zen151 to zen153
Having many installs of 1.5.4 myself and the community in general without this issue I doubt that it is primarily a ZenCart issue
Who is your host
-
Re: 154 fresh install template not loading
Zencart it's fine. I just need to understand why up to the 1.5.1 zen it's working fine, and from 1.5.3 onwards it's not working on my server.
Probably has to do with Apache configuration.
So I just need to read better into the requirements for zen154, which I'm having a look at the moment.
As said before, any suggestion will be much appreciated as I haven't found the solution yet.
-
Re: 154 fresh install template not loading
Ealrier. Said trying to do a manual install... How does that differ from say the process posted at: http://www.zen-cart.com/entry.php?3-...d-of-upgrading ?
When installing ZC 1.5.3, was installed into a new directory or in some way did it overwrite some previous version/attempt?
What PHP version(s) were used through all of this? Did it change from one install to another?
-
Re: 154 fresh install template not loading
The above were all fresh installs, (deleted file and database, a re-loaded everything) as the above is a test domain.
My real interest on that server is another zen, a live site, stuck at version 1.5.1 which I cannot upgrade to the zen154 for exactly the same reasons described above: after the update to the zen 154 I get the page with no css and the base href=https, just as when I do a fresh install.
The test fresh install above it's a way to test the system. If I can get a fresh install working correctly I'll probably succeed with the upgrade too.
I didn't change the php version, still the 5.4.42
-
Re: 154 fresh install template not loading
-
Re: 154 fresh install template not loading
I do build my own servers. This particular box has been going on for a good couple of years.
-
Re: 154 fresh install template not loading
The $request_type (SSL vs. NONSSL) is set in /includes/init_includes/init_file_db_names.php based on values discovered in the $_SERVER variables, as follows:
Code:
/**
* set the type of request (secure or not)
*/
$request_type = (((isset($_SERVER['HTTPS']) && (strtolower($_SERVER['HTTPS']) == 'on' || $_SERVER['HTTPS'] == '1'))) ||
(isset($_SERVER['HTTP_X_FORWARDED_BY']) && strpos(strtoupper($_SERVER['HTTP_X_FORWARDED_BY']), 'SSL') !== false) ||
(isset($_SERVER['HTTP_X_FORWARDED_HOST']) && (strpos(strtoupper($_SERVER['HTTP_X_FORWARDED_HOST']), 'SSL') !== false || strpos(strtolower($_SERVER['HTTP_X_FORWARDED_HOST']), str_replace('https://', '', HTTPS_SERVER)) !== false)) ||
(isset($_SERVER['HTTP_X_FORWARDED_SERVER']) && strpos(strtolower($_SERVER['HTTP_X_FORWARDED_SERVER']), str_replace('https://', '', HTTPS_SERVER)) !== false) ||
(isset($_SERVER['SCRIPT_URI']) && strtolower(substr($_SERVER['SCRIPT_URI'], 0, 6)) == 'https:') ||
(isset($_SERVER['HTTP_X_FORWARDED_SSL']) && ($_SERVER['HTTP_X_FORWARDED_SSL'] == '1' || strtolower($_SERVER['HTTP_X_FORWARDED_SSL']) == 'on')) ||
(isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && (strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) == 'ssl' || strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) == 'https')) ||
(isset($_SERVER['HTTP_SSLSESSIONID']) && $_SERVER['HTTP_SSLSESSIONID'] != '') ||
(isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == '443')) ? 'SSL' : 'NONSSL';
This value is used by the html_header.php script to create the <base> tag using either the HTTP_SERVER or HTTPS_SERVER in that tag's creation. Perhaps your server's configuration is setting one of these values and triggering the <base> tag to use the HTTPS_SERVER value.
-
Re: 154 fresh install template not loading
Thanks lat9 (and everyone).
I'll have a good look at your post.
-
Re: 154 fresh install template not loading
Unfortunately had no much time to resolve this, however I casually found the culprit, it's nginx when running in front of apache.
I tried with a server running on nginx only and it works fine, (a part for those modules who require .htaccess, which will have to be sorted in nginx config) but specifically in nginx when running in front of apache (I tried nginxcp, which works well with cPanel).
I tried to unistall nginx and works fine, re-installed nginx and the problem shows up.
this is only with zen154, no problems with zen151.
-
Re: 154 fresh install template not loading
Quote:
Originally Posted by
Dadda
Unfortunately had no much time to resolve this, however I casually found the culprit, it's nginx when running in front of apache.
I tried with a server running on nginx only and it works fine, (a part for those modules who require .htaccess, which will have to be sorted in nginx config) but specifically in nginx when running in front of apache (I tried nginxcp, which works well with cPanel).
I tried to unistall nginx and works fine, re-installed nginx and the problem shows up.
this is only with zen154, no problems with zen151.
I suspect it's with the configuration of your nginx-as-proxy, where it's not passing through any of the indicators mentioned in the code quoted by lat9 in post#25 above.
If there's yet-another proxy parameter that needs to be accounted-for, please let us know!
-
Re: 154 fresh install template not loading
well, my short-term solution to the above problem was to move zen to another server, just a LAMP with no nginx.
However, to my surprise, for some reasons I don't even remeber right now, i had another go at installing a fresh zen, on that same server, with nginx. and it worked! I manage to install a fully working fresh zencart 1.5.4.
But then i tried with a different domain, SAME SERVER, and old problem showed up. No images, no css loading, no template, and base href with https.
So it must be something else then nginx, as a fresh install on 1 account works, and on a different account doesn't.
I checked they had the same version, I even imported the zencart from the account where is working to the one where insn't, but no chance.
So i found one fix, but I don't know if it's safe or not. I simply commented out from the store configure.php the line:
define('HTTPS_SERVER', 'https://mydomainetc.etc.com'); and it works.
the following line is set as:
// Use secure webserver for checkout procedure?
define('ENABLE_SSL', 'false');
still remain a mystery on why on one account it works, (same zen version, same files! same server, ) on another it doesn't, and i need to comment out
define('HTTPS_SERVER', 'https://mydomain-etc-etc.com');
I don't know if these further infos can trigger some alternative solution, or if the solution I found it's safe to be implemented on a live zencart.
any advice would be much appreciated
cheers
-
Re: 154 fresh install template not loading
Well, if your site has no need for security or offering secure login and secure checkout, then you can try that.
But if you want to offer your customers the safety of secure communications, then you should resolve the underlying root issue.
Given that there are a lot of posts in this discussion spanning a long period of time I would encourage you to uncomment that line, post a URL for us to view, and provide exact steps we can take to get to seeing the actual problem directly.
Multiple times you've said you're using a "fresh install", but people have different interpretations of what that means. When offering assistance here most of us interpret "fresh install" as: unzip the latest Zen Cart code, upload it to the server, and go through zc_install, including "demo products" in the installation. Nothing more. No adding of templates, no adding of plugins, no customizing language files, etc. Is that what you've been doing? Or have you "also" been adding your own template etc before the problem occurs?
-
Re: 154 fresh install template not loading
Thanks..
I did several fresh install with 1.5.4, 1.5.5, download from soundforge, upload to the server, going through with zc_install, install with demo products.
Here (ettart.net) there is a zen 1.5.4 install, with //define('HTTPS_SERVER', 'https://ettart.net');
If i remove // (uncomment) the above, css and images won't load and in the source code I will see this
<base href="https://ettart.net/" /> (https..)
instead of this:
<base href="http://ettart.net/" /> (http..)
and the front end will be all over the place. No theme, no css, you got the picture :-)
I don't know how can I show both situation. I can provide the ftp.
-
Re: 154 fresh install template not loading
1. Your server's SSL is in really bad shape. See: https://www.ssllabs.com/ssltest/anal...l?d=ettart.net
2. It seems likely that your server's configuration for your domain are sorely incorrect, for numerous reasons, including these base reasons:
a) Any attempts to connect over SSL result in "protocol error" ... which means SSL/TLS is "partially configured, but not completely configured". Better to be all on or all off, not half-way.
b) Zen Cart relies on the server's proper configuration to send proper signals indicating whether SSL is supported or not. Your server is giving some "yes we do https" indicators, but only enough to trick Zen Cart into thinking it should honor SSL (hence it's creating the base href as https) ... but then your server isn't able to deliver on the promise of SSL, so you and your visitors are experiencing failures to load things when requested over https.
From what I can tell Zen Cart is doing what it's designed to do. But your server isn't properly configured.
-
Re: 154 fresh install template not loading
Thanks..
I thought that disabling SSL during zencart installation would have been enough,
as per: define('ENABLE_SSL', 'false');
I don't really need SSL as I'm not selling hosting, and the few site in the server have external mx (I pick up only the record A as dns and configure accounts with an external mx record). Also the only payment method is Paypal which only require CURL.
it has worked fine for me this way and never had any problems.
However, I'm not sure that is the problem, as I do have exactly the same configuration for SSL on a different server (with a live zen) and Zen is not throwing any error there, (I get base href http:) but i still get the same notice on ssllabs "No secure protocols supported".
But I do use secure connection for WHM (I'm the only one accessing whm or cpanels) for the reasons above. No email running through the server, and only paypal accepted as payment. As said I don't sell hosting I just got a bunch of websites which i found useful to manage from my own box.
I'll have good look at it, thanks a lot for your advice.