freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] mssql_execute(): stored procedure execution failed
- From: Robert Gonzalez <robert AT robert-gonzalez.com>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] mssql_execute(): stored procedure execution failed
- Date: Sat, 22 May 2010 18:07:55 -0700
If possible, take the return from mssql_init() and check it for boolean
false. If it is, try to trap the error returned from the server with
mssql_get_last_message(). All of the errors you see after the mssql_init()
failure are because you are trying to pass a boolean value (in this case, a
FALSE) to functions that expect an initialized stored proc resource handle.
On Fri, May 21, 2010 at 8:11 AM, Sylvain Viart - Gmail <
sylvain.viart AT gmail.com> wrote:
> Hi,
>
>
> > It's unlikely anyone unfamiliar with your environment can help you
> > without a much more detailed definition of "works".
>
> Sorry about that, our problem is that its legacy php code.
>
> I've errors like :
>
> mssql_init(): unable to init stored procedure
>
> But the same page may work if I hit reload.
>
> >> Does it give any error messages when it doesn't work?
>
> PHP Warning: mssql_init(): unable to init stored procedure in
> read_msg.php on line 46
> PHP Warning: mssql_execute() expects parameter 1 to be resource,
> boolean given in read_msg.php on line 47
> PHP Warning: mssql_free_statement() expects parameter 1 to be resource,
> boolean given in read_msg.php on line 48
>
> PHP Warning: mssql_init(): unable to init stored procedure in
> read_msg.php on line 126
> PHP Warning: mssql_bind() expects parameter 1 to be resource, boolean
> given in read_msg.php on line 129
> PHP Warning: mssql_execute() expects parameter 1 to be resource,
> boolean given in read_msg.php on line 131
> PHP Warning: mssql_free_statement() expects parameter 1 to be resource,
> boolean given in read_msg.php on line 132
> PHP Warning: mssql_num_rows() expects parameter 1 to be resource, null
> given in read_msg.php on line 133
>
> >> Does it run but return incorrect results?
>
> not really:
> all is dependent of the previous error failing to init the stored
> procedure.
>
>
> >> What exact differences are there in a server-side trace for
> >> the case where it works compared to the case where it doesn't?
> >>
> Sorry I'm not able to extract part of the log, because I can see where
> it match the failing php statement.
> could you give me clue about setting a less verbose freetds log?
>
> dump file = /tmp/freetds.log
> debug flags = 0x2006
>
> Or any help to isolate the error? (URL ?)
> I'm not freetds familiar, can I restrict logging to a specific vhost?
>
> It's on a production server, if I set debug flags 0x4fff. I got a lot of
> output that I can't use for the moment.
>
> > What exact differences are there in the log between the case that
> > doesn't work and the one that does, or between your old FreeTDS
> > version and the new one?
> >
> I don't know how to do that.
>
>
> We have supposed a problem with encoding, or persistent connection.
> do you have any URL where I can learn about how to trace the error more
> precisely?
>
> Regards
> Sylvain.
>
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>
--
Robert Gonzalez
http://www.robert-gonzalez.com
http://twitter.com/RobertGonzalez
http://www.linkedin.com/in/robertanthonygonzalez
-
[freetds] mssql_execute(): stored procedure execution failed,
Sylvain Viart - Gmail, 05/20/2010
-
Re: [freetds] mssql_execute(): stored procedure execution failed,
Craig A. Berry, 05/20/2010
-
Re: [freetds] mssql_execute(): stored procedure execution failed,
Sylvain Viart - Gmail, 05/21/2010
-
Re: [freetds] mssql_execute(): stored procedure execution failed,
Robert Gonzalez, 05/22/2010
-
Re: [freetds] mssql_execute(): stored procedure execution failed,
Sylvain Viart - Gmail, 05/24/2010
-
Re: [freetds] mssql_execute(): stored procedure execution failed,
Robert Gonzalez, 05/24/2010
-
Re: [freetds] mssql_execute(): stored procedure execution failed,
Sylvain Viart - Gmail, 05/27/2010
- Re: [freetds] mssql_execute(): stored procedure execution failed, Robert Gonzalez, 05/27/2010
- Re: [freetds] mssql_execute(): stored procedure execution failed, Sylvain Viart - Gmail, 05/28/2010
- Re: [freetds] mssql_execute(): stored procedure execution failed, Robert Gonzalez, 05/28/2010
-
Re: [freetds] mssql_execute(): stored procedure execution failed,
Sylvain Viart - Gmail, 05/27/2010
-
Re: [freetds] mssql_execute(): stored procedure execution failed,
Robert Gonzalez, 05/24/2010
-
Re: [freetds] mssql_execute(): stored procedure execution failed,
Sylvain Viart - Gmail, 05/24/2010
-
Re: [freetds] mssql_execute(): stored procedure execution failed,
Robert Gonzalez, 05/22/2010
-
Re: [freetds] mssql_execute(): stored procedure execution failed,
Sylvain Viart - Gmail, 05/21/2010
-
Re: [freetds] mssql_execute(): stored procedure execution failed,
Craig A. Berry, 05/20/2010
Archive powered by MHonArc 2.6.24.