SQL Anywhere 17 & PHP 8.x.y on Linux - php

I want to install PHP SQL Anywhere 17 module for PHP 8.1 version.
I am using the PHP 8.0.0 module provided in the SAP documentation (https://wiki.scn.sap.com/wiki/display/SQLANY/The+SAP+SQL+Anywhere+PHP+Module).
The driver is installed correctly.
However, when I fill in the module path in my apache2/php.ini config like this: extension=/opt/sqlanywhere17/lib64/php-8.0.0_sqlanywhere_r.so the extension does not load.
I also added the environment variable in /etc/apache2/envvars:
LD_LIBRARY_PATH="/opt/sqlanywhere17/lib64:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH
That's all I can find in the SAP documentation.
This is what PHP returns to me:
PHP Warning: PHP Startup: sqlanywhere: Unable to initialize module
Is there anything else to define? Is the SQL Anywhere version for PHP 8.0.0 compatible with a PHP version 8.1.y or even 8.2.y?
I am using a Debian 11.
I tried to initialize the PHP module of SQL Anywhere in the php.ini configuration, I expected to be able to use this module afterwards.

Related

How to fix PHP Warning: PHP Startup: Unable to load dynamic library 'xxx/xxx/yaf.so'?

[26-Nov-2021 21:49:17 Asia/Shanghai] PHP Warning: PHP Startup: Unable to load dynamic library '/Applications/MAMP/bin/php/php5.6.40/lib/php/extensions/no-debug-non-zts-20131226/yaf.so' - dlopen(/Applications/MAMP/bin/php/php5.6.40/lib/php/extensions/no-debug-non-zts-20131226/yaf.so, 0x0009): tried: '/Applications/MAMP/bin/php/php5.6.40/lib/php/extensions/no-debug-non-zts-20131226/yaf.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/lib/yaf.so' (no such file) in Unknown on line 0
You are loading the incorrect version for your PHP Version.
if this is Yet Another Framework
You can only use this on the version of PHP is created for.
for example if your PHP Version is 5.3
You would need a yaf.so to match PHP 5.3
Looking on there GIT this is a 5.2 build, so your PHP Version needs to match this.
Personally i would ditch the 5.3 you are running and install 7.0.
5.3 is very dated, pointless developing anything based on this.
When you have the right version, Place this inside your ext folder in PHP.
Edit your PHP.ini file
add in:
extension=yaf.so
Ensure your extension_dir is configured correctly too:
extension_dir = "ext"
your yaf should be in the same folder as the extension dir, just ensure extension is built for the PHP version you are using, they are not cross compatible

Install php_oci8_11g at Windows 10 IIS 10

Using IIS 10 in Windows 10 and trying to install PHP 5.5.6
I'm getting the following error when doing php -v:
PHP Startup: Unable to load dynamic library ext/php_oci8_11g.dll - The specified module could not be found.
The file exist in C:\php\ext\php_oci8_11g.dll and the extensions variable is defined in php.ini as extension_dir = "ext".
I've installed ODBC driver and Oracle Instant client Version 11.2.0.4.0
When doing phpinfo() I only get in the PDO table PDO drivers: mysql instead of the expected PDO drivers: mysql, oci. And of course, I lack from a table PDO_OCI.
Needless to say my php.ini has extension=php_pdo_oci.dll and extension=php_oci8_11g.dll enabled .
I also tried restarting ISS with issreset and even restarting the computer.
Additionally, I also get this other error:
PHP Startup: Unable to load dynamic library ext\php_pdo_oci.dll - The specified module could not be found.
The file is as well in the extensions folder.
What am I missing?
I was missing placing instantclient_11_2 within the php folde rin C:\php\instantclient_11_2 and adding the path to the PATH environment variable.

PHP Warning: PHP Startup: solr: Unable to initialize module

I'm getting the below warning while adding the solr-client extinctions.
PHP Warning: PHP Startup: solr: Unable to initialize module
Module compiled with module API=20131226
PHP compiled with module API=20121212
These options need to match in Unknown on line 0
can any one Please hep me out in this ?
PHP Warning: PHP Startup: solr: Unable to initialize module
1:Check extension_dir directive in php.ini. It should point to folder with 5.2 modules.
2:This is because PHP extensions are developped in C, and are "close" to the internals of PHP -- which means that, if the APIs of those internals change, the extension must be re-compiled, to use the new versions.
And, between PHP 5.2 and PHP 5.3, for what I remember, there have been some modifications in the internal data-structures used by the PHP engine -- which means extensions must be re-compiled, in order to match that new version of those data-structures.
How to update your PHP extensions will depend on which system you are using.
If you are on windows, you can find the .dll for some extensions here : http://downloads.php.net/pierre/
For more informations about the different versions, you can take a look at what's said on the left-sidebar of windows.php.net.
If you are on Linux, you must either :
Check what your distribution provides
Or use the pecl command, to re-download the sources of the extensions in question, and re-compile them.

PHP ZMQ Extension: Unable to load dynamic library

I'm working on Wampserver on Windows 10.
I'm using an extension called ZMQ. I downloaded the DLLS from:
https://pecl.php.net/package/zmq/1.1.3/windows
I previously used the version of the extension for PHP 5.6 and it worked. The extension however had a bug, so I decided to upgrade my php version to 7.0.4 and try the new version of the extension.
The extension was successfully installed and it appears in the phpinfo(), but when I try to run "php -v" from the command line (or the CLI service that uses the extension), I get the following error: "Warning: PHP Startup: Unable to load dynamic library 'D:/wamp64/bin/php/php7.0.4/ext/php_zmq.dll' - The specified module could not be found.
in Unknown on line 0"
The weird thing is the file "php_zmq.dll" actually exists in the specified path.
Important note: I have the line "extension=php_zmq.dll" in both my "D:\wamp64\bin\apache\apache2.4.18\bin\php.ini" and my "D:\wamp64\bin\php\php7.0.4\php.ini" (which to my understanding is used by the CLI). I can't remove either of those lines because then the extension is removed, or it doesn't work in the CLI.
I had the same problem. using PHP 7.0 x64 TS. I used the exact dll from pecl but same error. all my other extensions load fine and are in the same directory
i followed all instructions on https://superuser.com/questions/585291/installing-zeromq-on-windows-7-wamp-server.
the main updates would be to do the following:
copy libzmq.dll and libsodium.dll to php root dir. (both are found in the pecl zip files.

php starup sqlsrv unable to initialize module

I am trying to connect MSSQL to PHP. i am following this tutorial. Anyway after i added the dll files as described in that tutorial, i get the following warning. How can i solve this ?
php starup sqlsrv unable to initialize module module compiled with module api=20090626 php compiled with module api=20020520 these options need to match
note:i have gone through this post but none helped.
Looks like you've tried to install the sqlsrv extension for php 5.3 on a php 5.2 system.
Either run <?php phpinfo(); ?> and look for the php version and look for the following entries:
PHP Version
Thread Safety
pick the appropriate .dll from the sqlsrv driver: the version number must match and if thread safety is enabled pick the ts version, if not pick the nts version.
For anyone trying to get it to work with PHP 5.5 (PHP compiled with module API=20121212) then you can replace the dlls in the ext folder with new updated binaries >here<
Don't forget to enable the new dlls in the php configuration.
In my case the issue was with multiple php version under an Apache. The php cli loaded another php version's php.ini. The takeaway is: always check the configuration before you dig deeper into the problem.

Categories