Re: Autoupdate script!



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

.



Relevant Pages

  • Re: Autoupdate script!
    ... "Erwin Moller" ... >> do you want YOUR PHP site to offer certain downloads for the user, ... > (This can be done easily by creating a script on your website that returns ...
    (comp.lang.php)
  • Re: renaming emails
    ... But that's ok - I've already downloaded and examined the script. ... it went to 'Downloads' and I dragged it to the ... You can esily re-create that metadata by opening the script in ... Send responses to the relevant news group rather than to me, ...
    (microsoft.public.mac.office.entourage)
  • Re: renaming emails
    ... jollyroger-9E4B37.11584410102008@xxxxxxxxxxxxxxxxxxx, "Jolly Roger" ... But that's ok - I've already downloaded and examined the script. ... it went to 'Downloads' and I dragged it to the ... You can esily re-create that metadata by opening the script in ...
    (microsoft.public.mac.office.entourage)
  • Re: auto delete file after download
    ... So when user downloads the file, I would like the php script to insert that ... | I would like that this file is automaticaly deleted from server after ... expiration on a file. ...
    (alt.php)
  • Determining Laptop Screen Aspect Ratio
    ... At logon, we have a script that downloads a splash screen, which changes ... The default resolution is 800x600. ... looks "squashed" on the new laptops. ...
    (microsoft.public.scripting.wsh)