From: | "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com> |
---|---|
To: | YC Nyon <ycnyon(at)pd(dot)jaring(dot)my> |
Cc: | <pgsql-php(at)postgresql(dot)org> |
Subject: | Re: Can't seem to get Psql and Exec to work together |
Date: | 2002-11-07 16:23:56 |
Message-ID: | Pine.LNX.4.33.0211070922570.29371-100000@css120.ihs.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-php |
You probably need to adda -U switch to tell postgresql who you are trying
to connect as. It's likely that psql is passing the current user name
that your web server is running as and postgresql doesn't know who that
is.
psql.exe -U username -d Geoprocessing -f filename.sql
should work.
On Thu, 7 Nov 2002, YC Nyon wrote:
> I am trying to run Postgresql's psql using Exec() command.
> The code is below
>
> <?
> $convert_sql_2 = "\"C:\postgresql\bin\psql.exe -d Geoprocessing -f
> C:\\postgresql\\bin\\g126.sql";
> exec($convert_sql_2,$ds);
> ?>
>
> It didn't insert the data I hope it would. I tested it from the dos command
> line and it works fine.
> also i used
> $convert_sql_2 = "\"C:\postgresql\bin\psql.exe --help";
> passthru($convert_sql_2,$ds);
> It works, giving me the help options.
>
> Nyon
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>
From | Date | Subject | |
---|---|---|---|
Next Message | scott.marlowe | 2002-11-07 16:52:51 | Re: [Fwd: [ph-linux-newbie] help on cron] |
Previous Message | Joseph Syjuco | 2002-11-07 16:02:26 | [Fwd: [ph-linux-newbie] help on cron] |