I am installing Magento on xampp local server on Windows 7. How to fix this error "PHP extension "curl" must be loaded." ?
Uncomment the following line: extension=php_curl.dll in the php.ini configuration file of your XAMP.
The location of the php.ini file will be mostly
%XAMPP_HOME%/php/php.ini
Stop apache and restart it.
In the xampp control panel go to the SCM tab and then select apache server and stop it and again restart it.
Then, go to the installation page of magento and refresh the page.
The setting to change:
;extension=php_curl.dll
to (semicolon removed)
extension=php_curl.dll
I would like to point out something regarding this problem. First of all
doing the same under Wamp instead of Xampp (i.e. uncommenting the
extension=php_curl.dll line under the php and apache directories
causes an error because Wamp does not package this dll with its
distribution (at least as of wamp server 2.2). I had do ditch
wamp and install xampp to get magento running. Perhaps someone
can suggest where one can alternatively download the php_curl.dll
from so that magento can be brought to work with Wamp as well.
There is a magento checklist file at:
http://www.magentocommerce.com/knowledge-base/entry/how-do-i-know-if-my-server-is-compatible-with-magento
This script has two problems. First the opening tag should be <?php rather than <?
or the xampp server wil not run it. Secondly the shell_exec() statement returnss an
empty array because the path to mysql is not configured, that's all, otherwise even
that part should be fine I suppose. (???)
Related
I've been using WAMP for a long time without any problems with PHP 7.2.4. Today I've updated my PHP to 7.4.19 and it seems the cURL extension is not loading properly, I am getting the curl_init() error.
php.ini is configured correctly in php7.4.19 folder,
extension=curl is uncommented, so is the php.ini file in apache/bin
folder, which is basically just a link to the same file from the PHP
directory
I've tried unchecking the cURL extension and turning it on
again from WAMP settings and also directly in php.ini by commenting
it, followed by restarting the WAMP or even Windows
in phpinfo() I
can clearly see the cURL is not being loaded, if I switch back to
7.2.4 however and refresh the page, cURL loads just fine
I've tried copying the php_curl.dll from 7.2.4 /ext directory, to the current 7.4.19 /ext
directory and rewriting the file
I've tried adding
extension=php_curl.dll to php.ini as well
The system PATH is correctly configured. As I mentioned, it works well with older version of PHP, which uses the same system PATH.
System info:
WAMP 3.2.5 x64
Apache 2.4.33
PHP 7.4.19
MySQL and MariaDB probably not relevant at all
Windows 10 x64 with most recent updates
Basically I've tried everything I found online. Do you have any ideas?
This is very dumb of me, but I finally solved it, leaving this answer here in case anyone struggles with the same problem.
I needed to update Apache from 2.4.33 to 2.4.47. Seems like the .33 version had problems with loading the cURL extension in PHP 7.4 for some reason.
I am trying to install the Libsodium PHP extension using PECL, but I have no idea how to get the dll files needed. I want to use it with Wampserver on Windows 7 (64-bit).
Can any one help me?
Here is How I did it.
Download the libsodium from here > For PHP 7.0, For PHP 5.6 And For PHP 5.5 (All x64). #One Important Note, Please download appropriate x86-32 bit or x64-64 bit of this extension matching of your environment from here
Extract the Downloaded file and copy libsodium.dll to wamp->bin->php->php5(x).x.xx Folder
Copy php_libsodium.dll From the extracted File to wamp->bin->php->php5(x).x.xx ->ext
Now Click on the WAMP System tray icon.
Go to PHP-> PHP Settings and Click on the enable dl from the menu of the WampManager from the system tray
Now Add bellow line to php.ini from PHP -> php.ini from the menu of Wampmanager, save and close it
extension=php_libsodium.dll
Now Restart Apache or click Restart All Services from the menu of WampManager
You should now get your php_libsodium in the extensions of the php Up and Running.
:)
**I didn't notice that, this question is 4 months old. I hope You have solved this.
use command prompt :
pecl install libsodium
and go to wamp folder find php.ini in php folder :
append this line: to ini file
extension=libsodium.so
You might be able to achieve this result by running php5enmod libsodium, depending on which webserver you use. Make sure you restart your webserver after installing PECL libsodium
here is good references:
https://paragonie.com/book/pecl-libsodium/read/00-intro.md#installing-libsodium
You can download the dll files you need here: http://windows.php.net/downloads/pecl/releases/libsodium/1.0.2/
Select the version that corresponds with your PHP version, compiler and architecture. (this can be checked using phpinfo(); on your machine)
Copy php_libsodium.dll to "ext" directory (C:\PHP\ext)
Copy libsodium.dll to root of PHP directory (C:\PHP)
Add extension=php_libsodium.dll to php.ini
restart apache
This worked on a standalone version of PHP running on Windows 7, I see no reason why this shouldn't work on WAMP or XAMP.
Wamp 3.2.0 64-bit
Even though in the past apparently more steps were required (see my comment from 2018), today I installed Wamp 3.2.0 64-bit, and when I got an error about libsodium not working, I was able to easily fix it by:
Wamp tray icon > PHP > PHP Extensions > ensure "sodium" is checked
(Wamp will automatically refresh)
I was pleasantly surprised that is worked!
You can also use https://github.com/paragonie/sodium_compat. You can simply use :
composer require paragonie/sodium_compat
So here is the issue I'm getting:
I'm trying to install Composer and I'm using MAMP on Windows (it does exist since the beginning of January).
And like many users of Composer on Windows, I've got this error :
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"
So I checked on the right php.ini page if it was unabled and it was!
I can't find any help since there are very few users of MAMP on Windows.
Thank you for your help or suggestions
Open php.ini located in your "\MAMP\conf\" folder or copy the php.ini into a \MAMP\bin\php\php[your PHP version number]\
Find "extension=php_openssl.dll"
;extension=php_openssl.dll - remove ";"
Restart your MAMP , extension should be loaded after that.
Had the same problem.
The solution is quite easy:
Ensure that extension=php_openssl.dll is uncommented (Remove ;) and copy the php.ini file at the same directory where the php.exe is located, because Composer searches there for an php.ini File and not in the MAMP conf folder.
Step 1: Go to following Folder
\MAMP\bin\php\php[your php version you are working on]
Note: to check version of php you are using go to Mamp prefrences and then click on php tab and there you can see Standard Version the version you are using.
mine was \MAMP\bin\php\php5.6.8
Step 2: Inside that folder find file named as
php.ini-production
Step 3: Open this file in Notepad to edit
Step 4: Search for by pressing ctrl+F
extension=php_openssl.dll
Step 5: Remove Semicolon(;) before it
Step 6: Restart MAMP and voila You are ready to install Composer.
This method works as of version 3.2.2:
Open php.ini located in your \MAMP\conf\ folder and copy the php.ini file into \MAMP\bin\php\php[your PHP version number]\ (You can find the version number you are using in MAMP's preferences)
Find extension=php_openssl.dll remove ; if it exists.
Open php.ini-production and php.ini-developmen that exist in the same folder that you copied the php.ini file into.
Find extension=php_openssl.dll remove ; if it exists.
Restart your MAMP, and the extension should be loaded after that and you should be able to install Composer.
I spent hours on this issue, followed the suggested answers and couldn't get it working.
So to anyone else getting a bunch of errors, remember MAMP is still in Beta for windows and some issues will run deeper than is practical to fix.
MAMP & MAMP PRO for Windows is available as a Beta version. It may still contain some. We do not recommend using MAMP & MAMP PRO Beta for Windows in a production environment.
In the end I had to switch to WAMP.
I spent quite a bit of time too. In my Windows 10 MAMP installation the openssl extension was enabled by default in all php.ini files. I got it working by adding the desired PHP version to the Windows system PATH before installing Composer. MAMP PRO has a setting 'PHP in system' path on the 'PHP' tab of control panel.
I was able to figure this out with MAMP PRO on Windows 7, and I assume MAMP would be the same.
The tricky step is you have to copy the php.ini file to your php.exe location in order to install composer. (MAMP PRO leaves these in separate locations)
For example I am using php 5.6.0, you can use any version just make the appropriate changes.
STEPS:
Path for php.exe C:\MAMP\bin\php\php5.6.0\php.exe
Path For php.ini C:\Users\Public\Documents\Appsolute\MAMPPRO\conf\php5.6.0.ini
Edit the php.ini from step 2 as necessary (uncomment openssl)
Copy the php5.6.0.ini from step 2 to the php.exe directory from step 1
Rename this copied php5.6.0.ini to just php.ini
Composer should then be able to install correctly.
I got my WAMP installed on my windows 7 64bit. cURL is not working, but still I got it enabled from the WAMP tray.
I have also uncommented extension=php_curl.dll in php.ini for both the PHP and Apache folder.
Windows give me an error message,
PHP Startup: unable to load dynamic library 'c:/wamp/bin/php/php5.4.3/ext/php_curl.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-lin sxstrace.exe tool for more detail."
How can I fix this problem?
Go to http://www.anindya.com/php-5-4-3-and-php-5-3-13-x64-64-bit-for-windows/ and download the cURL version that corresponds to your PHP version under "Fixed curl extensions:".
So if you have PHP 5.3.13, download "php_curl-5.3.13-VC9-x64.zip". Try the "VC" version first. Then replace the php_curl.dll in ext folder. This worked for me.
I had the same exact issue. After trying almost everything and digging on Stack Overflow, I finally found the reason. Try downloading "fixed curl extension" separately from PHP 5.4.3 and PHP 5.3.13 x64 (64 bit) for Windows.
I've downloaded "php_curl-5.4.3-VC9-x64", and it worked for me. I hope it helps.
Works for me:
Go to this link
Download *php_curl-5.4.3-VC9-x64.zip* under "Fixed curl extensions:"
Replace the php_curl.dll file in the ext folder.
This worked for me.
I have struggled a lot with this myself.. In the end, PHP version 5.3.1 with Apache 2.2.9 worked...
I was getting the consistent error of missing php5.dll. For this, I renamed all the old php.ini files which are not required (outside of the WAMP folder) to old_ohp.ini.
The error is unrelated to PHP. It means you are somehow relying on Apache's mod_deflate, but that Apache module is not loaded. Try enabling mod_deflate in httpd.conf or commenting out the offending line (search for DEFLATE in httpd.conf).
As for the PHP curl extension, you must make sure it's activated in php.ini. Make sure extension_diris set to the directory php_curl.dll is in:
extension_dir = "C:/whatever"
and then add
extension=php_curl.dll
The steps are as follows:
Close WAMP (if running)
Navigate to WAMP\bin\php\<your version of PHP>
Edit file php.ini
Search for curl, uncomment extension=php_curl.dll
Navigate to WAMP\bin\Apache\<your version of Apache>\bin\
Edit file php.ini
Search for curl, uncomment extension=php_curl.dll
Save both
Restart WAMP
I think cURL doesn't work with WAMP 2.2e. I tried all your solutions, but it still did not work. I got the previous version, (2.2d) and it works.
So just download the previous version :D
Well, just uninstall WAMP 64-bit and go with the 32-bit version. It worked in my case.
This is how I've managed to load CURL correctly. In my case php was installed from zip package, so I had to add php directory to PATH environment variable.
Ensure that your system PATH environment variable contains the directory in which PHP is installed.
Stop the Apache server and restart it once more. With luck CURL will start working.
This work for me: http://www.mediafire.com/?3ay381k3cq59cm2
download a paste the file in ext folder
PHP 5.4.3
I had the problem with not working curl on win8 wamp3 php5.6. Reinstalling wamp (x64 version as I had x64 in system info) made it work fine.
uncomment "curl=cainfo" in the php.ini document
This helped me when installing Prestashop when all other methods still did not work.
This is what worked for me
Answered by Soren from another SO thread - CURL for WAMP
"There seems to be a bug somewhere. If you are experiencing this on Win 7 64 bit then try installing apache addon version 2.2.9 and php addon version 5.3.1 and switching to those in WAMP and then activating the CURL extension. That worked for me."
Update: The problem appears to have been corrupt DLLs somewhere in my PHP installation, or possibly a bug in PHP 5.2.9 on Win2k. I downloaded the windows (binaries-only) distribution of PHP 5.2.10 from php.net and extracted that to my c:\PHP directory. After doing that, everything worked fine.
Update2: I undid everything that I tried earlier (everything from the bulleted list below), except that I left "extension=php_curl.dll" uncommented in my php.ini file. It turns out that is all you should have to do in a proper installation.
I'm trying to get CURL to work on a Windows installation of PHP (version 5.2.9-2), and I am at wit's end. I have found the PHP CURL installation page, this SO question which references this page, and this SO question. I've tried most of the suggestions in all of those pages but I still get an error. Here is my very simple test page:
<?php
$ch = curl_init();
?>
<b>Success!</b>
This gives me:
Fatal error: Call to undefined function curl_init() in C:\ApacheRoot\curltest.php on line 2
In my Apache error log I get this each time the server starts:
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\PHP\\ext\\php_curl.dll' - The specified procedure could not be found.\r\n in Unknown on line 0
I have done the following:
Uncommented the following line in php.ini: extension=php_curl.dll
Copied ssleay32.dll and libeay32.dll from C:\PHP to C:\WINNT\System32
Downloaded cURL for Win32 from curl.haxx.se and extracted the .zip file to C:\cURL
Added C:\cURL to my system PATH environment variable.
Verified that:
php.ini includes extension_dir="C:\PHP\ext"
The directory C:\PHP\ext contains php_curl.dll
The only php.ini file on my system is in C:\PHP (i.e. especially that there is no C:\WINNT\php.ini)
The Apache httpd.conf file includes the line PHPIniDir "C:/PHP/"
I have also rebooted the machine (several times, in fact...).
You don't have to reboot the computer, just restart the apache and the php module will read the new ini.
Did you change the correct php.ini? In case of doubt
<?php echo 'php.ini: ', get_cfg_var('cfg_file_path'); ?>
can tell you.
Is there something in the error.log of the apache that indicates that something went wrong while loading php and the php_curl.dll?
Did you start the apache as a win32 service? If you did try to start it as a console application. Error messages will show up on the console then. Or start it as a service and take a look at the error.log file and the windows event log (start, run, eventvwr.msc /s).
edit:
"The specified procedure could not be found"
You need a dll that is compatible with your php version and build. Exactly what did you install and where did you get it from?
Try this:
Stop WAMP completely.
Find your WAMP folder: C:\Path\To\WAMP\bin\Apache\ApacheVersion\bin\
Edit that php.ini and uncomment extension=php_curl.dll
Restart WAMP.
That should hopefully solve it.
*EDIT: Do the same thing # C:\Path\To\WAMP\bin\php\PHPVersion\
This is what worked for me
Answered by Soren from another SO thread - CURL for WAMP
"There seems to be a bug somewhere. If you are experiencing this on Win 7 64 bit then try installing apache addon version 2.2.9 and php addon version 5.3.1 and switching to those in WAMP and then activating the CURL extension. That worked for me."
This fixed it for me:
Go to here:
http://www.anindya.com/php-5-4-3-and-php-5-3-13-x64-64-bit-for-windows/
Download 'php_curl-5.3.13-VC9-x64.zip'
Stop WAMP Server from Running
Extract the file 'php_curl.dll'.
On your local machine, browse to (or where your WAMP installation is found) c:\wamp\bin\php\php5.3.13\ext
Rename php_curl.dll to php_curl.dll.old (or whatever you choose) and then copy the new file into the above directory.
Restart WAMP Server
All should be working ok now.
I had the same problem with php-5.5.26-Win32-VC11-x64 (on Windows) and I tried everything listed here with no luck. Finally I got it working by adding PHP installation directory to windows Path.
With PHP 5.6.9 on Windows Server Core 2012 x64 cURL was not working, not showing up in phpinfo despite uncommenting php_curl.dll extension in my php.ini and restarting the Apache 2.4 service. Added the php path and the php\ext path to my $evn:path. No joy.
Fix: I didn’t need to download any other php_curl.dll file and couldn’t find one for PHP 5.6 anyway. What finally worked was to copy these three files into the Apache24\bin folder then restart Apache:
libeay32.dll
libssh2.dll
ssleay32.dll
Copying these to System or System32 was not needed.
If the problem persists after you uncomment the module from both php.ini files (that people are already talking about and which are located on apache folder and php folder) and even after you check that you got the php_curl.dll ** at
C:\WAMP\bin\php\php5.3.13\ext
YOU SHOULD TRY TO REPLACE THE ORIGINAL DLL THAT COMES WITH WAMPSERVER with one from this website:
http://www.anindya.com/php-5-4-3-and-php-5-3-13-x64-64-bit-for-windows/
My problem was there!
Hope it helps.