When I ran the following code with 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 an exception:
PDOExeption SQLSTATE [HY001] Unable to allocate sufficient memory
But when I run the same code from the php command line, I have no such problems.
What could be the problem?
I am using nginx proxy_pass for the backend (php-fpm).
To connect to MS SQL Server I use Dblib (freetds). All work on the same machine with OpenVZ, Nginx and Php-fpm are different virtual machines.
The php-fpm configuration for the command line and upstream is the same.
iusik source
share