Or am I going to have to upload these files and directories to each folder on the webserver one at a time
quick question about FTP uploading
quick question about FTP uploading
is there a way to copy through FTP? I am installing Serendipity installation files into 50 other folders but when I try a copy command through cuteFTP it says negetive.
Or am I going to have to upload these files and directories to each folder on the webserver one at a time
Or am I going to have to upload these files and directories to each folder on the webserver one at a time
-
lordcoffee
- Regular
- Posts: 308
- Joined: Tue Nov 29, 2005 10:22 pm
- Location: Munich - Germany
- Contact:
There is no copy in FTP. You would need telnet or ssh access for that.
You could consider a little PHP script, though. First, you'll want to modify the zip to remove the serendipity/ directory tree. Then rearchive it in a format your server will understand (probably .tar.gz, although some support zip).
Now you've got an archive, hopefully compressed, with all the files in the top directory. Upload it to your webserver in a directory accessible to the webserver.
Now make a PHP script like this:
You'll have to modify /usr/local/bin/unzip to point to your dearchiving command ('/usr/bin/tar -xvzf' for instance) and you'll have to modify ../serendipity.zip to point to the global copy of the archive (maybe you have to back up two directories, or go to ../archive/serendipity.tgz, or whatever you named it). If you're having trouble finding the unzip program, you can change the system command to 'which unzip', 'which tar', or even 'find / -name "unzip"'.
Save that with a name like unzip.php.
Now make the directories you want to install Serendipity in. FTP the unzip.php into each directory. CHMOD it to executable for your webserver (777 usually works).
In your browser, type the URL for the unzip.php (something like thedomain/thedirectory/unzip.php). Wait. Serendipity unzips, and reports what it's done. It should have all the Serendipity files in the top level of that directory. (If you want a serendipity/ subdirectory, just don't remove it during the rearchiving step.)
Serendipity is now ready to be installed, creating its databases, configuration, and .htaccess files.
Remove the unzip.php file to prevent others from overwriting your customized installation with the default files.
That's how I install my debug copies on my server.
You could consider a little PHP script, though. First, you'll want to modify the zip to remove the serendipity/ directory tree. Then rearchive it in a format your server will understand (probably .tar.gz, although some support zip).
Now you've got an archive, hopefully compressed, with all the files in the top directory. Upload it to your webserver in a directory accessible to the webserver.
Now make a PHP script like this:
Code: Select all
<HEAD><TITLE>UNZIP</TITLE></HEAD>
<BODY>
<B>Unzipping Serendipity</B>
<pre>
<?php
system('/usr/local/bin/unzip ../serendipity.zip');
?>
</pre>
Finished.
</BODY>
Save that with a name like unzip.php.
Now make the directories you want to install Serendipity in. FTP the unzip.php into each directory. CHMOD it to executable for your webserver (777 usually works).
In your browser, type the URL for the unzip.php (something like thedomain/thedirectory/unzip.php). Wait. Serendipity unzips, and reports what it's done. It should have all the Serendipity files in the top level of that directory. (If you want a serendipity/ subdirectory, just don't remove it during the rearchiving step.)
Serendipity is now ready to be installed, creating its databases, configuration, and .htaccess files.
Remove the unzip.php file to prevent others from overwriting your customized installation with the default files.
That's how I install my debug copies on my server.