Hey i am using xampp php 7.1
i am trying to install php_trader extension but
its showing me
Warning: PHP Startup: Unable to load dynamic library
'C:\xampp\php\ext\php_trader.dll
which i have downloaded this from here
https://pecl.php.net/package/trader/0.4.0/windows
How do i install correctly
rather than downloading the the extension from the website, you can install it using PEAR, in xampp it should be present in the /xampp/php/pear, using,
Now open a command line and cd into /xampp/php/
try executing either one of the below commands. this will try to install the extension into the system.
pear install trader
pear have a bug related to the .tar archives, please find a solution here
Related
I have a question that might point to a misunderstanding I have with Homebrew in relation to MongoDB:
I am running XAMPP (version) with PHP 7.2.1 (which I want to use) on Mac OSX 10.12.6 (Sierra). I installed MongoDB and created configuration and data storage folder. It runs fine on command line (when using mongod and mongodb by terminal).
Now, I want to install the PHP driver for PHP 7.2.1. I followed the instructions on http://php.net/manual/en/mongodb.installation.homebrew.php
and adapted them to version 7.2, therefore:
$ brew tap homebrew/homebrew-php
$ brew install php72-mongodb
this creates a php72 and a php72-mongodb folder in /usr/local/Cellar. However, my original (XAMPP based) PHP is in /Applications/XAMPP/ and the php there is in /Applications/XAMPP/etc/php.ini.
and simply adding:
extension="/usr/local/opt/php72-mongodb/mongodb.so"
won't do the trick. After adding this extension, Apache won't start any more. /Applications/XAMPP/logs/php_error.log shows the following error:
[27-Feb-2018 13:11:59 UTC] PHP Warning:
PHP Startup: Unable to load dynamic library 'mongodb.so'
(tried: /Applications/XAMPP/xamppfiles/lib/php/extensions
/no-debug-non-zts-20170718/mongodb.so
(dlopen(/Applications/XAMPP/xamppfiles/lib/php/extensions/
no-debug-non-zts-20170718/mongodb.so, 9): image not found),
/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-
20170718/mongodb.so.so
(dlopen(/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-
non-zts-20170718/mongodb.so.so, 9): image not found)) in Unknown on
line 0
What is the correct way to include/connect the driver I just installed with my existing XAMPP installation? Do I need to tell Homebrew somehow where my XAMPP install is?
Given that I also have a php folder in my Homebrew (and my /usr/local/opt folder) indicates that I have a second PHP installation right now. Is this the way it is supposed to be?
The PHP version coming with MAMP is incomplete, you need to get the full version here.
Then, replace your local include folder, with the include folder of that downloaded version.
Go to your terminal and run ./configure, this will install full copy of your MAMP php.
Now that you have prepared the PHP directory, install the mongodb extension:
cd /Applications/MAMP/bin/php/php(your version ex: 7.2)/bin
and then run pecl to install mongodb extension
./pecl install mongodb
Now you have installed mongodb but your php should know this.
Go to php.ini file and search for ;Extension
Under this add extension=mongodb.so
Then restart your server and you are good to go, I hope this helps!
I have installed the lastest mongodb php driver on linux centos 6 with plesk onyx using the following commands.
yum install plesk-php56-devel make gcc openssl-devel
/opt/plesk/php/5.6/bin/pecl install mongodb
echo "mongodb.so" > /opt/plesk/php/5.6/etc/php.d/mongodb.ini
plesk bin php_handler --reread
I have also added extension=mongodb.so to the php.ini file.
I also changed the cli version from php 5.3 to 5.6 before running the install as php needed to be at least 5.4 for the install to continue.
The mongodb section in now in my phpinfo() page. However the extension is not loaded when I test it in a php page.
When I try to reinstall I get this message:
PHP Warning: PHP Startup: Unable to load dynamic library
'/opt/plesk/php/5.6/lib64/php/modules/mongo.so' -
/opt/plesk/php/5.6/lib64/php/modules/mongo.so: cannot open shared
object file: No such file or directory in Unknown on line 0
pecl/mongodb is already installed and is the same as the released
version 1.2.9 install failed
Also, the line that says /opt/plesk/php/5.6/lib64/php/modules/mongo.so
refers to mongo.so when in actual fact the file present in the modules folder is mongodb.so
Does anyone have any suggestions or experience with this please?
For those facing the same issue. This was fixed by changing the extension name in the following file /opt/plesk/php/5.6/etc/php.d/mongodb.ini from mongo.so to mongodb.so
And then remember to use the new mongo driver class ie MongoDB\Driver\
I have been trying to install PHP imagick extension on Xampp for Windows without success.
I succeeded to install Imagick (I can see it with phpinfo()) by installing .dll files and setting php.ini to use this dll extension.
But when I try to install with Composer or when I use PHP, I get the message
PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_imagick.dll
I cannot install my own application on my computer.
Can someone help me ?
My phpinfo result:
I followed the instructions outlined here:
Install PHP Internationalization extension (Intl) on XAMPP on Mac
Ran sudo pecl install intl
selected the correct files from the Cellar
then this error happened:
/private/tmp/pear/temp/intl/intl_error.h:24:10: fatal error:
'ext/standard/php_smart_str.h' file not found
include
^ 1 error generated. make: *** [php_intl.lo] Error 1 ERROR: `make' failed
No matter, did some research and found out that PHP 7.0.8 deprecated php.smart_str.h to php.smart_string.h
So given my scant knowledge of C++ I copied smart_string.h to smart_str.h and renamed all the headers from STRING to string.....
re-ran pecl -no luck....more errors......without knowing where the .c files are and remaking php (not really interested in going that far) since anyway I'm using XAMPP so that ended that option.
I have php 5.5 on my mac, deep in the usr/local/bin folder
so next step was to get pecl to use those files and generate an intl.so file....
Did that....I have the intl.so file so put it in the 'extensions' folder in XAMPP (for reference: /Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20151012)
Ran php and came up with this error:
Warning: PHP Startup: Unable to load dynamic library
'/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20151012/intl.so'
- dlopen(/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20151012/intl.so,
9): Symbol not found: _zval_used_for_init Referenced from:
/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20151012/intl.so
Expected in: flat namespace in
/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20151012/intl.so
in Unknown on line 0
I imagine it has to do with different versions?
In any case I can't get pecl to install intl without a make error in PHP 7.0.8 on XAMPP. There is no documentation on this and you'd think that if you deprecate a header.h file you'd update all extensions?
Install intl.so in PHP 7 seems impossible?
After a lot of research I was finally able to resolve this. Detailed steps here:
before you begin, check which php path is set. it should be /Applications/XAMPP/xamppfiles/bin/php. If not you can change it by PATH="/Applications/XAMPP/xamppfiles/bin:${PATH}". more detail here
Overall idea is to build the intl-extension from PHP source code on your own. Before you begin make sure you have installed Xcode. Also, install the latest version of autoconf. this might help:
brew install autoconf
Next download the version of PHP you use in XAMPP from php.net. I am using 7.1.18. This version worked for me: php-7.1.31, I’m guessing if you follow the steps it might work for 7.0 or 7.2 as well. Do let me know if it does or doesnt, I’ll update this post. Do not use PHP 7.3 for Magento 2.3.0, it is not supported.
Extract the tar.gz file using (I extracted it inside ~/Downloads/ folder )
tar -xzvf php-7.1.31.tar.gz
cd into the extracted folder
cd php-7.1.31
change to subfolder ext/intl
cd ext/intl/
Run these commands to build the extension
/Applications/XAMPP/bin/phpize
./configure --enable-intl --with-php-config=/Applications/XAMPP/bin/php-config --with-icu-dir=/Applications/XAMPP/xamppfiles/
make
sudo make install
you can now delete all files you downloaded and also the extracted folders.
Open /Applications/XAMPP/xamppfiles/etc/php.ini , and add extension=intl.so
Restart your Apache using XAMPP GUI and it should work.
So far, it seems that extension intl.so for php is bundled with php
and should be compiled with php (intl --enabled). XAMPP does not support this (as of Oct 2016), MAMP does. I do not know about other distros. However, if you're willing to recompile PHP 7, it's worth it just to do that and enable it during compiling.
So....I ran with MAMP. Then I decided that I would simply install apache 2.4 and php 7 and Mysql without the stack and the junk that comes with MAMP or XAMPP and everything works like a charm... so if you need to use CakePHP or intl support etc... just drop XAMPP/MAMP and go with a standard install. I used homebrew (MacOS) and everything is working fine.
Update: As regards Windows, XAMPP does not default it, but you can add the module (dll) in php.ini and works like a charm
The error means that XAMPP doesn't have PHP compiled with intl. You may try:
pecl install intl
but probably it won't work as well.
See: PHP Bug #72879 Pecl install intl make error with PHP 7.0.8.
As for the workaround, try installing memcached extension instead of memcache, e.g.
pecl install memcached
Note: It also requires libmemcached package/library to be installed beforehand. For macOS, install via: brew install libmemcached.
If you wanna try without homebrew, with native apache and php, look at my aswer here: https://stackoverflow.com/a/55131868/3692846
I am trying to run a CakePHP app. I've been working for a while in this app and recently I had to install a new dependency (using composer). Once I installed it this error came up and I can't run the app anymore:
PHP Warning: PHP Startup: Unable to load dynamic library
'/usr/lib/php/extensions/no-debug-non-zts-20121212/intl.so' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20121212/intl.so, 9): Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.56.dylib
Referenced from: /usr/lib/php/extensions/no-debug-non-zts-20121212/intl.so Reason: image not found in Unknown on line 0
When I open that folder I can see a different version of that library:
libicui18n.57.dylib
But the system is looking for
libicui18n.56.dylib
How can I install the 56 version of that library or upgrade the intl so it uses version 57?
Is that what I need to do?
Thanks!!
I have the same question when i upgrade node to v8.x.
After i run brew upgrade node,the icu4c was updated.
I solve the problem by under command:
brew unlink php56-intl
brew remove php56-intl
brew install php56-intl
so, i feel you should reinstall intl extension.