Page 1 of 1

Automatic site updates (version upgrade of PHP files)

Posted: Wed Jun 11, 2008 3:34 pm
by OMA
Hello, do you know how can I implement site auto-updates, similar to what some forums have?
For example, Simple Machines (SMF) forums have this feature, where the admin panel informs that a new version is out, and offers to autoupdate from the official servers.

So, how is this done? I'd need a way to get a PHP script to automatically download a package from a different server, unzip it, and overwrite the relevant PHP files of the server.

I hope you can help me.

Thank you!

Re: Automatic site updates (version upgrade of PHP files)

Posted: Mon Jun 16, 2008 5:28 am
by OMA
No answer? :(

Re: Automatic site updates (version upgrade of PHP files)

Posted: Mon Jun 16, 2008 8:27 am
by Ambush Commander
While informing the user that a new version is available is generally desirable, and implemented by having the PHP script check the server (using CURL, sockets or some other http get function) for a new version, rewriting scripts without user intervention is considered bad form.

Re: Automatic site updates (version upgrade of PHP files)

Posted: Tue Jul 01, 2008 5:27 am
by OMA
Why is it bad form? Maybe because of security concerns?
So you think SMF shouldn't autoupdate as it does now?

I'll take a look at CURL: http://es2.php.net/manual/en/book.curl.php

Thanks for your reply!

OMA