Loading dynamic library in PHP - php

I tried to execute this command to install Symfony on my localhost
php -r "readfile('http://symfony.com/installer');" > symfony.phar
I got an error message in my Windows machine regarding this.
The error message is PHP Startup: Unable to load dynamic library 'D:\php\php\ext\intl.so' - The specified module could not found.

It is all about the php.ini file. On windows, the dynamic library files usually do not have the extesion .so (linux library) ... you have to have .dll there... and make sure the referenced file exists.

Related

Not able to load php_grpc.dll for php 5.6 in xampp for windows

I am trying to use google cloud php sdk to fetch from google bigtable and found that it requires grpc to be enabled.
So i tried installing grpc on my xampp by downloading dll file from https://pecl.php.net/package/gRPC
I am running PHP version 5.6 on using xampp on my windows machine
I also updated my php.ini file by adding below
extension=php_grpc.dll
I restarted apache and printing phpinfo but i am not able to find grpc module loaded.
I also checked the list of extensions loaded by running php -m command and i get below error.
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_grpc.dll' - The specified module could not be found.
in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_grpc.dll' - The specified module could not be found.
in Unknown on line 0
Can anyone provide me a solution?
I was facing the same issue when installing the Google Ads PHP library on WAMP Server. I solved it downloading a different gRPC version
https://windows.php.net/downloads/pecl/releases/grpc/1.17.0/
Extacted the file and copied on the extensions directory of WAMP and on the php.ini just add the next line
extension=grpc
Restart apache and php. Hope it helps

unable to download composer for xampp version 7.2.0

Greeting developers, I want to learn laravel framework for my project. For that i follow some instruction in google to install it . i should have composer to install it. i try to download composer but there have some errors.the error is
The PHP exe file you specified did not run correctly:
C:\xampp\php\php.exe
The php.ini used by your command-line PHP is: C:\xampp\php\php.ini
A setting in your php.ini could be causing the problem: Either the 'extension_dir' value is incorrect or the dll does not exist.
Program Output:
PHP Warning: PHP Startup: Unable to load dynamic library 'php_mysql.dll' (tried: C:\xampp\php\ext\php_mysql.dll (The specified module could not be found.
), C:\xampp\php\ext\php_php_mysql.dll.dll (The specified module could not be found.
)) in Unknown on line 0
i try to resolve it. i check the php.ini file all looking good only. Is that because of i am using xampp server 7.2.0. I am really need a solution.
Looks like you made a mistake on your php.ini somewhere, this route:
C:\xampp\php\ext\php_php_mysql.dll.dll
... doesnt look at all correct. "php_php" ".dll.dll"

yaml xampp warning: Unable to load dynamic library 'C:\xampp\php\ext\php_yaml.dll'

I installed the recent versions of xampp for windows and yaml on my PC with windows 8.1 64bit.
The versions were
xampp-win32-7.0.9-1-VC14-installer.exe
php_yaml-2.0.0rc8-7.0-ts-vc14-x86.zip
I put the line of extension=php_yaml.dll to the end of php.ini file.
I copied php_yaml.dll to C:/xampp/php/ext folder.
I copied yaml.dll to C:/xampp/apache/bin folder.
phpinfo(); command displayed that yaml was enabled.
But bad warning still appeared on command prompt when typing php command:
$ php
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_yaml.dll' - The spec
ified module could not be found.
in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_yaml.dll' - The specified
module could not be found.
in Unknown on line 0
See it on screenshots:
How to fix it?
Add ;C:\xampp\apache\bin to PATH Windows environment variable.
I fixed mine by downloading the correct version of yaml. The yaml Version has to match the installed PHP version. Make sure that you match the thread-safe and non-thread-safe option with your PHP aswell.
How to check if your PHP is thread-safe

Unable to load dynamic library openssl.so

I just set up PHP and Apache on a Mac 10.8 localhost. So far it works fine.
I am now installing Symfony2. When I run the Composer install command, I get the following error :
$ curl -s http://getcomposer.org/installer | php
#!/usr/bin/env php
Some settings on your machine make Composer unable to work properly.
Make sure that you fix the issues listed below and run this script again:
The openssl extension is missing, which means that secure HTTPS transfers are impossible.
If possible you should enable it or recompile php with --with-openssl
I uncommented the following line in php.ini :
extension=php_openssl.dll
But I still get the same error, preceded by this message :
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20131226/php_openssl.dll' - dlopen(/usr/local/lib/php/extensions/no-debug-non-zts-20131226/php_openssl.dll, 9): image not found in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20131226/php_openssl.dll' - dlopen(/usr/local/lib/php/extensions/no-debug-non-zts-20131226/php_openssl.dll, 9): image not found in Unknown on line 0
There's no openssl.so file in my /usr/local/lib/php/extensions/no-debug-non-zts-20131226/ folder indeed.
I tried reinstalling php but it made no difference. I googled for hours yet I couldn't find a way to recompile php with --with-openssl. Any help would be of great value.

PHP can't find dynamic library but it is on disk

I have to use a PHP extension called ssh2: http://php.net/manual/en/book.ssh2.php
I downloaded the sources, and compiled them. Then I copied the .dll to my php ext directory. Then I added extension=php_ssh2.dll to php.ini and I restarted Apache2 and I got the following error:
PHP Startup: Unable to load dynamic library
'C:\xampp\php\ext\php_ssh2.dll' - The specified module could not be
found
It is weird because I have php_ssh2.dll on that path. Maybe I compiled it in a wrong way?
I am using xampp, by the way. The rest of the extension load correctly.

Categories