Zen Cart Logo
Forums / Upgrading from 1.3.x to 1.3.9 / test site for upgrades

test site for upgrades

Views: 56,037

Results 21 to 40 of 49
4 Jun 2013, 3:00 PM
#21
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

test site for upgrades

ShopVille:

Right, i'm asking if there's a way to incorporate it in the live site for the future so that whenever i'm doing a clone copy for testing purposes it should automatically consider the subfolder
In order for the links to be "generated" by Zen Cart (using information in configure.php and the database), one needs to call the zen_href_link() function using PHP code.

For EZ-Pages the answer is no. EZ-Pages do not allow the execution of PHP code (they only allow static html).

For other pages (such as categories, products, and "define pages"), you can add a PHP snippet (calling zen_href_link) to generate the link.

22 Jun 2013, 6:05 AM
#22
thannaree avatar

thannaree

Zen Follower

Join Date:
Dec 2010
Location:
Thailand
Posts:
304
Plugin Contributions:
1

Re: test site for upgrades

Hello,

I've just created a new testsite. The catalog works fine but I cannot access the admin. When I enter the login and password, the page becomes blank with the following URL in the browser:

https://www.MYSITE.com/testsite/MYADMIN/login.php

I created a testsite last year and all worked fine. Do you know what could be the problem? Perhaps a wrong path in the configure files –see my settings below?

ADMIN
define('HTTP_SERVER', 'http://www.MYSITE.com/testsite'); define('HTTPS_SERVER', 'https://www.MYSITE.com/testsite'); define('HTTP_CATALOG_SERVER', 'http://www.MYSITE.com/testsite'); define('HTTPS_CATALOG_SERVER', 'https://www.MYSITE.com/testsite'); define('DIR_WS_ADMIN', '/MYADMIN/'); define('DIR_WS_CATALOG', '/'); define('DIR_WS_HTTPS_ADMIN', '/MYADMIN/'); define('DIR_WS_HTTPS_CATALOG', '/');

CATALOG
define('HTTP_SERVER', 'http://www.MYSITE.com/testsite');
define('HTTPS_SERVER', 'https://www.MYSITE.com/testsite'); define('DIR_WS_CATALOG', '/'); define('DIR_WS_HTTPS_CATALOG', '/');

22 Jun 2013, 7:47 AM
#23
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: test site for upgrades

Thannaree:

ADMIN
define('HTTP_SERVER', 'http://www.MYSITE.com/testsite'); define('HTTPS_SERVER', 'https://www.MYSITE.com/testsite'); define('HTTP_CATALOG_SERVER', 'http://www.MYSITE.com/testsite'); define('HTTPS_CATALOG_SERVER', 'https://www.MYSITE.com/testsite'); define('DIR_WS_ADMIN', '/MYADMIN/'); define('DIR_WS_CATALOG', '/'); define('DIR_WS_HTTPS_ADMIN', '/MYADMIN/'); define('DIR_WS_HTTPS_CATALOG', '/');Not sure why you've put that all on one line without any line-breaks.

Since your whole Admin area is relatively sensitive data, and not high-traffic, make it SSL by adding the "s" as shown (yes, makes HTTP_SERVER match the HTTPS_SERVER). Only for the ADMIN. NOT for catalog.
define('HTTP_SERVER', 'https://www.MYSITE.com/testsite');
define('HTTPS_SERVER', 'https://www.MYSITE.com/testsite');

22 Jun 2013, 8:42 AM
#24
thannaree avatar

thannaree

Zen Follower

Join Date:
Dec 2010
Location:
Thailand
Posts:
304
Plugin Contributions:
1

Re: test site for upgrades

DrByte:

Not sure why you've put that all on one line without any line-breaks.

Since your whole Admin area is relatively sensitive data, and not high-traffic, make it SSL by adding the "s" as shown (yes, makes HTTP_SERVER match the HTTPS_SERVER). Only for the ADMIN. NOT for catalog.
define('HTTP_SERVER', 'https://www.MYSITE.com/testsite');
define('HTTPS_SERVER', 'https://www.MYSITE.com/testsite');

Yes it's difficult to read. I actually did put it all with line-breaks, but then copied/pasted from Ms word ...

A thousand thanks for your answer! This fixed the issue.

I also made the Admin for https://www.MYSITE.com SSL by adding the "s"

9 Mar 2014, 9:17 AM
#25
thannaree avatar

thannaree

Zen Follower

Join Date:
Dec 2010
Location:
Thailand
Posts:
304
Plugin Contributions:
1

Re: test site for upgrades

I'm again experiencing the same issue. I just created a new testsite folder for my new site. The catalog works fine but I cannot access the admin. When I enter the login and password, the page becomes blank with the following URL in the browser:

https://www.MYSITE.com/TESTSITE/MYADMIN/login.php ... (and not the index.php file.)

In the admin/configure.php file, I have well updated the database info and only changed as indicated below:

define('HTTP_SERVER', 'http://www.MYSITE.com/TESTSITE');
define('HTTPS_SERVER', 'https://www.MYSITE.com/TESTSITE');
define('HTTP_CATALOG_SERVER', 'http://www.MYSITE.com/TESTSITE');
define('HTTPS_CATALOG_SERVER', 'https://www.MYSITE.com/TESTSITE');

define('DIR_FS_CATALOG', '/home/thai1/public_html/TESTSITE/');

define('DIR_FS_LOGS', '/home/thai1/public_html/TESTSITE/logs');

define('DIR_FS_SQL_CACHE', '/home/thai1/public_html/TESTSITE/cache');

Am I missing something?

9 Mar 2014, 1:47 PM
#26
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,100
Plugin Contributions:
56

Re: test site for upgrades

Thannaree:

I'm again experiencing the same issue. I just created a new testsite folder for my new site. The catalog works fine but I cannot access the admin. When I enter the login and password, the page becomes blank with the following URL in the browser:

https://www.MYSITE.com/TESTSITE/MYADMIN/login.php ... (and not the index.php file.)

In the admin/configure.php file, I have well updated the database info and only changed as indicated below:

define('HTTP_SERVER', 'http://www.MYSITE.com/TESTSITE');
define('HTTPS_SERVER', 'https://www.MYSITE.com/TESTSITE');
define('HTTP_CATALOG_SERVER', 'http://www.MYSITE.com/TESTSITE');
define('HTTPS_CATALOG_SERVER', 'https://www.MYSITE.com/TESTSITE');

define('DIR_FS_CATALOG', '/home/thai1/public_html/TESTSITE/');

define('DIR_FS_LOGS', '/home/thai1/public_html/TESTSITE/logs');

define('DIR_FS_SQL_CACHE', '/home/thai1/public_html/TESTSITE/cache');

Am I missing something?
Since the Zen Cart v1.5.0+ admin configure.php file "auto-computes" the values for DIR_WS_ADMIN and DIR_WS_HTTPS_ADMIN based on the current directory, perhaps changing to the following would work:

define('HTTP_SERVER', 'http://www.MYSITE.com');
define('HTTPS_SERVER', 'https://www.MYSITE.com');

Don't change the definitions for the catalog-servers, though!

10 Mar 2014, 2:08 AM
#27
thannaree avatar

thannaree

Zen Follower

Join Date:
Dec 2010
Location:
Thailand
Posts:
304
Plugin Contributions:
1

Re: test site for upgrades

Thanks lat9. I've tried that but unfortunately still get the blank pages.

In either case I get the following errors in the logs:

Accessing the Admin:

PHP Warning:  session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cookie - headers already sent by (output started at /home/thai1/public_html/test/MYADMIN/includes/classes/logger.php:127) in /home/thai1/public_html/test/includes/functions/sessions.php on line 113

PHP Warning:  session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /home/thai1/public_html/test/MYADMIN/includes/classes/logger.php:127) in /home/thai1/public_html/test/includes/functions/sessions.php on line 113

PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/thai1/public_html/test/MYADMIN/includes/classes/logger.php:127) in /home/thai1/public_html/test/MYADMIN/includes/init_includes/init_templates.php on line 55

Accessing the Catalog:

PHP Warning:  require(DIR_WS_TEMPLATEStemplate_default/common/html_header.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /home/thai1/public_html/test/index.php on line 85

PHP Warning:  require(DIR_WS_TEMPLATEStemplate_default/common/html_header.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /home/thai1/public_html/test/index.php on line 85

PHP Fatal error:  require() [<a href='function.require'>function.require</a>]: Failed opening required 'DIR_WS_TEMPLATEStemplate_default/common/html_header.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/thai1/public_html/test/index.php on line 85
10 Mar 2014, 2:46 AM
#28
thannaree avatar

thannaree

Zen Follower

Join Date:
Dec 2010
Location:
Thailand
Posts:
304
Plugin Contributions:
1

Re: test site for upgrades

I've reloaded all the files and now am able to access the admin normally. I still get the blank page when accessing the catalog.

10 Mar 2014, 3:29 AM
#29
thannaree avatar

thannaree

Zen Follower

Join Date:
Dec 2010
Location:
Thailand
Posts:
304
Plugin Contributions:
1

Re: test site for upgrades

I've reloaded the database and the catalog files and now all works normally, without any error in the logs.

I don't know what happened yesterday when I uploaded the files. Internet was on and off but I also could have made a mistake.

Thanks lat9 for your reply!

10 Mar 2014, 2:42 PM
#30
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,100
Plugin Contributions:
56

Re: test site for upgrades

Internet hiccups suck! I'm glad you got it sorted out.

23 Jan 2018, 10:38 PM
#31
lindsey80 avatar

lindsey80

New Zenner

Join Date:
Apr 2010
Location:
Essex, UK
Posts:
77
Plugin Contributions:
0

Re: test site for upgrades

schoolboy:

You could create a SUB-FOLDER on your current install (call the folder "testsite"), and create a CLONE of your current site that runs out of that folder.

You will need to create copies of:

  1. The FOLDERS and FILES
  2. The DATABASE.

All of this can be done in C-Panel (assuming you are with a host that runs a proper C-Panel).

MAKE A BACKUP OF EVERYTHING FIRST... AND THEN...

In the C-Panel FILE MANAGER, COPY the current zencart installation into your new testsite folder.

Create a NEW database (name eg: testsite) and apply the SAME database user and database password to that database, as you have on your current database.

In phpMy Admin, you can COPY your existing database to the NEW one you just created. (I think the copy function is under the OPERATIONS tab).

Now you have your CLONE.

Final steps are to EDIT the two configure.php files (you may need to change the CHMOD permissions to 644 in order to edit them) to show the new SUB-FOLDER in the path locations, and the new DATABASE NAME. (remember... the USER and PASS should not need changing, as you have assigned the same user to the cloned database.)

After editing, change their CHMOD back to 444.

You should be able to login to the copied site's admin panel using the same username and password as the live site. REMEMBER the admin login for the clone will be in the sub-folder location!

After logging in you need to adjust the SESSIONS path (Admin >>> Configuration >>> Sessions)...

... and the LOGGING path (Admin >>> Configuration >>> logging)...

This just requires that you insert the name of the subfolder (testsite) into the paths.

I then set the testsite DOWN FOR MAINTENANCE, so nobody can access it (including search engines).

What I do... IMMEDIATELY AFTER THE ABOVE, is give the cloned site a NEW HEADER LOGO that says in bright red text "YOU ARE IN THE CLONED SITE". I do the same for its ADMIN PANEL, so I immediately know I am in the TEST SITE and not the LIVE SITE.

What you don't want to do, is think you are in the testsite, when in fact you are in the LIVE site...

REMEMBER... the test site is a SNAPSHOT of the database as it was the minute you made a copy of it. After you have played around on it and tested things, you SHOULD NOT turn it into a live site... Its database will be very different from your LIVE site, and "merging" the two later on will cause huge problems.

SO... you will make DETAILED NOTES of everything you do in the test site, because later, some of thie things you do will have to be done again when you modify or upgrade the LIVE site.

When you are done with testing and practicing, and you are ready to upgrade and reconfig your LIVE site. you should DELETE COMPLETELY the test site and its database.

Refer to your DETAILED NOTES for procedures you can now apply to the live site.

We routinely create test sites, and the whole process (above) should take no longer than 20 minutes.

Thanks for a great guide. I have followed step by step and am very confused why I am having these issues as it seems that both test and live are looking at the same database somehow even though the configure files have been changed to show the new database?

In test site admin shows fine. My test site looks fine if I manually type in the address

Problem 1
When I set the test site to down for maintenance, it also puts my live site in the same state!? Configure.php in admin and includes have both been changed to reflect the new test database created

Problem 2
When clicking on storefront in admin on test site, it is taking me to my live storefront??:rant:

Any help would be very appreciated!

24 Jan 2018, 3:21 AM
#32
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: test site for upgrades

lindsey80:

Thanks for a great guide. I have followed step by step and am very confused why I am having these issues as it seems that both test and live are looking at the same database somehow even though the configure files have been changed to show the new database?

In test site admin shows fine. My test site looks fine if I manually type in the address

Problem 1
When I set the test site to down for maintenance, it also puts my live site in the same state!? Configure.php in admin and includes have both been changed to reflect the new test database created

Problem 2
When clicking on storefront in admin on test site, it is taking me to my live storefront??:rant:

Any help would be very appreciated!
These symptoms indicate that you're using the same config for both sites.
Sometimes the culprit is that the configure.php files were read-only when you tried to upload changes to them, and the upload didn't take.

24 Jan 2018, 8:04 PM
#33
lindsey80 avatar

lindsey80

New Zenner

Join Date:
Apr 2010
Location:
Essex, UK
Posts:
77
Plugin Contributions:
0

Re: test site for upgrades

DrByte:

These symptoms indicate that you're using the same config for both sites.
Sometimes the culprit is that the configure.php files were read-only when you tried to upload changes to them, and the upload didn't take.

Hi, these are my live sites files, I have compared them and can't see what the problem can be. Are you able to have a look please? I will upload the test files on another post.

Many thanks

24 Jan 2018, 8:10 PM
#34
lindsey80 avatar

lindsey80

New Zenner

Join Date:
Apr 2010
Location:
Essex, UK
Posts:
77
Plugin Contributions:
0

Re: test site for upgrades

lindsey80:

Hi, these are my live sites files, I have compared them and can't see what the problem can be. Are you able to have a look please? I will upload the test files on another post.

Many thanks

Sorry, previous attachments were the test files and these files are the live site.

Thanks

24 Jan 2018, 8:18 PM
#35
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: test site for upgrades

lindsey80:

Sorry, previous attachments were the test files and these files are the live site.

Thanks

In your test site do you have a configure.php file in YOUR_ADMIN/includes/local?

24 Jan 2018, 8:30 PM
#36
lindsey80 avatar

lindsey80

New Zenner

Join Date:
Apr 2010
Location:
Essex, UK
Posts:
77
Plugin Contributions:
0

Re: test site for upgrades

mc12345678:

In your test site do you have a configure.php file in YOUR_ADMIN/includes/local?

No I only have skip_version_check.ini in the local folder?

24 Jan 2018, 8:42 PM
#37
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: test site for upgrades

lindsey80:

No I only have skip_version_check.ini in the local folder?

Somewhat back on what DrByte was saying about updating the file(s), while I can not reproduce it 100% of the time, I have come across situations where I "save" the change, I close out the file, I open it up again and it "looks" refreshed. I access the file another way and find that it has not actually saved it to the server... This has happened to me if I have in a hurry used like a web-based method of accessing the file instead of a quality ftp program.

What of any of that might seem to apply to your situation? The database shown on the images appears to be different between the catalog and admin.

24 Jan 2018, 8:46 PM
#38
lindsey80 avatar

lindsey80

New Zenner

Join Date:
Apr 2010
Location:
Essex, UK
Posts:
77
Plugin Contributions:
0

Re: test site for upgrades

mc12345678:

Somewhat back on what DrByte was saying about updating the file(s), while I can not reproduce it 100% of the time, I have come across situations where I "save" the change, I close out the file, I open it up again and it "looks" refreshed. I access the file another way and find that it has not actually saved it to the server... This has happened to me if I have in a hurry used like a web-based method of accessing the file instead of a quality ftp program.

What of any of that might seem to apply to your situation? The database shown on the images appears to be different between the catalog and admin.

I'm not sure if I've found something.... theres an configure.php file in admin/includes/configure.php, which I guess should not be there?!

As for the files, i've downloaded using filezilla, changed in dreamweaver, deleted the original file and uploaded the new. Im so confused :(

24 Jan 2018, 9:22 PM
#39
lindsey80 avatar

lindsey80

New Zenner

Join Date:
Apr 2010
Location:
Essex, UK
Posts:
77
Plugin Contributions:
0

Re: test site for upgrades

lindsey80:

I'm not sure if I've found something.... theres an configure.php file in admin/includes/configure.php, which I guess should not be there?!

As for the files, i've downloaded using filezilla, changed in dreamweaver, deleted the original file and uploaded the new. Im so confused :(

Now I see what you mean about configure in local. Yes I did. Ive removed that one and adjusted the one in admin/includes. I can get onto the admin login page but cant use my normal login details. I want to cry now :frusty: