I have been trying to load the datastax cassandra php-driver on ubuntu (apache web server). I am also running php on hhvm. Now the problem is that I have installed the driver and I have the cassandra extension file located in /usr/lib/php5/20131226/cassandra.so. I have also edited /etc/hhvm/php.ini file to contain:
hhvm.dynamic_extension_path = /usr/lib/php5/20131226
hhvm.dynamic_extensions[cassandra] = cassandra.so
And I have edited /etc/hhvm/server.ini to contain:
hhvm.enable_zend_compat = true.
Now when I start hhvm, I get the following error:
Uncaught exception: Could not open extension /usr/lib/php5/20131226/cassandra.so: /usr/lib/php5/20131226/cassandra.so: undefined symbol: zend_new_interned_string\n.
Could I please get help resolving this issue?
Related
I've been trying to install a php 5.6 driver for mongodb on Ubuntu 12.04. (Will be using this on a Zend Framework 1.11 system, yes this is old, I am fully aware).
I've tried a few things, nothing works.
It seems I should get it to work using this installation:
http://php.net/manual/en/mongodb.installation.manual.php
But for some reason at the make all -j 5 step I get the following error:
In file included from /var/mongotest/mongo-php-driver/src/bson.c:29:0:
./phongo_compat.h:21:30: fatal error: Zend/zend_string.h: No such file or directory
compilation terminated.
In file included from /var/mongotest/mongo-php-driver/src/bson-encode.c:29:0:
./phongo_compat.h:21:30: fatal error: Zend/zend_string.h: No such file or directory
Just install php5.6-dev, it includes all the header files.
Since mongo php driver got deprecated, I decided to upgrade my driver( On local machine of ubuntu running XAMPP stack).
To install mongodb driver, I ran following command
pecl install mongodb
I added extension=mongodb.so on php.ini(/opt/lampp/etc/php.ini).
But on restart lampp is was responding. So I checked the apache logs for error and I am getting this
[14-Mar-2016 09:19:43 Europe/Berlin] PHP Warning: PHP Startup: Unable to load dynamic library '/opt/lampp/lib/php/extensions/no-debug-non-zts-20131226/mongodb.so' - /opt/lampp/lib/php/extensions/no-debug-non-zts-20131226/mongodb.so: symbol CRYPTO_get_locking_callback, version OPENSSL_1.0.0 not defined in file libcrypto.so.1.0.0 with link time reference in Unknown on line 0
I am not getting solution for this, the only option I have rigt now is to use old mongo driver. Can someone help
I want to connect to MongoDB from PHP but I keep getting the fatal error in the title. My PHP version is 5.5.14, architecture x86, thread safety enabled, VC11.
So I downloaded 5.5 Thread Safe (TS) x86 from PECL, extracted php_mongo.dll to the \ext\ folder of my php installation, added extension=php_mongo.dll to the php.ini file, and restarted Apache.
I keep getting the same fatal error when I use either Mongo() and MongoClient().
Also, I can access mongo from CMD, starting it with mongod and then opening another cmd window to handle the database using mongo. I installed PHP and Apache separately (No XAMPP or WAMP) on Windows 8.1 x64.
Installation folders:
Apache: C:\Apache24
PHP: C:\php
MongoDB: C:\Program Files\MongoDB
In the lastest version, you can use new MongoDB\Driver\Manager() to create the obj instead of the MongoClient().
I am trying to install MongoDb on windows platform. I'm using PHP with WampServer.
But while executing the PHP program it gives the following error:
Fatal error: Class 'Mongo' not found in C:\wamp\www\test\index.php on line 19
So is there any way to check whether MongoDB is running with PHP or not ?
Please check php loaded extensions using phpinfo() function whether mongoDB extension is loaded or not.
Do check these as well.
Fatal Error - 'Mongo' class not found
Fatal error: Class 'Mongo' not found in xampp
Add the following line to your php.ini file:
extension=php_mongo.dll
Docs Link: http://php.net/manual/en/mongo.installation.php
Check this possible solution
Copy c:\wamp\bin\php\php-5.3.x\ext\
Edit c:\wamp\bin\apache\Apache2.2.xx\bin\php.ini and add the line where the extensions are loaded.
Why run WAMP on 32bit Windows 7 64bit?
The Mongo PHP driver does not have a 64bit binary win32, if you are running the 64bit version of WAMP, PHP will refuse to load the 32-bit version of php_mongo.dll.
I'm trying to get PHP to load some extensions (sqlsrv driver for PHP PDO).
I'm using a wamp server, With PHP 5.4, Apache 2.4.4.
In my PHP.ini file, i've entered the following line:
extension_dir = C:\wamp\bin\php\php5.4.16\ext
...
extension=php_pdo_sqlsrv_54.nts.dll
However in the apache error log, whenever I restart the apache service, I get the error message:
PHP Warning: PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.4.16/ext/php_pdo_sqlsrv_54_nts.dll' - The specified module could not be found.\r\n in Unknown on line 0
Now, I know for a fact, this error is incorrect. If I copy the file location directly from the error log, (C:\wamp\bin\php\php5.4.16\ext\php_pdo_sqlsrv_54_nts.dll) and paste it into windows explorer, it finds the file fine.
I've added the ext directory to windows PATH environment variable, still no success.
Any ideas what to try next?
Thanks
Your problem is that you are trying to run a NTS 'Not Thread Safe' dll with a PHP that is 'Thread Safe', so initially try downloading the Thread Safe version of the sqlsrv DLL.
BIG NOTE and possibly your next problems solution:
As far as I know the sqlserver database interface dlls are only available as 32bit. So if you have installed the 64bit WAMPServer you will have to uninstall and install the 32bit WAMPServer.