Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standalone download piwik / install/ upgrade/ uninstall script #1922

Closed
robocoder opened this issue Dec 30, 2010 · 6 comments
Closed

Standalone download piwik / install/ upgrade/ uninstall script #1922

robocoder opened this issue Dec 30, 2010 · 6 comments
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.

Comments

@robocoder
Copy link
Contributor

This would be a single script uploaded to the user's web folder. (Yes, it might be huge.) This would be an alternative to the uninstall script from #1170. The goal of this script is to avoid the permissions issue when users ftp an already extracted piwik directory from their desktop to their web server.

install.php:

  • downloads latest.zip if piwik and latest.zip are not present in the current folder
  • unzips latest.zip if the piwik folder doesn't exist in the current folder
  • redirects to piwik/index.php (should invoke Installation)

To upgrade, rename "install.php" to "update.php" (or "upgrade.php"). It then:

  • downloads latest.zip if not present
  • unzips latest.zip if the piwik folder is already present
  • redirects to piwik/index.php (should invoke CoreUpdater)

To uninstall, rename "install.php" to "uninstall.php". It then:

  • removes piwik folder
  • removes latest.zip
  • tries to delete itself; advises user to remove "uninstall.php".

We could also offer an "upload" option if (and only if) current directory is writeable, file_uploads=On, max_file_uploads >= 1, and upload_max_filesize, upload_tmp_dir, post_max_size, max_input_time, MAX_FILE_SIZE, and ... are set appropriately.

(IIS has its own limit...we can assume this is reasonably sized, but given the ACL issues, this might be a showstopper on Windows.)
Keywords: interesting

@halfdan
Copy link
Member

halfdan commented Dec 30, 2010

You could consider using PHP archives (available as of PHP 5.3, enabled by default). PHP archives work similar to JARs from Java. They can be executed by the webserver without extracting them. It would be possible to run the installation from within the PHAR and extract the all files to a given directory.

Alternatively: We could check the performance of running Piwik from within the PHAR. In combination with memcache/APC it should be pretty fast (i.e. Zend Framework is sometimes shipped as PHAR, so it seems to work in practice). In this case, as PHARs are read-only, the tmp/ directory needs to be outside the PHAR.

If needed I would investigate this topic further as I've been working with PHP archives for a while.

@robocoder
Copy link
Contributor Author

If I understand correctly, the advantage of .phar is that we could treat it as another packaging method (adding it to misc/package/). If so, then by all means, please look into it. I think it would be preferable to extract all the files from .phar to a given directory for performance (e.g., static files, and tracker).

@mattab
Copy link
Member

mattab commented Sep 17, 2011

This is a great idea. The only downside is that it is "one more" installation technique to promote, document, support, etc. Ideally we would ONLY use this script but then it is limiting... if we don't advertise it though, it might not be used, so it is quite tricky (and not that many people complain about FTP even though it must be quite painful to FTP upload on each new release!)

@mattab
Copy link
Member

mattab commented Dec 16, 2011

Another similar/related idea would be to create a shell script that would setup apache, php with required extensions, download and prepare Piwik. See this example script: https://raw.github.com/openphoto/frontend/master/documentation/guides/InstallationUbuntuApache.sh

@mattab
Copy link
Member

mattab commented Apr 6, 2014

There is a new core:update console command which lets you upgrade Piwik and plugins.

Please contact us if you are interested in this functionality for your business. contact us via: http://piwik.org/contact

@robocoder robocoder added this to the Future releases milestone Jul 8, 2014
@mattab
Copy link
Member

mattab commented Oct 2, 2014

see our one click Installation options: Softaculous, Installatron, Microsoft Web Platform Installer, and our official Piwik Debian package.

@mattab mattab closed this as completed Oct 2, 2014
@mattab mattab added the wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it. label Oct 2, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.
Projects
None yet
Development

No branches or pull requests

3 participants