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?