Re: ODBC or MS SQL DLL? WAS: Using PHP on Server 2003...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi B.A.T.

On 06 April 2004 at 09:28:20 +0200  (which was 08:28 where I live) Svensson,
B.A.T. (HKG) emanated these words of wisdom

>>>You have made sure that the ms sql extension is available in the
>>>php ini file, as well made sure that the ms sql dll is in the
>>>same directory as php.exe?

>>If possible don't use the mssql extension but use the ODBC one. To my
>>knowledge it has not changed since MSSQL 6.5 and is unreliable. You can
>>run into problems if you run a query and then do a header location.

> I am using php as fast-cgi on the same type of server configuration, i.e.
> Win2003, IIS6, MSSQL server 2000, etc, and have exprienced no real problem
> yet.

> So I am curious about this. Would you like to explain this a little bit more
> in details?

1) You can not do complex queries. e.g.
=============8<=============================================================
begin transaction

set nocount on

declare
  @PerId int
  , @ConId int
  , @DelID int
  , @BilID int

insert into
table1 (id,Name)
Values(42,'A Name')

set @PerId = @@identity

-- other inserts and data manipulation

set nocount off

commit

select
  @PerId PersId
  ,@ConId ContId
  ,@BilId BillId
  ,@DelId DeliId

=============8<=============================================================

2) You sometimes (i.e. not always therefore not reproducible) get a CGI error

if you use header("Location:http://xxx.xxx.xxx.xx";) to redirect address
after a database query, you will sometimes get CGI Error message.

Here is the CGI Error message source code:

=============8<=============================================================

<head><title>Error in CGI Application</title></head>
<body><h1>CGI Error</h1>The specified CGI application misbehaved by not
returning a complete set of HTTP headers. The headers it did return
are:<p><p><pre></pre>

=============8<=============================================================

I have set up two servers at the same time on the same hardware one never
showed this the other would sometimes (about 1 in 7 calls). Guess witch one
was used as the test server and which one was the production server?

-- 
 Thank you for your time,  _______________________________________________
  David                   |    David  Elliott    |   Software Engineer    |
 _________________________|  list@xxxxxxxxxxxxxx | PGP Key ID 0x650F4534  |
| *     <-  Tribble   = <- McTribble Sandwich                             |

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux