| PLEX86 | ||
|
scp a file wo pbuttword FROM remote to local 116Are you sure that copying the file is the right way to approach the problem? To me, it would make more sense to omit the "INTO OUTFILE" clause from the SQL statement. Let the SQL server return the data to the PHP script. Then have the PHP script create the textfile (if a text file is what you really need in the end). scp a file wo pbuttword FROM remote to local 117 Hi Liam, URL: Content: Overview of ssh Ssh sets up a secure connection for logging into a remote machine and for executing commands in a remote machine. The ssh server (sshd) is on the... For example, in the PHP code: $result = mysqlquery( $querystring ) { { fwrite( $outfile, mysqlresult( $result, $row, $col ) ); fwrite( $outfile, "," );or any other field delimeter } fwrite( $outfile, "-n" );finish the row with a newline } That's a quick, rough outline of code that would produce the output in a CSV format. (I don't know what format you're currently using, but the above can probably be modified to suit your needs.) Since the PHP code is running on the webserver as the Apache user, there's no need to copy the output file anywhere. Note that this solution has different security considerations to take into account than your existing method. It may not be any better or worse, just different. Performance shouldn't be terribly different: the total number of bytes transferred is roughly the same. My method transfers it as part of the database data stream whereas yours transfers (approximately) the same number of bytes over rsync or ssh or .... It's just a thought.
|
||||
scp a file wo pbuttword FROM remote to local 117 Linux groups from Newsgroups The #1 Usenet Provider on the Internet
|
||||