With the release of 4.0.2.3 I've been testing the System > Maintenance > Upgrade function. The good news: it does seem to work overall. The bad news: it currently has a few bugs that stop it from working without fixing a few things. Here are my notes:
1. There is no warning when clicking the button, so if you click it, then it will try to upgrade your store. Since this can result in overwriting your files, it really should have a confirmation dialog. I've filed an issue on github about this.
2. The installer looks for the "storage" directory in the /system/storage/ location. Since OpenCart itself asks you to move the "storage" directory, it won't be in this location. You can fix this by copying your current "storage" directory into the /system/ directory, but I've filed an issue on github so this is fixed in future versions.
3. You need a long "max_execution_time" time on your server. In my tests, it required 4 minutes or more, but I recommend 5 minutes. You may be able to set that in the /php.ini file, but if that doesn't work, you'll need to change it globally for your server.
4. If you apply fixes #2 and #3, then it does seem to work. However, it takes a VERY long time to complete. In my tests, the entire process took 90 minutes. Almost all of this time was copying files from the zip archive that is downloaded. This slowness seems to be a result of using the PHP copy() function. The installer tries to copy each file from the zip bundle individually, which takes around 1 second per file.
I've been doing tests replacing copy() with file_put_contents() and it's much faster. It worked in all my tests, but I'm not sure if this will run into permission issues on certain servers. I've posted an issue on github with some fixes that worked for me:
https://github.com/opencart/opencart/issues/12698
However, I'm not sure if this speed issue is related to the 2 machines I tested on, or some PHP setting. If you can use only the fix in #2 above and the Upgrade completes quickly, please post in this topic so we can discuss it.
Thanks for the feedback. I just checked their extension and it does the same thing I proposed --- using file_put_contents() instead of copy().
I wish I'd known about this sooner! Here's a link for those interested:
https://www.opencart.com/index.php?rout ... n_id=45216
I wish I'd known about this sooner! Here's a link for those interested:
https://www.opencart.com/index.php?rout ... n_id=45216
Who is online
Users browsing this forum: No registered users and 2 guests