When i run bellow code from php-fpm:
$connect = new PDO("dblib:host=mssql.dev.gm.local;dbname=GeoData","username","password");
try{
$s = $connect->query('[RU].GetTownInfo 4368');
var_dump($s->fetch());
}catch (Exception $e){
var_dump($e->getMessage());
}
I get Exception:
PDOExeption SQLSTATE[HY001] Unable to allocate sufficient memory
But when i run the same code from php command line, i don't have such problems.
What can be the problem?
I use nginx proxy_pass to backend(php-fpm).
To connect to MS SQL Server i use Dblib (freetds). All works in one machine with OpenVZ, Nginx and Php-fpm are different virtual-machines.
Php-fpm config for command-line and upstream are the same.