Cassandra PHP libcassandra.so.2: cannot open shared object file - php

So I have spent the best part of the day trying (and failing) to get the php driver for apache cassandra to install on my server (CentOS 7).
After a lot of mucking about and a few grey hairs i have finally got the driver to install but unfortunately it doesnt actually load.
In my apache Error log i get
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/cassandra.so' - libcassandra.so.2: cannot open shared object file: No such file or directory in Unknown on line 0
I have checked and the libcassandra.so.2 file does indeed exist in /usr/local/lib64/libcassandra.
Has anyone come across a similar ptoblem?
Any help would be appreciated.
Im Running CentOS 7 and PHP 5.4.16 and Apache 2.4.6
Thanks
Matt.

the problem i was having was that libcassandra was installed into /usr/local/lib64 not /usr/lib64
a simple ln -s /usr/local/lib64/libcassandra.so.2 /usr/lib64/libcassandra.so.2 command fixed the problem

Related

Connect to db2 database with php 7.1.8 using xampp on windows

I have a problem. I am trying to query the db2 database with php 7 on Windows. So I have read a lot about connecting to db2 etc, and I have tried a lot of things and still I have the problem.
This is php.ini file:
extension=php_ibm_db2.dll
And this is an error I get every time:
[05-Oct-2017 13:44:55 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_ibm_db2.dll' - The specified module could not be found. in Unknown on line 0
I have tried both versions thread safe and non thread safe, but I can't get it to work.
I have done it with the php version 5.5.38 but I would like to use the latest one.
Additional information:
I am running the windows 10 64bit.
I have downloaded 1.9.9 dll from the pecl library.
I have put it in the php.ini where all the other extensions are and in the following folder described down:
Of course there is the file in the php\ext\php_ibm_db2.dll
I am the administrator, so permissions are full.
Please if you have some solutions tell me.
Thanks in advance.

Softaculous installer.php

I am currently trying to install Softaculous on a web server (we use Hosting Controller Panel). I have an issue when running the installer.php file as directed in the instructions on the Softaculous web site.
The instructions say to open cmd and run C:\path\to\php.exe C:\softaculous\installer.php
When I do this I am given several error messages but the main issue I see is the installer.php is looking in the wrong directory (an older install of PHP) for ionCube loaders. Here is what I believe is the relevant portion of the command.
C:\Program Files (x86)\iis express\PHP\v5.6> php.exe C:\softaculous\installer.php
Failed loading C:\PHP\ext\ioncube_loader_win_5.6.dll
Failed loading C:\Program Files (x86)\PHP\v5.6\ext\ioncube_loader_win_5.6.dll
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\PHP\ext\php_curl.dll' - The specified procedure could not be found. in Unknown on line 0*
You will notice that in bold the installer is trying to load PHP from a directory that I didn't specify, can anyone tell me why or how I might go about fixing this.
I have sought help from Softaculous and all they could tell me is PHP is not installed correctly.
Thank you in advance for any help you can offer I have been working on this problem for over a month.
use ampps http://www.ampps.com/
ampps have softaculous in it for windows

Zend Server 8 PDO could not find driver via CLI

I installed Zend Server 8, and I need to run scripts that use MySQL via the command line.
I get this error when I run one of my CLI scripts:
PDOException
could not find driver
But everything works via http, problem only occurs in CLI. I know there is a different php.ini for the CLI. However, when i reference the php.ini that the server uses for http like this:
php -c/usr/local/zend/etc/php.ini my-script
I get this:
Warning: PHP Startup: Unable to load dynamic library
/usr/local/zend/lib/php_extensions/pdo.so' -
/usr/local/zend/lib/php_extensions/pdo.so:
cannot open shared object file:
No such file or directory in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library /usr/local/zend/lib/php_extensions/readline.so' - /usr/local/zend/lib/php_extensions/readline.so:
cannot open shared object file:
No such file or directory in Unknown on line 0
Fatal error: Class 'PDO' not found in /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php on line 155
I have no idea how to troubleshoot this. I use Ubuntu 14.04 if that makes a difference.
It might also be useful to say that I installed LAMP first like this:
sudo apt-get install lamp-server^ and then I installed Zend Server
Any suggestions?
Thank you.
I ended up just changing the php alias to the php that was installed by Zend Server like this:
alias php=/usr/local/zend/bin/php
This seems to work, but still looking for a better/proper solution.

Difficulties installing php enchant on Windows

Okay, I've read the php.net docs, I've browsed numerous sites including stackoverflow for solutions and nothing has helped. So I'm asking, is there anyone who can post a definitive guide for getting enchant to work on Windows?
My set up is:
Windows 7
WAMP Server 2.0
PHP 5.3.0
PHP is located in
C:/wamp/bin/php/php5.3.0
I downloaded the php_enchant.dll from http://downloads.php.net/pierre/php_enchant-1.1.0-5.3-vc9-x86.zip and unzipped its contents. I did as the readme stated and
moved php_enchant.dll into C:/wamp/bin/php/php5.3.0/ext (my
extensions path)
moved all other dll files into C:/wamp/bin/php/php5.3.0
added extension=php_enchant.dll to my php.ini
restarted httpd
For dictionaries, I followed the first answer here PHP: Enchant Spell Checking not working. Configuration in Windows?
I downloaded the correct dictionary zips from Mozilla
I placed them inside of C:/wamp/bin/php/php5.3.0/share/myspell/dicts
After all of this trying to run
enchant_broker_init();
gives a fatal error. I really don't know what else to do. If anyone can give me some advice I'd really appreciate it.
Edit: Okay so my apache error log gives the following error
PHP Warning: PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.3.0/ext/php_enchant.dll' - The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail.\r\n in Unknown on line 0 <b>Warning</b>: PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.3.0/ext/php_enchant.dll' - The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail.in <b>Unknown</b> on line <b>0</b>[Wed Mar 05 15:28:02 2014] [notice] Child 6128: Child process is running
Pulling out my hair now.
Do you really mean WAMPServer 2.0?
That enchant was compiled with VC9, check that your PHP and Apache were also compiled with VC9, if not you need an enchant dll that was compiled with the same compiler as your Apache and PHP.
As you have PHP5.3.0 I would guess they are compiled with VC6.
Had the same problem. Add PHP path to Windows PATH variable and restart wampserver.

PHP loading extensions error

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.

Categories