[solved] Out of memory error in query sybase_connect

hello guys, in this blog post out of memory error in query sybase_connect .osoft SQL Server 2012 database like this:

Help 1:

$mssql=sybase_connect($Host, $User, $Password, "cp1257");
$mssql->query("EXEC AuthLoginList");

Answer :

Manualy Major Error:

PHP Fatal error: Out of memory (allocated 3670016) (tried to allocate 18446744071562067968 bytes) in …

I have no idea many more this get the query why the program wants to reserve such a huge amount haha of memory. 18446744071562068000 Bytes = 16778216 Terabytes!?

….

You specify the sybase_connect method for connecting to SQL Server. Now it depends on what the real implementation is behind this method and what driver will be used for the connection. The sybase_connect method can work, for example, if you use FreeTDS or jTDS drivers (https://www.freetds.org/), you will connect to both Sybase and MSSQL because the TDS protocol is in many parts identical and the implementation of the Microsoft libraries is based on a Sybase standard. But similar memory errors can occur and I have seen this many times, for example, when merging the old version of TDS drivers to the new version of SQL Server. Therefore, check the installed version of the TDS driver. If you are running Windows, you can download a supported driver version for PHP -> MSSQL (https://docs.microsoft.com/en-us/sql/connect/php/download-drivers-php-sql-server).

Leave a Comment