I'm integrating the azure-storage-cpp library in some custom c/c++ code for some high-performance web applications, which is using Azure Table Storage to read/write data. The c++ code is being compiled into a .so library, which is then being called by a PHP application running via apache on an Ubuntu webserver. I'm using SWIG to generate the interface between the C++ code and PHP.
In earlier versions I've had no issues with this code. But since updating to the latest version I'm finding that the application hangs indefinitely when calling the asynchronous function (e.g. table.exists(), table.create_if_not_exists(), etc). The strange thing is that this only occurs when calling the php file through a web browser (or curl request). However, calling from the apache command line works without any issues. I've compared the php.ini files and have found no differences in the configurations for CLI and Apache. I've also tried adding logging, but nothing is reported.
I'm wondering if there is a bug that might block asynchronous requests via Apache. The ubuntu server is not running selinux and I can't seem to find any reason why such a request might be blocked.
I've attached a test project that will create the C++ and PHP application.
To run: sudo ./build_azure_test.sh
In test.php, make sure to set your Azure storage account and key.
To test via PHP CLI: sudo -u www-data php -f test.php
To test vai web-browser, visit: http://mywebsite.com/test.php
If table is successfully created, you should see the output:
azure test result = succeeded
azure_test.tar.gz