Unlimited Usenet
day retention, 99% Completion, Unlimited Access, Free Trial!

PHP in disconnected mode

This is a discussion on PHP in disconnected mode within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Hi to all, I have a smooth internet site which is running LAMP. I whish my co-workers can use ...


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-23-2009
fabrice régnier
 
Posts: n/a
Default PHP in disconnected mode

Hi to all,

I have a smooth internet site which is running LAMP.
I whish my co-workers can use this site in disconnected mode.
So i've installed WAMP on their windows laptops and the php scripts and
some mysql datas. All is working ok.

But _and you guess the problem_ ;) , the scripts and datas change often
on the website. So, i'm looking for a php solution that could allow my
co-workers to synchronize their data and scripts from the webserver when
they get back an internet connection.

Have you guys heard about some nice classe or project to do the job ?

regards,

f.
Reply With Quote
  #2 (permalink)  
Old 03-23-2009
Geoff Berrow
 
Posts: n/a
Default Re: PHP in disconnected mode

Message-ID: <49c7662b$0$27600$426a74cc@news.free.fr> from fabrice
régnier contained the following:

>But _and you guess the problem_ ;) , the scripts and datas change often
>on the website. So, i'm looking for a php solution that could allow my
>co-workers to synchronize their data and scripts from the webserver when
>they get back an internet connection.
>
>Have you guys heard about some nice classe or project to do the job ?


Do your colleagues change the scripts, of just the data on the database?
--
Geoff Berrow 0110001001101100010000000110
001101101011011001000110111101100111001011
100110001101101111001011100111010101101011
http://slipperyhill.co.uk - http://4theweb.co.uk
Reply With Quote
  #3 (permalink)  
Old 03-23-2009
Geoff Berrow
 
Posts: n/a
Default Re: PHP in disconnected mode

Message-ID: <r3ses4pl95n2ru4pd6vkj26tg6blm0gbgj@4ax.com> from Geoff
Berrow contained the following:

>>But _and you guess the problem_ ;) , the scripts and datas change often
>>on the website. So, i'm looking for a php solution that could allow my
>>co-workers to synchronize their data and scripts from the webserver when
>>they get back an internet connection.
>>
>>Have you guys heard about some nice classe or project to do the job ?

>
>Do your colleagues change the scripts, of just the data on the database?


For database you could look at:
http://www.databasejournal.com/featu...l---SQLyog.htm


For scripts:
Tortoise Subversion
http://tortoisesvn.tigris.org/
--
Geoff Berrow 0110001001101100010000000110
001101101011011001000110111101100111001011
100110001101101111001011100111010101101011
http://slipperyhill.co.uk - http://4theweb.co.uk
Reply With Quote
  #4 (permalink)  
Old 03-23-2009
fabrice régnier
 
Posts: n/a
Default Re: PHP in disconnected mode

> Do your colleagues change the scripts, of just the data on the database?
neither the scripts, nor the database. I'm the only one who change the
stuff on the main webserver.

The system i'm looking for is "just" a uni-directional system (ie: from
main webserver to colleagues' laptop webserver).

I'd like they access a php script where they can choose to "refresh"
their data and scripts.

regards,

f.

Reply With Quote
  #5 (permalink)  
Old 03-23-2009
Torsten Kaiser
 
Posts: n/a
Default Re: PHP in disconnected mode

Hello fabrice,

fabrice régnier wrote:

> The system i'm looking for is "just" a uni-directional system (ie: from
> main webserver to colleagues' laptop webserver).
>
> I'd like they access a php script where they can choose to "refresh"
> their data and scripts.

Provided the structure on the laptops can be safely overwritten without
danger of data loss: What about providing a TGZ file and wget for automatic
download?

Some example from scratch (untested):

on the main webserver, above /document-root-directory/to/pack/for/update:

The options -p preserve permissions and -P Paths.
/-------
#!/bin/ksh
tar -cvpPf file.tgz /document-root-directory/to/update
mv file.tgz /download-directory/for/the/laptops
\-------

Shell-Script on the laptops
(may as well react directly on your TGZ-hosting source being reacheable)

/--- refresh.ksh ------------
#/bin/ksh
alias which='/usr/bin/which' # just for
alias wget=`which wget` # portability on
alias tar=`which tar` # different distros

cd /the/laptop/target/root-directory
wget http://your/path/to/the/file.tgz && tar -xzf file.tgz
rm file.tgz
\----------------------------


to call the script within PHP, if needed:
/--- refresh.php ------------
<?php
print <<< END
<html>
<head>
</head>
<body>
updating Structure...<br>
END1;

$RESULT=`refresh.ksh`;

print <<< END2
<hr>
<pre>
$RESULT
</pre>
<hr>
DONE<br>
</body>
</html>
END2;
?>
\-----------------------------

Greetings

Torsten Kaiser

Reply With Quote
  #6 (permalink)  
Old 03-23-2009
Michael Fesser
 
Posts: n/a
Default Re: PHP in disconnected mode

..oO(fabrice régnier)

>I have a smooth internet site which is running LAMP.
>I whish my co-workers can use this site in disconnected mode.
>So i've installed WAMP on their windows laptops and the php scripts and
>some mysql datas. All is working ok.
>
>But _and you guess the problem_ ;) , the scripts and datas change often
>on the website. So, i'm looking for a php solution that could allow my
>co-workers to synchronize their data and scripts from the webserver when
>they get back an internet connection.
>
>Have you guys heard about some nice classe or project to do the job ?


What about SVN or rsync?

Micha
Reply With Quote
  #7 (permalink)  
Old 03-23-2009
C. (http://symcbean.blogspot.com/)
 
Posts: n/a
Default Re: PHP in disconnected mode

On 23 Mar, 18:31, Michael Fesser <neti...@gmx.de> wrote:
> .oO(fabrice régnier)
>
> >I have a smooth internet site which is running LAMP.
> >I whish my co-workers can use this site in disconnected mode.
> >So i've installed WAMP on their windows laptops and the php scripts and
> >some mysql datas. All is working ok.

>
> >But _and you guess the problem_ ;) , the scripts and datas change often
> >on the website. So, i'm looking for a php solution that could allow my
> >co-workers to synchronize their data and scripts from the webserver when
> >they get back an internet connection.

>
> >Have you guys heard about some nice classe or project to do the job ?

>
> What about SVN or rsync?
>
> Micha


Or a disconnected clusterFS like AFS?

The data replication is a bit more complex.

C.
Reply With Quote
  #8 (permalink)  
Old 03-24-2009
fabrice régnier
 
Posts: n/a
Default Re: PHP in disconnected mode

> What about SVN or rsync?
well, the latops are running windows so the only softs allowed are
php+apache+mysql (and no, i won't install cygwin to rsync or svn ;) ).

I would like a php script running on their webserver where they could
choose wich part of data from main webserver they want to download
(scripts + mysql datas).

I really start thinking about building something that doesn't exist yet ?

regards,

f.

Reply With Quote
  #9 (permalink)  
Old 03-24-2009
C. (http://symcbean.blogspot.com/)
 
Posts: n/a
Default Re: PHP in disconnected mode

On 24 Mar, 09:23, fabrice régnier <regnier....@free.fr> wrote:
> > What about SVN or rsync?

>
> well, the latops are running windows so the only softs allowed are
> php+apache+mysql (and no, i won't install cygwin to rsync or svn ;) ).
>
> I would like a php script running on their webserver where they could
> choose wich part of data from main webserver they want to download
> (scripts + mysql datas).
>
> I really start thinking about building something that doesn't exist yet ?
>
> regards,
>
> f.


Why would anyone want to build something which is already better
implemented elsewhere (AFS, rsync, unison, mysql replication, pushite,
weex, sitecopy, ftp-www, intermezzo, CVS.....) ?

C.
Reply With Quote
  #10 (permalink)  
Old 03-24-2009
Michael Fesser
 
Posts: n/a
Default Re: PHP in disconnected mode

..oO(fabrice régnier)

>> What about SVN or rsync?

>well, the latops are running windows so the only softs allowed are
>php+apache+mysql (and no, i won't install cygwin to rsync or svn ;) ).


SVN clients are available for almost every platform, some with a GUI,
some command line tools. This could most likely be setup in a way that
your clients just have to click something on their desktop (e.g. batch
file) to get their local working copy updated, maybe even their DB.

>I would like a php script running on their webserver where they could
>choose wich part of data from main webserver they want to download
>(scripts + mysql datas).
>
>I really start thinking about building something that doesn't exist yet ?


Why reinvent the wheel in this case? Your own solution will never be as
efficient and reliable as the existing ones.

Don't forget that one of the major strengths of SVN and others is that
only the parts that have been changed will be transferred. If you just
change one line of code in a 1 MB project, only that single line and
some control data will be sent to the clients instead of the entire
project. This saves a lot of time and traffic. And the same can be done
with MySQL dumps if real replication is not possible.

Micha
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 09:18 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0