By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,636 Members | 1,941 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,636 IT Pros & Developers. It's quick & easy.

best approach to synch local and remote script folders

P: n/a
Hi,
I finally figured out the best way to synch local and remote script
folders, containing many php script files.

What I used to do before was try to ftp all the changed files, etc.
which was tedious and often broke. It was also very slow.

What I do now is to pkzip the folder up, ftp the pkziped data to
remote, and then unzip it there, which recreates the directories and
files.

This requires shell access at remote host.

This may be obvious to some, but certainly was not obvious to me for
the longest time.

--
Posted using the http://www.dbforumz.com interface, at author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbforumz.com/PHP-approach...ict206564.html
Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbforumz.com/eform.php?p=704860
Jul 17 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
steve wrote:
Hi,
I finally figured out the best way to synch local and remote script
folders, containing many php script files.

What I used to do before was try to ftp all the changed files, etc.
which was tedious and often broke. It was also very slow.

What I do now is to pkzip the folder up, ftp the pkziped data to
remote, and then unzip it there, which recreates the directories and
files.

This requires shell access at remote host.

This may be obvious to some, but certainly was not obvious to me for
the longest time.


Better up, use rsync/rsyncd, this way you only do transport the updated files.
Requiers shell and that you can setup your php script directory as a
sync-directory.
//Aho
Jul 17 '05 #2

P: n/a
J.O. Aho wrote:
steve wrote:

What I do now is to pkzip the folder up, ftp the pkzip?ed data to
remote, and then unzip it there, which recreates the directories and
files.

This requires shell access at remote host.

This may be obvious to some, but certainly was not obvious to me for
the longest time.


Better up, use rsync/rsyncd, this way you only do transport the updated
files. Requiers shell and that you can setup your php script directory as
a sync-directory.


There are several tools for synchronizing like this. Unison is handy for
bidrectional sync. A better solution for some might be CVS. I wrote a wee
tool called PushSite for people with only FTP access - the docs have links
to some of the other tools available.

(http://pushsite.sourceforge.net)

HTH

C.
Jul 17 '05 #3

P: n/a
"steve" <Us************@dbForumz.com> wrote in message
news:4_***************************************@dbf orumz.com...
Hi,
I finally figured out the best way to synch local and remote script
folders, containing many php script files.

What I used to do before was try to ftp all the changed files, etc.
which was tedious and often broke. It was also very slow.

What I do now is to pkzip the folder up, ftp the pkzip'ed data to
remote, and then unzip it there, which recreates the directories and
files.

This requires shell access at remote host.

This may be obvious to some, but certainly was not obvious to me for
the longest time.

--
Posted using the http://www.dbforumz.com interface, at author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbforumz.com/PHP-approach...ict206564.html Visit Topic URL to contact author (reg. req'd). Report abuse:

http://www.dbforumz.com/eform.php?p=704860

The best situation I find is to build a development box and do all of
your work on that box, accessing the files via windows file sharing. You can
just "map the network drive" or work right via a windows share, and just
save the files when you make a change. Then you refresh the page.

Once you are happy with the result you just FTP/scp the files to the
webhost. Generally it will be best to have a development box that runs the
same OS as your host (i.e. *nix or windows) only because of the differences
in file paths between windows and *nix versions of php.

Since you're a good programmer you use relative URLs in your code and it
won't matter if the host name is an IP address (of your development box) or
the domain name (of the fully hosted site once you upload) -- and you are a
good programmer right? :) In this way, you'll probably only upload the site
a few times rather than for every little change you make.

If you don't have a spare computer around you can always use your
workstation. You'll have to install PHP and a webserver, maybe mysql. Again,
not that hard and documentation on how to do so is rampant.

If you have a *nix webhost and want to put *nix on your dev box, just
make sure to include samba (which is usually the default) and you'll be able
to, again, use window file sharing to edit you files on the fly.

No offense, but IMO anyone who works on a live site during the
development of a site is a sucker (ahem, let the flame wars begin).
Honestly, if anyone that hasn't had a local dev box, you really need to set
one up and try it out. What better reason to have your own dedicated server
and/or a great chance to learn *nix?

On a side note, if anyone HAS had a dev box and actually preferred to
use some sort of sync. solution, please tell me why as I'm interested.

-Joe
Jul 17 '05 #4

P: n/a
I've got a production/dev box running linux, mysql, and apache and I
also have a similar setup on my windows laptop with mysql and apache
installed. When I can't connect to my server I can still write
cross-platform php for my applications on my laptop and have the same
abilities to test and debug. When I finally get a chance to connect to
the server I just sync up my subversion repository and mysql database
to the server and thats it. This sort of enforces that I write linux
and windows compliant software. Anyone else?

-JI

Jul 17 '05 #5

P: n/a
"jamie23" wrote:
I've got a production/dev box running linux, mysql, and apache
and I
also have a similar setup on my windows laptop with mysql and
apache
installed. When I can't connect to my server I can still write
cross-platform php for my applications on my laptop and have
the same
abilities to test and debug. When I finally get a chance to
connect to
the server I just sync up my subversion repository and mysql
database
to the server and thats it. This sort of enforces that I write
linux
and windows compliant software. Anyone else?

-JI


Jamie, can you expand on it. You synch BOTH php code AND mysql...
more explanation would be appreciated. How do you deal with a field
added/deleted from your dev mysql tables?

--
Posted using the http://www.dbforumz.com interface, at author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbforumz.com/PHP-approach...ict206564.html
Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbforumz.com/eform.php?p=714345
Jul 17 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.