I installed wampserver, and mongodb both up and running i installed the mongodb extension PHP 5.3 VC6 Thread-Safe Mongo extension and added php_mongo.dll extension to php.ini, restarted the server but it won't show up in phpinfo() and of course it won;t work. Where did i skip a step ?
PHP x86 or x64 ? Look at "Architecture" in phpinfo. Official drivers doesn't work with Apache + PHP x64.
Look at this post: http://groups.google.com/group/mongodb-user/browse_thread/thread/1d2cecd9734e54fc/ff785888cb8e2c39?lnk=gst&q=x64#ff785888cb8e2c39
php_mongo.dll is now available for 64 bit architecture too. You can download the same from github. No need to downgrade now to 32-bit.
https://github.com/downloads/mongodb/mongo-php-driver/php_mongo-1.2.12.zip
parent link : https://github.com/mongodb/mongo-php-driver/downloads
Have you checked the php_mongo.dll is actually in the PHP exstension dir?
In my case Windows 7 64 bits, php-5.6.14-Win32-VC11-x64 and php_mongo-1.6.11-5.6-ts-vc11-x64
After check the VSVC Versions, configure the php.ini location, in the php.ini put the correct file the extensio_dir. And add to sytema PATH the location of php.
You need to copy libeay32.dll, libsasl.dll and ssleay32.dll into c:\windows\system32 and c:\windows\syswow64
Good day.
Related
Hi I have wampserver 64 version 2.5, php version 5.5.12 and my operating system windows 10
I downloaded the sqlsrv drivers and I put it here in the directory
C:\wamp\bin\php\php5.5.12\ext
and I paste this in my php.ini,
extension=php_pdo_sqlsrv_55_ts.dll
extension=php_sqlsrv_55_ts.dll
the php.ini is located here C:\wamp\bin\php\php5.5.12
when I restart the services this is the error will pop up
I don't know how to fix this or is there something wrong that i miss ?
Thank you in advance.
As far as I am aware there is no 64bit PHP compatible SQL Server library. You will have to install WAMPServer 32bit. This is not a WAMPServer limitation, its just that Microsoft has not yet completed the 64 bit PHP extension.
Probably they were waiting for PHP7 which is the first truly 64bit version of PHP
I am trying to install ssh2 on xampp
Xampp version : 3.2.1
PHP version : 5.4.19
Until now I have used following step to install:
download and copied libssh2.dll file to c:\windows\system32
php_ssh2.dll and php_ssh2.pdb files in the "ext" (e.g c:\xampp\php\ext) folder;
remove ; from this line extention:php_ssh2.dll in php.ini.
restart xampp
But I am getting error in log file:
unable to load dynamic library php_ssh2.dll
Can anyone help me with this?
A couple of things you may have missed :-
You need the Thread Safe (-ts-) version of php_ssh2
You need to make sure you get the 32 or 64 bit version to match your PHP/Apache and not to match your OS
You need the version of php_ssh2 that matches your PHP version i.e. 5.4
Having a look here for the download there is only a 32bit version of SSH2 compiled with VC9 available for PHP5.4, so you will have to ensure you have the 32bit version of XAMPP installed.
Oh and a final note, you do not need, and should not do, the copy of php_ssh2.dll into the c:\windows\system32 so remove the dll from this folder. PHP knows where to load its extensions from and putting files in c:\windows\system32 will only confuse things when you want to upgrade your version of XAMPP.
I am using Wampserver 2.5 on my Windows 7 (32 bit) and my PHP version is 5.5.12. I am unable to use IMAGICK.
I have installed IMAGICK version 6.8.9 on my system and it works like charm on the command line.
Further, I have followed instructions to enable it on my wampserver.
Inserted "SetEnv MAGICK_HOME C:/imagemagick" in httpd.conf at Appache.
Downloaded php_imagick-3.1.2-5.5-ts-vc11-x86.zip
Copied and pasted the php_imagick.dll from zip to php.ini at Appache.
While running a simple script on php [$a = new Imagick()] I get the error [Class 'Imagick' not found].
Kindly direct me to the right way of installation and the right downloads to install IMAGICK on Wampserver 2.5 / Windows 7 / 32bit / PHP 5.5.12.
Manual installation of imagick on Wamp, Xampp, and IIS
Create a folder imagick in php/ext folder.
Now add this newly created php/ext/imagick folder to windows path.
Download the latest version of imagick for windows from this link. http://windows.php.net/downloads/pecl/releases/imagick/
Download php extension of imagick from this link.
http://windows.php.net/downloads/pecl/deps/
Before downloading these 2 zip files, match the file name of your installation with your php.
for eg. php_imagick-3.2.0b2-5.5-nts-vc11-x86.zip
-Here 5.5 is the version of php
-nts is for IIS and windows (wamp) and ts is for Apache and Linux (xampp)
-VC11 and VC9 are the version of compilation, run phpinfo and check that it match with your php version.
-x86 is for 32 bit x64 is for 64 bit machines, i recommend use x86 only
Once you have downloaded the correct version for your php, extract the downloaded file to imagick folder you have added to path, take all files from bin folder to the root of imagick and replace all
Add full path to php_imagick.dll in php.ini like extension=C:\wamp\php\ext\imagick\php_imagick.dll
Restart your computer for path to take effect. Then open command and type dcraw and press enter. if you have added the path correctly a list of parameters will be shown, your Imagick is installed sucessfully.
Run phpinfo again and you will see Imagick listed as extension.
I would add a small, but crucial advice, becaues it took me 10 hours of sunday, to get it working.
This is for Win7/10 x64 and Wamp 2.5 x64
There is a php.ini file in apache/bin folder and there should be added a new line with php_imagick.dll extension :)
How can I install APCu in Windows?
I found this. But I need a solution for Windows.
I use PHP 5.5.6 (I have the XAMPP package).
This short and straight to the point tutorial should help you
Install APCu on Windows
Assumptions
I assume that you know what is APC - Alternative PHP cache
You want to install APCu because APC is not compatible anymore with PHP 5.5.x
You want to install APCu for wamp, xampp. Mostly windows web development platforms for PHP
Instructions
Pre: All directory locations might be different for you depending on your wamp installation folder and your PHP/apache versions.
Go to http://pecl.php.net/package/APCu, there is a table with available releases
Choose whatever release suits you better (latest stable version that supports your php version)
Choose package from DLL list, depending on what Windows you are using:
PHP version (5.5 in your case)
x64 (64 bits) OR x86 (32 bits windows)
Thread Safe (for Apache compatibility)
Unzip the archive, copy php_apcu.dll in C:\wamp\bin\php\php5.5.6\ext.
Go to C:\wamp\bin\apache\apache2.4.9\bin open php.ini and add the following lines (I just added them at the end of the file):
[apcu]
extension=php_apcu.dll
apc.enabled=1
apc.shm_size=32M
apc.ttl=7200
apc.enable_cli=1
apc.serializer=php
This are recommended configurations located in INSTALL file from the php_apcu archive, excepting the location of the DLL file.
Restart wamp
Go to http://localhost/phpinfo.php and check if apcu configuration table appears and apcu is enabled
If you also want to use apcu for PHP CLI then you only need to add in C:\wamp\bin\php\php5.5.6\bin\php.ini the config lines you added at step 5 in apache's php.ini.
The end!
For those who want APCu with backward APC compatibility (1:1 replacement without changing codebase, for example apc_cache_info > apcu_cache_info)
Download php_apcu.dll from release page (choose proper PHP version, architecture and thread safety mode)
Download php_apcu_bc.dll from PECL
Save both files in ext dir under your PHP installation folder
Load extensions in php.ini:
extension=php_apcu.dll
extension=php_apcu_bc.dll
Configure APCu in php.ini
[APCu]
apc.enabled=1
apc.shm_size=32M
apc.ttl=7200
apc.enable_cli=1
apc.serializer=php
INFO: APC extension with APCu-BC 1.0.3 must be named exactly php_apcu.dll in order to work. When I named it php_apcu_bc-1.0.3-7.1-ts-vc14-x86.dll XAMPP did not start properly (error about missing php_apc.dll)
Additional Note: the downloaded zip file from the source above for vc15 contained a file named php_apc.dll (in file: 'php_apcu_bc-1.0.4-7.2-ts-vc15-x86.zip' date: 13/06/2018) - just renaming it to php_apcu_bc.dll worked.
It matters if you use the thread safe or non thread safe version of the DLL. For me only the NTS worked in Windows 10 x64 and PHP 7.4 using the PHP built in server.
It was confusing because the error msg PHP gave when run php -i was Unable to load dynamic library 'php_apcu.dll' (tried: ext\php_apcu.dll) as if the file was not there.
Please refer to the official documentation:
https://secure.php.net/manual/en/opcache.installation.php
In my case, I'm using PHP 5.6 on XAMPP
and everything I need to do is to update my php.ini file with (recommended settings):
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
opcache.revalidate_freq=60
opcache.fast_shutdown=1
opcache.enable_cli=1
There don't seem to be any concise tutorials/walk throughs for installing ImageMagick on WAMP for use with PHP.
I've tried dozens of combinations of their binary releases with different php extension dll files. I can get imagemagick working fine from the command line, and I can get it to show as ticked in the WAMP extensions, but can't actually use it.
Has anyone come across a good guide for installing this ball ache piece of software?
I've followed http://www.knowledge-transfers.com/it/installing-imagemagick-on-windows-setup-imagick-on-php with no luck...
Update: this is what happens when I follow the steps in PHP farmer's answer on windows7. My php.ini is setup as follows:
extension_dir = "c:/wamp/bin/php/php5.3.0/ext/"
extension=php_imagick.dll
I reboot and get these two errors in this order
and here is the dll file where it should be:
I know this is old post but I spend my all day to make it work, so here are the steps that helped me:
Download ImageMagick Binary Release - http://www.imagemagick.org/script/download.php
Install in C:\imagemagick, on last step check "Add application directory to your system path"
Download Imagick DLL: PHP5.6.x version from http://www.peewit.fr/imagick/ (I have 5.6+ version installed on my localhost
Copy php_imagick.dll to C:\wamp\bin\php\ext
Download PHP 5.6 Thread Safe (TS) x86 version from http://pecl.php.net/package/imagick/3.1.2/windows
Copy CORE_RL_* files to C:\wamp\bin\apache\bin\
Edit php.ini file in C:\wamp\bin\apache\bin\php.ini, add extension=php_imagick.dll line in extensions section
Copy all files from C:\imagemagick\modules\coders and C:\imagemagick\modules\filters to C:\imagemagick to load ImageMagick supported formats
Go to Control Panel -> System -> Advanced Settings -> Environment Variables -> New System Variable -> MAGICK_HOME = C:\imagemagick
Restart Wamp server and check phpinfo() for imagick plugin
If last step does not work, restart Windows
I have improved fsasvari answer to cater general scenarios and versions. All credits to him.
Install Imagick in WAMP
Open your phpinfo() page
Check the below
PHP version (mine : 5.5.12)
Compiler (mine : MSVC11 (Visual C++ 2012) )
Architecture : (mine : x64)
Thread Safety : enabled
Loaded Configuration File (mine : C:\wamp\bin\apache\apache2.4.9\bin\php.ini)
extension_dir : (mine : c:/wamp/bin/php/php5.5.12/ext/)
Apache Bin (Not in phpinfo() page) : C:\wamp\bin\apache\apache2.4.9\bin\
Get the latest release match to your architecture from here (for me it was ImageMagick-x86_64-pc-windows.exe).
Copy all files from C:\imagemagick\modules\coders and C:\imagemagick\modules\filters to C:\imagemagick to load ImageMagick supported formats
Install in C:\imagemagick, on last step check "Add application directory to your system path"
Download the PECL matching to your architecture
http://pecl.php.net/package/imagick/3.1.2/windows
(for me : 5.5 Thread Safe (TS) x64)
Extract it and copy all the CORE_RL_* files to apache bin folder (mine : C:\wamp\bin\apache\apache2.4.9\bin)
Copy php_imagick.* files to extension dir (mine : c:/wamp/bin/php/php5.5.12/ext/)
Edit php.ini file (mine : C:\wamp\bin\apache\apache2.4.9\bin\php.ini)
add extension=php_imagick.dll line in extensions section
Go to Control Panel -> System -> Advanced Settings -> Environment Variables -> New System Variable -> MAGICK_HOME = C:\imagemagick
Restart Wamp server and check phpinfo() for imagick plugin
If last step does not work, restart Windows (Specially if you have previously installed imagemagick in different folder/version)
For WAMPSERVER 3.1.9 64bit, PHP Version: 7.3.5
I had a lot of trouble with this as well and some things I did wrong was that I doubted ImageMagick would load on my new php version. But you have to believe it will work and don't try with older php versions :)
So this was my approach, remember to follow it with your own settings and versions/folders.
Before you start, make sure you running the php version you want to run. If you installed Wampserver 3, you may click the wamp icon and go to php version and activate the one you want to run.
1
Get latest ImageMagick version for your system here: http://ftp.icm.edu.pl/packages/ImageMagick/binaries/
(I got the ImageMagick-x86_64-pc-windows.exe in the bottom)
2
Install ImageMagick in C:/imagemagick (I put it in lower cases),
You will be asked for some stuff during install, just make sure the path thingy is ticked.
You should also tick the convert thingy if it allows you.
Then after install you can run CMD and type convert -version to see if imagick is installed.
3
Run <?php phpinfo(); ?> And find out these settings:
PHP Version: 7.3.5
System: Windows
Compiler: MSVC15 (Visual C++ 2017) ([VC15])
Architecture: x64 (or maybe you have x86)
Thread Safety: enabled ([TS] else [NTS])
You probably have other settings, but you need to remember yours to download the proper php_imagick.dll
4
Get the php_imagick.dll you want for your php version from here: http://pecl.php.net/package/imagick
I got mine from here: http://pecl.php.net/package/imagick/3.4.4/windows for php 7.3
Remember your info from the phpinfo(), it has to match, else it won't work.
5
After you unzip it, copy the php_imagick.dll and paste it in C:/wamp64/bin/php/php7.3.5/ext/
Then copy all the other .dll files from that folder into C:/wamp64/bin/apache/apache2.4.39/bin/
Yes it's dirty but you will get it working like this.
6
Add extension=php_imagick.dll in C:/wamp64/bin/php/php7.3.5/phpForApache.ini
I added it after the other extensions in the file.
7
Restart all Wamp services.
If you been messing around earlier with installs, you might have to restart the computer due to some weird cache stuff.
8
Check phpinfo() again if imagick shows up and try something like $im = new Imagick();
9
Click the Wamp icon -> php -> extensions, php_imagick should be listed.
Good luck! :)
PHP 5.4 php_imagick.dll is here: http://www.peewit.fr/imagick/ .
I read somewhere that 64bit php doesnt work with php_imagick. That might be the case when you get this error in apache_error.log
PHP Warning: PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.4.3/ext/php_imagick.dll' -
%1 is not a valid Win32 application.\r\n in Unknown on line 0
As mentioned above, it was also necessary to add this into httpd.conf (also, i read you cant have spaces/dashes/dots):
SetEnv MAGICK_HOME C:/imagemagick"
If you dont, you might get this error:
"PHP Warning: PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.4.3/ext/php_imagick.dll' -
The specified procedure could not be found. in Unknown on line 0"
In the end, this article might partially help: http://www.elxsy.com/2009/07/installing-imagemagick-on-windows-and-using-with-php-imagick/
This was a headache for me as well, but unfortunately I installed this quite awhile ago. The instructions from that link you posted seem accurate. Have you ran phpinfo(); to see if it is installed in the Apache Environment? It should be listed as MAGICK_HOME.
Make sure "SetEnv MAGICK_HOME C:/imagemagick" is set at the end of your httpd.conf file. Assuming imagemagick is installed in that directory.
Be sure that you have the extension "php_imagick.dll" in your php.ini file as well.
It should work just fine if you have all those set.
On another note, here is a nice little library someone built to make imagick easier to use. https://github.com/francodacosta/phmagick
I hope that helps! Good luck!
I've never used WAMP but I have found that sometimes installing PHP extensions on Windows I need to ensure that any dll's that the extension relies on is in the Windows system PATH. If there is more than the one dll packaged with the imagemagick extension, try adding the directory that the dll's reside in to the Windows system PATH then REBOOT (to ensure that the web server gets a copy of the NEW environment).
I know this is an old question but i guess this will help someone someday out there....
If you are on WAMPP and have PHP 5.4.x installed , go here http://www.peewit.fr/imagick/
and download appropriate files as instructed. It will work.
Please see this answer already on StackOverflow:
Installing ImageMagick extension with php/windows
I answered this question some time ago. This solves the DLL mismatch error.