php sybase允许的内存大小耗尽?

时间:2013-05-14 17:33:14

标签: php memory sybase freetds

我在尝试从php运行任何针对Sybase的查询时遇到此问题:

  • PHP 5.4.3(cgi-fcgi)(建于2013年5月9日17:03:23)
  • 内置--with-sybase-ct = / path / to / freetds
  • 代码:

    <?php
    $con = sybase_connect('server', 'user', 'pwd'); //connects fine
    $q = sybase_query("select col=1", $con);        //error here, regardless of SQL
    ?>

  • 输出:
    致命错误:允许的内存大小为134217728字节耗尽(尝试过 分配30064771074字节)

有什么想法吗?

1 个答案:

答案 0 :(得分:0)

尝试将此添加到您的代码中:

<?php
    ini_set("memory_limit","128M");
    $con = sybase_connect('server', 'user', 'pwd'); //connects fine
    $q = sybase_query("select col=1", $con);        //error here, regardless of SQL
    ?>