On Thu, 15 Jun 2006 15:25:54 +1000, Kim Kohen <[EMAIL PROTECTED]> wrote:


On 15/06/2006, at 2:47 PM, Mark Davis wrote:

You should be able to make a directory (named whatever), and recursively copy files from the directory you want copied, to the new one. See PHP's copy function http://au3.php.net/copy , otherwise you can use PHP's 'exec' function as well and do 'mkdir' & 'cp' commands. Of course, you will need to have permissions for all of this too.
••••
I'm using (PHP's) copy now but it's not working properly (it's a long story). I create the directories and then move all the files but for whatever reason, they get hosed in the process. (They're actually php files I'm duplicating and some of the HTML breaks). If I do a straight copy in the Finder it works perfectly but using mkdir and copy doesn't :(


This sounds like permissions might be the cause, the web server will be performing operations as the user it is running as (apache or nobody), not as you :) so you'll need to either add apache to a group or make the directory writeable by it... either that and/or PHP is configured to run in safe mode where you can't use exec().


Otherwise, can your application talk FTP, SSH or even telnet? Otherwise another suggestion.. write your own service in RB that listens on a different port to the web webservice - modify the "write your own webserver" RB example http://www.macdevcenter.com/ pub/a/mac/2004/11/19/realbasic.html?page=1) and then you can use RB methods!
••••
Sounds a bit complex for what I need. I took a look at exec and the possibility of using shell scripts but if I can find how to pass a simple variable from a URL to an Applescript I'll have it solved in 30 seconds flat.


I was intrigued to know if you could have applescripts as cgi scripts.. sounds handy, have you seen these pages? Seems it can be done quite easily.

http://www.apple.com/applescript/guidebook/sbrt/pgs/sbrt.12.htm
http://hacks.oreilly.com/pub/h/324
http://www.lib.tsinghua.edu.cn/chinese/INTERNET/CGI/Cgi24fi.htm <- seems v good!

- Mark

cheers

kim


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to