NYCPHP Meetup

NYPHP.org

[nycphp-talk] Kinda OT: Open Office tied into MySQL

John Lacey jlacey at att.net
Mon Feb 9 11:07:27 EST 2004



Chris Bielanski wrote:

> I've been tasked with looking at the prospect of using OpenOffice to tie
> into MySQL as an Access-like application. The premise being that we could
> use OpenOffice to do design and data-capture on the front end, and on the
> back end, use it to administer and run reports.
> 
> I'd like to knwo if anyone could share their experiences of doing this or
> something like it with OpenOffice, and I'd really appreciate if I could get
> any resources you people may have found useful in researching or
> implementing this process.
> 

there's a .pdf with some info at this url

http://documentation.openoffice.org/thirdparty.html

John


>From hans not junk at nyphp.com  Mon Feb  9 11:31:44 2004
Return-Path: <hans not junk at nyphp.com>
Received: from ehost011-1.exch011.intermedia.net (unknown [64.78.21.3])
	by virtu.nyphp.org (Postfix) with ESMTP id 89927A8602
	for <talk at lists.nyphp.org>; Mon,  9 Feb 2004 11:31:44 -0500 (EST)
X-MimeOLE: Produced By Microsoft Exchange V6.5.6944.0
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Subject: RE: [nycphp-talk] upload file to remote server via form
Date: Mon, 9 Feb 2004 08:31:36 -0800
Message-ID: <41EE526EC2D3C74286415780D3BA9F877723C5 at ehost011-1.exch011.intermedia.net>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: [nycphp-talk] upload file to remote server via form
Thread-Index: AcPvItO7ZzsU1qt3T7qz4vTa+9R77QABxAeA
From: "Hans Zaunere" <hans not junk at nyphp.com>
To: "NYPHP Talk" <talk at lists.nyphp.org>
X-BeenThere: talk at lists.nyphp.org
X-Mailman-Version: 2.1.2
Precedence: list
Reply-To: NYPHP Talk <talk at lists.nyphp.org>
List-Id: NYPHP Talk  <talk.lists.nyphp.org>
List-Unsubscribe: <http://lists.nyphp.org/mailman/listinfo/talk>,
	<mailto:talk-request at lists.nyphp.org?subject=unsubscribe>
List-Archive: <http://lists.nyphp.org/pipermail/talk>
List-Post: <mailto:talk at lists.nyphp.org>
List-Help: <mailto:talk-request at lists.nyphp.org?subject=help>
List-Subscribe: <http://lists.nyphp.org/mailman/listinfo/talk>,
	<mailto:talk-request at lists.nyphp.org?subject=subscribe>
X-List-Received-Date: Mon, 09 Feb 2004 16:31:45 -0000

> i currently have a functioning script that allows the visitor to the
web
> site to fill out a form, select a file and upload all of the contents
to the
> server.  the text goes into a database and the file to the=20
> file system.
>=20
> now the script needs to have the ability to send that file to not just
the
> local file system but remote file systems as well.
>=20
> it doesn't look like move_uploaded_file() can get the job done, only
> allowing you to move the file out of the tmp directory and to=20
> the local file system.
>=20
> then there's the idea of first using move_uploaded_file() and then
using
> ftp_put() to get it over to the other server.  but that doesn't seem
too
> elegant and i'm wondering if there's a slicker way.
>=20
> i looked at the PEAR package page for HTTP_Upload and it doesn't seem
to
> offer this kind of support.  I did a quick search on PHP Classes as
well and
> it doesn't seem to offer a solution either.

It depends... how is the remote file system accessible?  If SSH is
present, you could do the following in PHP:

`scp /local/file username at host.com:/remote/directory`;

This assumes you would have a shared key between the local server and
the remote server (so you don't have to enter the password).  If this is
not the case, you could use popen() instead of the backs, which would
allow you to write the password to scp stdin.

If ssh is not available, then there's FTP of course (which isn't nearly
as secure as scp, obviously).  If the remote box has HTTP, you could
post the file to it, with a script to handle it on the remote end.  If
there's NFS...  rsync... cvs...  all depends what services are available
:)

H




More information about the talk mailing list