473,386 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

best approach to synch local and remote script folders

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
Jul 17 '05 #1
5 2865
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 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.
//Aho
Jul 17 '05 #2
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
"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
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
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: miles111 | last post by:
Basically, can I execute a php script from within a php script? Heres some details: I'm using a remote script to get my local ip address using $HTTP_SERVER_VARS; This works. Now I want to run...
7
by: Dave Smithz | last post by:
Hi There, I have taken over someone else's PHP code and am quite new to PHP. I made some changes and have implemented them to a live environment fine so far. However, I now want to setup a...
5
by: great_googley_moogley | last post by:
Greetings, I am in the process of installing a SQL database at a customer location. I have determined that there are 3 ways to do this, and I wanted to know which is the best of the 3. 1...
136
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their...
6
by: Jim H | last post by:
I have an app I working on that was working fine a few days ago. Now I get a jscript error: Microsoft JScript runtime error: Object expected in a part of the code that has not been modifed or...
20
by: Keith G. Murphy | last post by:
I'm trying to get a feel for what most people are doing or consider best practice. Given a mod_perl application talking to a PostgreSQL database on the same host, where different users are...
11
by: kiln | last post by:
I am starting a project that may be suitable for vb.net, using windows forms. I want a rich client, thus win forms vs web forms. Most users will access the app data over a LAN, but some will be...
0
by: Ken Allen | last post by:
The MSDN documentation on remote debugging is a bit sparse, to say the least, and there is almost no information available on the 'best' way to configure this. I should note that my development...
1
by: grace01 | last post by:
My php program has no response after migration. Here is the php code: <?php include_once("classes/ets.php"); include_once("classes/em_documents.php"); ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.