472,986 Members | 2,920 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,986 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 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
5 2835
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
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: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

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.