lightspeedretail / webstore

Web Store eCommerce solution for Lightspeed
http://www.lightspeedpos.com/webstore
Open Software License 3.0
85 stars 63 forks source link

Autoupdate is broken on windows #577

Closed Dragony closed 9 years ago

Dragony commented 10 years ago

In the Upgrade controller unzipping the upgrade file always fail because of the following:

protected function unzipFile($path,$file)
{
    $path = str_replace("/core/protected","/runtime/upgrade",Yii::app()->basePath);

    die($path);
    // Results in "C:\xampp\htdocs\projectname\core\protected"

    require_once( YiiBase::getPathOfAlias('application.components'). '/zip.php');
    extractZip($file,'',$path);
    return true;
}

The str_replace does not work on windows, because basePath returns a value delimited with backwards slashes, but the replace only replaces the path correctly with forward slashes.

It's a windows server because I'm running windows on my dev machine.

Dragony commented 10 years ago

And just as a side note: Is it possible to have the update occur on command? If I'm using the webstore in a productive environment and the store update is not compatible with my local modifications it will break the store when my client visits the admin page and I have no controll over when that will be.

ktwbc commented 10 years ago

I can file a request to change this one function to use DIRECTORY_SEPARATOR but it would be just this function and would not guarantee any sort of compatibility with IIS or Windows which we do not support.

For the upgrade question, you can go to Admin Panel in System and System Configuration and turn Auto Update off here. This will then show you a message in Admin Panel when there is an update and you have to manually click Apply.

ktwbc commented 10 years ago

Filed as WS-2038

gabeguz commented 9 years ago

This won't be fixed. We don't support install/running on Windows. Sorry.