pschneider
Advanced Member
USA
218 Posts |
Posted - 01/20/2018 : 05:45:50
Hi. Marlene advised me that I would need to increase to from php44 version to php71 in order for her to be able to install all of the latest Ecommerce updates. I tried this, and none of my sites would even load. Hostek, my hosting company, dropped it back to php54, and now the sites are loading, but I get this error when I try to go to the store:
Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/seaminer/public_html/ag-usa.net/vsadmin/inc/inccategories.php on line 177
When I try to go to the shopping cart I get this error:
Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/seaminer/public_html/ag-usa.net/vsadmin/inc/incfunctions.php on line 1773
Even if you are able to help me fix these two things, are there other things that will also malfunction by going from php44 to php54?
Finally, do you have an idea what would need to be done to upgrade to php71?
www.ag-usa.net, also seamineralsolutions.com and maxbien.com
Thank you.
Paul Schneider Jr
|
Andy
ECT Moderator
95440 Posts |
Posted - 01/20/2018 : 06:10:45
Hi Paul Have a look at these syntax changes you may need to make when switching to PHP 7 or above https://www.ecommercetemplates.com/support/topic.asp?TOPIC_ID=107737 For the date warning add this to vsadmin/includes.php exactly as shown date_default_timezone_set('UTC'); Also bear in mind that if you have multiple sites, each will require their own updater purchase. Andy Please feel free to review / rate our software
|
pschneider
Advanced Member
USA
218 Posts |
Posted - 01/20/2018 : 13:24:23
Thank you, Andy. I added this to vsadmin/includes.php exactly as shown:
date_default_timezone_set('UTC');
The problem was still there.
Next I tried putting the dollar sign in front, like this:
$date_default_timezone_set('UTC');
That didn't work either, even though I tried in 3 different servers.
Any suggestions?
Thanks. Paul
Paul Schneider Jr
|
pschneider
Advanced Member
USA
218 Posts |
Posted - 01/20/2018 : 13:50:24
I looked at the syntax changes needed when switching to PHP 7 or above at: https://www.ecommercetemplates.com/support/topic.asp?TOPIC_ID=107737
I went line by line, character by character, and it is exactly what I have in my db_conn_open.php file already.
In spite of this, when I made the change to PHP 7.1 it then wouldn't load the websites. A couple of the sites came up just white, while a couple had outlines of where formatting was supposed to be, but no content.
What can I try next?
Thanks. Paul
Paul Schneider Jr
|
pschneider
Advanced Member
USA
218 Posts |
Posted - 01/20/2018 : 13:53:39
And also, my vsadmin/includes.php already had the first and last line formatting:
<?php
and
?>
Thanks. Paul
Paul Schneider Jr
|
Sinbad
ECT Moderator
USA
65937 Posts |
Posted - 01/20/2018 : 14:16:26
|
Andy
ECT Moderator
95440 Posts |
Posted - 01/20/2018 : 14:18:43
|
pschneider
Advanced Member
USA
218 Posts |
Posted - 01/20/2018 : 14:38:03
Thanks. Sinbad, I guess you are Marlene? Yes, let's leave AG-USA at 5.4 and you can update the one site to 6.7.3 Can you please fix the date problem? As I mentioned, I added the following to vsadmin/includes.php exactly as shown, but the problem exists. I also tried putting the $ in front of it, but no change.
date_default_timezone_set('UTC');
And to Andy, yes, I did see your comment about the other 2 sites needing updaters applied to them as well. The other two sites really aren't functional at this point. I have done my best to route all sales from our other websites to the AG-USA site, but I have left the other sites up just in case I missed something. But in the mean time, they do afford me an opportunity to experiment with these sites, for instance, updating them to 7.1 and then finding what works to get them working before we do it on our bread and butter site, ag-usa.net
Thanks. Paul
Paul Schneider Jr
|
pschneider
Advanced Member
USA
218 Posts |
Posted - 01/20/2018 : 14:51:38
And for Sinbad:
The Add to cart and Checkout icons have disappeared again, I don't know why. Thanks. Paul
Paul Schneider Jr
|
pschneider
Advanced Member
USA
218 Posts |
Posted - 01/20/2018 : 15:09:35
Sinbad: I think what happened with the add to cart icon is that you put it into my include file, but then when I made changes to it I overwrote what you did.
Paul Schneider Jr
|
pschneider
Advanced Member
USA
218 Posts |
Posted - 01/20/2018 : 15:15:48
Actually, I do have this for the add to cart button:
// Image Tweaks
$imgbuybutton="images/buy.gif";
But for some reason it dropped the image again.
Thanks. Paul
Paul Schneider Jr
|
pschneider
Advanced Member
USA
218 Posts |
Posted - 01/20/2018 : 22:33:13
Hi. Hostek emailed me the following:
In this case, we have been able to get your site's services to load over PHP 7.1 as requested.
In this case, the PHP warning previously citing an issue with the site's date() details, was due to a slight coding issue on line 23 of (/home/seaminer/public_html/ag-usa.net/vsadmin/includes.php) wherein your site's file was attempting to set the site's timezone to "UTC time via the (date_default_timezone_set) function; However, due to the addition of an extra Dollar-sign symbol ("$") in front of the function, the line was being read as a PHP variable call, instead of a PHP function call.
To resolve this issue we have changed line 21 as shown below:
-- FROM: $date_default_timezone_set('UTC'); -- TO: date_default_timezone_set('UTC');
Once this change was in place, we were able to confirm that your site is now loading without issue after setting the PHP version to 7.1.
Could you please retry accessing your site once again and confirming that it is now working as expected?
In fact, everything worked as expected until I tried to add a bucket to my cart at this url: http://ag-usa.net/proddetail.php?prod=3GroPalBalanceA-bucket-bulk
When I did, it gave me the error code: The following product isn't currently available in our store: " Fatal error: Uncaught Error: Cannot use string offset as an array in /home/seaminer/public_html/ag-usa.net/vsadmin/inc/inccart.php:2161 Stack trace: #0 /home/seaminer/public_html/ag-usa.net/vsadmin/inc/inccart.php(2257): addproduct('3GroPalBalanceA...') #1 /home/seaminer/public_html/ag-usa.net/vsadmin/shipservice.php(84): include('/home/seaminer/...') #2 {main} thrown in /home/seaminer/public_html/ag-usa.net/vsadmin/inc/inccart.php on line 2161 "
They are trying to help me with this right now, but I wanted to keep you informed of what is happening. If indeed we are able to get updated to PHP 71, then we can install all of the updater!
Thanks. Paul
Paul Schneider Jr

|
insight
ECT Moderator
USA
4479 Posts |
Posted - 01/21/2018 : 18:13:56
Not sure you want to set date_default_timezone_set('UTC'); when you appear to be in GA, more appropriate (and won't make the time on your site 5 hours off) would be: date_default_timezone_set('America/New_York'); Peter ServeLink Professional ecommerce web hosting for ASP & PHP https://servelink.comTake a look at our image upload/resize tool for the ASP cart https://servelink.com/clients/cart?gid=7
|
pschneider
Advanced Member
USA
218 Posts |
Posted - 01/21/2018 : 18:38:27
Thank you, Peter. I have made the time change to my includes page.
Any thoughts about the error code in my cart?
Thanks. Paul
Paul Schneider Jr
|
insight
ECT Moderator
USA
4479 Posts |
Posted - 01/21/2018 : 18:45:43
What are your ECT & PHP versions now? I'd guess you are running an older ECT version with PHP 7.1 or above, is that right? Peter ServeLink Professional ecommerce web hosting for ASP & PHP https://servelink.comTake a look at our image upload/resize tool for the ASP cart https://servelink.com/clients/cart?gid=7
|
pschneider
Advanced Member
USA
218 Posts |
Posted - 01/21/2018 : 18:52:56
I am running PHP 7.1 but have no idea what my ECT version is. I will check with Hostek. I take it that we need a newer version of that as well? Which ECT version would you suggest? Thanks. Paul
Paul Schneider Jr
|
insight
ECT Moderator
USA
4479 Posts |
Posted - 01/21/2018 : 18:59:47
Your ECT version is shown on the home page of the store admin. I *think* you have an older version of the ECT store software and a newer version of PHP. The cure for that is fairly obvious  ; either go back a bit with your PHP version (try 7.0 for a start. that will likely be fine, or 5.6 if the first doesn't work) or update the store (to the latest). Ultimately your goal is to be at the latest of both, but that has to be done in a somewhat synchronized fashion. Peter ServeLink Professional ecommerce web hosting for ASP & PHP https://servelink.comTake a look at our image upload/resize tool for the ASP cart https://servelink.com/clients/cart?gid=7
|
pschneider
Advanced Member
USA
218 Posts |
Posted - 01/21/2018 : 19:48:37
Thanks, Peter. I am sorry, but I didn't recognize the ECT abbreviation.
This whole thing started by my asking Marlene to update my site with the latest ECT updater, and she said I would need a 7.1 to do that. So I switched PHP to version 7.1 and now I can ask her to go ahead with the updater, and then see where we stand.
Thank you. Paul
Paul Schneider Jr
|
insight
ECT Moderator
USA
4479 Posts |
Posted - 01/21/2018 : 20:46:13
|
Sinbad
ECT Moderator
USA
65937 Posts |
Posted - 01/22/2018 : 08:19:14
|
pschneider
Advanced Member
USA
218 Posts |
Posted - 01/22/2018 : 08:31:22
Thanks. I have replied to the email. Paul
Paul Schneider Jr
|
|
|