Received: from local.iboats.com (IDENT:qmailr@[209.90.117.130]) by hub.org (8.9.3/8.9.3) with SMTP id PAA23531 for ; Thu, 27 Apr 2000 15:56:32 -0400 (EDT) (envelope-from steve@iboats.com) Received: (qmail 6235 invoked from network); 27 Apr 2000 19:56:15 -0000 Received: from weasel.local.iboats.com (HELO weasel) (209.90.117.133) by local.iboats.com with SMTP; 27 Apr 2000 19:56:15 -0000 Message-ID: <002201bfb082$a385b870$85755ad1@iboats.com> From: "Steve Wolfe" To: References: Subject: Re: [SQL] US Date Style Date: Thu, 27 Apr 2000 13:56:12 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6700 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 X-Archive-Number: 200004/623 > I'm having this problem with date fields. I'm using the Postgresql7.0beta4 > and programming in PHP3. When I set the environment variable PGDATESTYLE > to "NonEuropean,SQL" it works, but only if I'm in the Pgsql environment. > When I access through the PHP3 it doesn't work. > > Does anybody have any suggestion that could help me? When you access is via the PHP interface (which, I assume, is running as a CGI program), then you are not running as pgsql, and so any settings you've put into pgsql's startup scripts will not take effect. Determine which user is actually executing the code when accessed normally (hopefully you're using some mechanism to execute scripts as the owner, in which case it will be the owner of the file. Otherwise it will be the user that the web server runs as.) Then, make the appropriate settings in the appropriate scripts for that user. steve