简体   繁体   English

PHP在执行mssql_query时导致分段错误

[英]PHP causes segmentation fault when executing an mssql_query

I have a shell program that loops a PHP script. 我有一个循环PHP脚本的Shell程序。 The PHP script is long and has many includes and defined functions, but one function calls PHP脚本很长,有许多包含和定义的函数,但是一个函数调用

$result_sql = mssql_query($sql);

The $sql code is executed in MSSQL query analyzer and runs successfully. $ sql代码在MSSQL查询分析器中执行并成功运行。 The function, when called independently from a small php script works. 该函数在从小型php脚本独立调用时有效。 When adding it to the large script, PHP errors with a segmentation fault. 将其添加到大脚本中时,PHP会出错并出现分段错误。 How would one troubleshoot the segmentation fault? 如何解决分段错误? PHP usually displays errors encountered when display_errors(); PHP通常显示display_errors();时遇到的错误。 is set to E_NOTICE, but no error description is displayed when PHP segfaults. 设置为E_NOTICE,但PHP段错误时不显示错误描述。

Thanks for any advice. 感谢您的任何建议。

I got the same problem but launching a mssql stored procedure with PDO statement (statement->prepare / statement->bindParam / statement->execute()) 我遇到了同样的问题,但是用PDO语句启动了一个mssql存储过程(statement-> prepare / statement-> bindParam / statement-> execute())

it seems to be a php bug from the library 它似乎是库中的php错误

must notice though that if i change the stored procedure removing some try/catch and other parts, it works smoothly.. 必须注意的是,如果我更改存储过程以除去一些try / catch和其他部分,则它会顺利运行。

i'll try to split the procedure in few procedures or viceversa (because the original one used to call other SP) hope to let you know soon 我将尝试将该过程分为几个过程,反之亦然(因为原来的过程曾用于调用其他SP),希望尽快通知您

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM