Laravel Framework中的简单数据库查询出现“堆栈粉碎检测到”错误

时间:2021-11-30 22:44:23

I have a simple route that tests the database connection to a Microsoft SQL Server:

我有一个简单的路由来测试与Microsoft SQL Server的数据库连接:

Route::get('/', function()
{
    $db = DB::Connection("sams")->getPdo();
    $stmt = $db->prepare("SELECT 1");
    $stmt->execute();
    while($row = $stmt->fetch()) {
        echo
        print_r($row);
    }
    var_dump($db);

});

I'm on Fedora 20, using unixODBC and FreeTDS to connect to the database. Here's what versions of things I'm running (package versions):

我在Fedora 20上,使用unixODBC和FreeTDS连接数据库。这是我正在运行的东西的版本(包版本):

php.x86_64           5.5.7-1.fc20       @updates                           
php-bcmath.x86_64    5.5.7-1.fc20       @updates                           
php-cli.x86_64       5.5.7-1.fc20       @updates                           
php-common.x86_64    5.5.7-1.fc20       @updates                           
php-devel.x86_64     5.5.7-1.fc20       @updates                           
php-gd.x86_64        5.5.7-1.fc20       @updates                           
php-mcrypt.x86_64    5.5.7-1.fc20       @updates                           
php-mssql.x86_64     5.5.7-1.fc20       @updates                           
php-odbc.x86_64      5.5.7-1.fc20       @updates                           
php-pdo.x86_64       5.5.7-1.fc20       @updates                           
php-pear.noarch      1:1.9.4-23.fc20    @fedora                            
php-pecl-jsonc.x86_64 1.3.3-1.fc20      @updates                           
php-pecl-jsonc-devel.x86_64  1.3.3-1.fc20  @updates                           
php-process.x86_64   5.5.7-1.fc20       @updates                           
php-xml.x86_64      5.5.7-1.fc20        @updates
freetds.x86_64      0.91-9.gitb760a89.fc20 @fedora                            
freetds-devel.x86_64 0.91-9.gitb760a89.fc20  @fedora
unixODBC.x86_64      2.3.2-2.fc20       @fedora                            
unixODBC-devel.x86_64  2.3.2-2.fc20     @fedora

Here's my odbc.ini (obfuscated):

这是我的odbc.ini(混淆):

[SAMS]
Driver  = TDS
Description = SAMS Database
Servername = {Servername}
Port   = {Port}
Password = {password}

odbcinst.ini:

[TDS]
Description     = FreeTDS.org
Driver          = /usr/lib64/libtdsodbc.so
Setup           = /usr/lib64/libtdsS.so
FileUsage       = 1

freetds.conf:

[SAMS]
Trace = Yes
TraceFile = /home/njones/sql.log
ForceTrace = Yes
host = {ipaddress}
port = {port}
tds version = 8.0

However, when I test this in the Laravel Development Server, I get the error below.

但是,当我在Laravel Development Server中测试时,我得到以下错误。

*** stack smashing detected ***: /usr/bin/php terminated

1 个解决方案

#1


0  

Installing PHP 5.5.8 fixed this problem.

安装PHP 5.5.8修复了这个问题。

#1


0  

Installing PHP 5.5.8 fixed this problem.

安装PHP 5.5.8修复了这个问题。