Re: OID output problems

From: "Ross J(dot) Reedstrom" <reedstrm(at)wallace(dot)ece(dot)rice(dot)edu>
To: surfer girl <gidget(at)getitgear(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: OID output problems
Date: 2000-05-03 15:27:20
Message-ID: 20000503102720.B16305@rice.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, May 02, 2000 at 10:13:14PM -0800, surfer girl wrote:
> --- "Robert B. Easter" <reaster(at)comptechnews(dot)com> wrote:
> >
> >Try recompiling php 4.0RC1 or whatever is current with the latest Apache
> >source (1.3.12). I'm thinking maybe you are not running php as compiled into
> >the server.
>
> Thanks - I had PHP compiled into the server - though I may try the recompile as a last resort (before the major last resort of just keeping images as files and putting the filename and location into the db).
>
> Someone asked if my INPUT was correct. Here's what I've got:
>
> pg_Exec($conn, "BEGIN");
> $oid = pg_locreate($conn);
> $handle = pg_loopen($conn, $oid, "w");
> pg_lowrite($handle, $file);

Hmm, based on my reading of the php4 docs, this will right the contents of the variable
'file' to the lo, expecting it to be a null terminated string. I'm not sure how you're
supposed to get binary data in there. Is 'file' by any chance, the name of your file,
not the contents?

Ross
--
Ross J. Reedstrom, Ph.D., <reedstrm(at)rice(dot)edu>
NSBRI Research Scientist/Programmer
Computer and Information Technology Institute
Rice University, 6100 S. Main St., Houston, TX 77005

In response to

Browse pgsql-general by date

  From Date Subject
Next Message The Hermit Hacker 2000-05-03 15:57:26 Mail Relay sites ...
Previous Message David R. Favor 2000-05-03 11:11:06 postgresql-7.0RC3: slight compile problem on AIX