Re: Re: mssql_execute problems...
| From: | Adam Voigt | Date: | Tue, 29 Jul 2003 12:41:08 +0000 |
| Subject: | Re: Re: mssql_execute problems... | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-157293@lists.php.net to get a copy of this message | ||
I would suggest you give the ODBTP extension a try:
http://odbtp.sf.net
It's designed to be a replacement for the FreeTDS
MSSQL functions, I haven't experimented with it
much, but so-far it looks stable and well-documented.
On Mon, 2003-07-28 at 13:02, T. Rader wrote:
> Thanks for the reply. I gave it a try and still have the same problem. I
> have FreeTDS logging enabled, but the logs do not show anything useful. A
> connection is made to the server, and the database is selected correctly.
> Then, the log shows an outgoing connection. After that, nothing.
>
> We have used SQL Profiler to trace the incoming connection, and it pushes
> through correctly when mssql_query() is used. However, when mssql_execute()
> is used, the Profiler does not detect anything. It appears that the problem
> is with the mssql_execute() function as everything operates correctly up
> until the execution of this function. I am not sophisticated enough to be
> able to verify this however.
>
> I have also tried to downgrade to FreeTDS 0.53 but then PHP does not
> recognize all of the mssql functions...
>
> If it helps, following is the FreeTDS log:
> 2003-07-28 11:44:11 Connecting addr 10.0.0.220 port 1433
> 2003-07-28 11:44:11 inside tds_process_login_tokens()
> Received header @ 2003-07-28 11:44:11
> 0000 04 01 01 8d 00 ab 01 00 |........|
>
>
> Received packet @ 2003-07-28 11:44:11
> 0000 e3 1f 00 01 08 48 00 65 00 72 00 69 00 74 00 61 |.....H.e. r.i.t.a|
> 0010 00 67 00 65 00 06 6d 00 61 00 73 00 74 00 65 00 |.g.e..m.a .s.t.e.|
> 0020 72 00 ab 70 00 45 16 00 00 02 00 27 00 43 00 68 |r..p.E... ..'.C.h|
> 0030 00 61 00 6e 00 67 00 65 00 64 00 20 00 64 00 61 |.a.n.g.e. d. .d.a|
> 0040 00 74 00 61 00 62 00 61 00 73 00 65 00 20 00 63 |.t.a.b.a. s.e. .c|
> 0050 00 6f 00 6e 00 74 00 65 00 78 00 74 00 20 00 74 |.o.n.t.e. x.t. .t|
> 0060 00 6f 00 20 00 27 00 48 00 65 00 72 00 69 00 74 |.o. .'.H. e.r.i.t|
> 0070 00 61 00 67 00 65 00 27 00 2e 00 0b 53 00 51 00 |.a.g.e.'. ...S.Q.|
> 0080 4c 00 2d 00 52 00 2d 00 57 00 45 00 42 00 30 00 |L.-.R.-.W .E.B.0.|
> 0090 31 00 00 00 00 e3 08 00 07 05 09 04 d0 00 34 00 |1........ .....4.|
> 00a0 e3 17 00 02 0a 75 00 73 00 5f 00 65 00 6e 00 67 |.....u.s. _.e.n.g|
> 00b0 00 6c 00 69 00 73 00 68 00 00 ab 70 00 47 16 00 |.l.i.s.h. ..p.G..|
> 00c0 00 01 00 27 00 43 00 68 00 61 00 6e 00 67 00 65 |...'.C.h. a.n.g.e|
> 00d0 00 64 00 20 00 6c 00 61 00 6e 00 67 00 75 00 61 |.d. .l.a. n.g.u.a|
> 00e0 00 67 00 65 00 20 00 73 00 65 00 74 00 74 00 69 |.g.e. .s. e.t.t.i|
> 00f0 00 6e 00 67 00 20 00 74 00 6f 00 20 00 75 00 73 |.n.g. .t. o. .u.s|
> 0100 00 5f 00 65 00 6e 00 67 00 6c 00 69 00 73 00 68 |._.e.n.g. l.i.s.h|
> 0110 00 2e 00 0b 53 00 51 00 4c 00 2d 00 52 00 2d 00 |....S.Q.L .-.R.-.|
> 0120 57 00 45 00 42 00 30 00 31 00 00 00 00 ad 36 00 |W.E.B.0.1 .....6.|
> 0130 01 07 01 00 00 16 4d 00 69 00 63 00 72 00 6f 00 |......M.i .c.r.o.|
> 0140 73 00 6f 00 66 00 74 00 20 00 53 00 51 00 4c 00 |s.o.f.t. .S.Q.L.|
> 0150 20 00 53 00 65 00 72 00 76 00 65 00 72 00 00 00 | .S.e.r.v .e.r...|
> 0160 00 00 08 00 00 c2 e3 13 00 04 04 34 00 30 00 39 |......... ..4.0.9|
> 0170 00 36 00 04 34 00 30 00 39 00 36 00 fd 00 00 00 |.6..4.0.9 .6.....|
> 0180 00 00 00 00 00 |.....|
>
>
> 2003-07-28 11:44:11 inside tds_process_default_tokens() marker is e3
> 2003-07-28 11:44:11 inside tds_process_default_tokens() marker is ab
> 2003-07-28 11:44:11 inside tds_process_default_tokens() marker is e3
> 2003-07-28 11:44:11 inside tds_process_default_tokens() marker is e3
> 2003-07-28 11:44:11 inside tds_process_default_tokens() marker is ab
> 2003-07-28 11:44:11 inside tds_process_default_tokens() marker is e3
> 2003-07-28 11:44:11 increasing block size from 4096 to 4096
> 2003-07-28 11:44:11 inside tds_process_default_tokens() marker is fd
> 2003-07-28 11:44:11 leaving tds_process_login_tokens() returning 1
> Sending packet @ 2003-07-28 11:44:11
> 0000 01 01 00 2a 00 00 01 00 73 00 65 00 74 00 20 00 |...*....s .e.t. .|
> 0010 74 00 65 00 78 00 74 00 73 00 69 00 7a 00 65 00 |t.e.x.t.s .i.z.e.|
> 0020 20 00 38 00 30 00 30 00 30 00 | .8.0.0.0 .|
>
> Received header @ 2003-07-28 11:44:11
> 0000 04 01 00 11 00 ab 01 00 |........|
>
> Received packet @ 2003-07-28 11:44:11
> 0000 fd 00 00 be 00 00 00 00 00 |......... |
>
> 2003-07-28 11:44:11 processing result tokens. marker is fd
>
> Thanks in advance for any help.
>
> Tom
>
> "Adam Voigt" <adam@cryptocomm.com> wrote in message
> news:1059408795.12386.3.camel@beowulf.cryptocomm.com...
> > Umm, try setting TDSVER to 8.0 is all I could say to try.
> >
> >
> >
> > On Mon, 2003-07-28 at 12:10, T. Rader wrote:
> > > Any takers on this?
> > > "T. Rader" <thoth@monkeymedic.com> wrote in message
> > > news:20030725181011.56828.qmail@pb1.pair.com...
> > > > Hey,
> > > >
> > > > System: RH9, Apache 1.3.27, PHP 4.3.2, FreeTDS 0.61 connecting to a
> Win2K
> > > > Server, MSSQL Server 2K
> > > >
> > > > Problem: mssql_execute hangs when run. The script just never comes
> back.
> > > > The code is as follows:
> > > > $macn = mssql_connect("SERVER", "UID", "PWD");
> > > > mssql_select_db("DB");
> > > > $stmt = mssql_init("dbo.Grade2_GET", $macn);
> > > > $result = mssql_execute($stmt);
> > > >
> > > > I have compiled PHP with the --with-mssql option so it does find the
> > > > functions. Also, the Stored Proc will run just fine if executed via
> > > > mssql_query(). But, I have some stored procedures that have output
> > > > parameters and thus I need to use mssql_execute(). I have searched
> rather
> > > > extensively on the 'net, and have seen a couple of posts about people
> > > saying
> > > > that it works correctly for them, but I am unable to get it to work.
> I
> > > have
> > > > even gone as far as to try the nightly build of FreeTDS (0.62) just to
> > > see.
> > > > Also, my env for TDSVER = 7.0 per documentation
> > > >
> > > > Does anyone have any ideas? I am currently stumped and cannot seem to
> > > find
> > > > any answers via research...
> > > >
> > > > TIA,
> > > > Tom
> > > >
> > > >
> > > >
> > --
> > Adam Voigt (adam@cryptocomm.com)
> > Linux/Unix Network Administrator
> > The Cryptocomm Group
> >
--
Adam Voigt (adam@cryptocomm.com)
Linux/Unix Network Administrator
The Cryptocomm Group