Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 08793476B24 for ; Thu, 7 Nov 2002 11:48:18 -0500 (EST) Received: from mail1.ihs.com (mail1.ihs.com [170.207.70.222]) by postgresql.org (Postfix) with ESMTP id 6E757476FBE for ; Thu, 7 Nov 2002 11:35:57 -0500 (EST) Received: from css120.ihs.com (css120.ihs.com [170.207.105.120]) by mail1.ihs.com (8.12.6/8.12.6) with ESMTP id gA7GYJTH000971; Thu, 7 Nov 2002 09:34:19 -0700 (MST) Date: Thu, 7 Nov 2002 09:23:56 -0700 (MST) From: "scott.marlowe" To: YC Nyon Cc: Subject: Re: Can't seem to get Psql and Exec to work together In-Reply-To: <00c901c285b4$37c57490$5340baca@gis> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-MailBodyFilter: Message body has not been filtered X-MailScanner: Found to be clean X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/28 X-Sequence-Number: 1610 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@postgresql.org) >