Java Boy wrote:
do you want YOUR PHP site to offer certain downloads for the user, so he
can update their own instance of your app somewhere?
Exactly yes that is the case!
Hi,
Ok.
And ofering them a zipped file that they can use to overwrite their own
instance is too complicated?
I mean: I run my own webserver, but would NOT be very happy with
applications that update themself without my knowledge.
I would have to thrust you a lot to let such process run behind my back.
But it can be done of course.
I am unaware of any ready-to-go scripts, sorry.
If you write it yourself, the following things should be considered (to name
a few):
- Which user will have the rights to overwrite the existing files?
- Do you want to do it on demand or really automated?
(If really automated you need a cronjob or something like that)
If on demand, the user that runs PHP (often www-data) should be able to:
1) check if you have a new version available.
(This can be done easily by creating a script on your website that returns
the versionnumber of your latest zipped file)
2) download the file
3) unpack it
4) overwrite the current version (You need a path of course to the install)
The problem with the above approach is that php-user (www-data) will
probably own all the files. Maybe you can conjure up a nice group to solve
that problem, or maybe you don't care. But think about it. :-)
One other thing: Do you need database-schema-updates too? In that case your
script that updates must also have a connection at hand, a connection with
enough rights to change the current databasesheme.
Sounds like a big job if you do it right. :-)
I hope my rabbling helps to get you going. Just my 2 cents.
Good luck.
Regards,
Erwin Moller