Enabling CURL with PHP 5.6 on Windows 8 - php

I have Apache 2.4.12 and php 5.6.9 on my Windows 8 computer and I'm trying to enable the curl extension for php however, I haven't had much success. After searching the internet for this issue it appears that other's have had the same trouble. Here are the suggestions I've found:
Uncomment ;extension=php_curl.dll in php.ini
Uncomment ;extension_dir = "ext" in php.ini
Download and replace the php_curl.dll file in the ext directory of php with one from this website
Add to the PATH environment variable where php is installed
Copy libeay32.dll and ssleay32.dll from where php is installed to C:\Windows\System32
I've tried every single suggestion with no success except the third item in the list because it doesn't have a .dll file for curl with php 5.6, in fact the highest version avaible is one for php 5.4. There has to be way to enable this extension without having to downgrade my php version to 5.4 and using a .dll file from that website. I've tried searching the internet for a .dll file like the one on the linked website for php 5.6 opposed to a version of php that's outdated but I've had no luck in finding one so I'd like help with this issue.
How can I enable curl for php 5.6 on my Windows 8 machine?

Locate your php folder and follow these instructions:
Move to Windows\system32 folder:
libssh2.dll, php_curl.dll, ssleay32.dll, libeay32.dll
Move to Apache24\bin folder
libssh2.dll
Uncomment extension=php_curl.dll
Note: Don't overwrite when prompted.
Source

I give you an example of a set up that just worked perfectly for me :
downloaded the VC11 x86 Thread Safe version of PHP,
unzipped it within a directory C:\php,
edited the php.ini-development, uncommenting 2 lines :
extension=php_curl.dll
extension_dir = "ext"
saved this file under php.ini.
I just tested it via the CLI (windows CMD here) on a PHP a file (i.e. C:\php\php myFile.php) and cURL worked.
If you have Apache installed and prefer to test it in a browser, you obviously have to adapt this installation with your own files structure and to do not forget to restart Apache.

Running apache service with a specific user other than local system solved the problem for me. You can test this easily by stopping the apache service and running manually <apache dir>\bin\httpd.exe.

I fixed this problem by adding C:\php and C:\php\ext to PATH system variables.
Press window + pause to bring up the System Properties page.
Click Advanced System Settings
Click Environment Variables
You'll see the Path variable in the System Variables box in the bottom.
Append your PHP path to that variable. Now the system will be able to load the extensions.

In addition to uncommenting the line
;extension_dir = "ext"
Try also setting it to the absolute path of the PHP installation's ext folder and then restarting apache.
e.g.:
extension_dir = "C:\PHP 5.6.19\ext"

Related

Install Composer on MAMP on Windows

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.

PHP unable to load php_curl.dll extension

Follow-up from my post yesterday (Enabling cURL with PHP)
The problem is that PHP isn't able to load php_curl.dll. I've tried several steps including uncommenting extension=php_curl.dll, making sure the dependencies libeay32.dll and ssleay32.dll eixst in the path, re-downloading php_curl.dll, replacing the old one, and lastly copying the file into my System32 folder.
I'm using Apache 2.2 and PHP 5.4.14. I installed both using their individual packages; I'm not using XAMP or WAMP. I'm using Windows 7 64-bit.
Any help at all would be appreciated.
libeay32.dll and ssleay32.dll have to be path-accessible for php_curl.dll loading to succeed.
But copying them into Apache's ServerRoot, Apache's \bin\, Window's \System32\, or even worse into the Windows main directory is a bad hack and may not even work with newer PHP versions.
The right way to do it is to add the PHP path to the Windows Path variable.
In Control Panel -> System click on Advanced System Settings or press WIN+R and type SystemPropertiesAdvanced
Click the button Environment Variables.
Under System Variables you will find the Path variable. Edit it and prepend C:\PHP; to it - or whatever the path to your PHP folder is.
(Hint: If your PHP folder contains spaces like C:\Program Files\PHP you may need to use the short filename form here, i.e. C:\Progra~1\PHP.)
Then fully stop Apache and start it again (a simple restart might not be enough).
Update 2017-05:
I changed the instructions above to prepend the Path variable with the PHP path instead of appending to it. This makes sure that the DLLs in the PHP path are used and not any other (outdated) versions in other paths of the system.
Update 2018-04:
If you have already chosen the wrong way and copied any of the PHP DLLs to Apache or Windows paths, then I strongly recommend that you remove them again! If you don't, you might get into trouble when you later try to update PHP. If a new PHP version brings new versions of these DLLs, but your old DLLs still linger around in system or webserver paths, these old DLLs might be found first. This will most certainly prevent the PHP interpreter from starting. Such errors can be very hard to understand and resolve. So better clean up now and remove any of the mentioned DLLs from Windows and Apache paths, if you copied them there.
(Thanks to #EdmundTam and #WasimA. for pointing out this problem in the comments!)
Update 2019-10:
Tip: To find all copies of these DLLs and check whether you might have placed them in the wrong folders, you can use the following commands in a Windows Command Prompt window:
dir c:\libeay32.dll /s
dir c:\ssleay32.dll /s
Be warned that these commands may take some time to complete as they search through the entire directory structure of your system drive C:.
Update 2020-08:
If your PHP folder contains spaces (i.e. C:\Program Files\PHP) you may need to use the short filename form in the Path variable at step 3 (i.e. C:\Progra~1\PHP). Thanks to #onee for this tip!
In PHP 5.6.x version You should do the following:
Move to Windows\system32 folder DLLs from php folder:
libssh2.dll, ssleay32.dll, libeay32.dll and php_curl.dll from php ext folder
Move to Apache24\bin folder from php folder:
libssh2.dll
Also, don't forget to uncomment extension=php_curl.dll in php.ini
WINDOWS Apache 2.4.x + PHP 7.0.x SOLUTION HERE:
Solution: Put libeay32.dll, libssh2.dll, ssleay32.dll files under dir specified in httpd.conf's ServerRoot directive. These dlls can be found compiled under php root folder.
Reasons:
Problem is php_curl.dll requires to access following libraries while loading: libeay32.dll, libssh2.dll, ssleay32.dll and it does not make sense if you put them in ./php/ext dir or if you put PHP extensions in PHP root dir.
Of course you can put them in C:\Windows or in some global folder defined in PATH but if you don't want to do this and you want that your apache+php installation was portable:
The path specified in ServerRoot in httpd.conf is treated as home path for php. The behaviour is similar to situation where you include ./path/to/some.php file in ./index.php and home path for some.php file is still ./ the dir where index.php resides.
In shorts just put those three dlls right in dir you specified in httpd.conf ServerRoot directive and php_curl.dll will not fail to load again.
You are loading .dll so your OS has to be windows.
First check which php.ini file you are using by running phpinfo()
Then check where your extensions folder is by checking extension_dir attribute in that file.
Next make sure that php_curl.dll is present in that folder. If not copy it over.
Restart apache and check if it works.
Since you installed packages individually, also do this:
Copy the dll file from php_installation_folder/extensions to apache_installation_folder/bin
Usually this is an OpenSSL version mismatch error, between Apache and PHP. In case Apache loads PHP as a DSO module, its own OpenSSL versions (dlls and libs) will be used. So, in case the PHP extension requires a newer version, it may not find the appropriate interface inside the Apache-loaded DLLS and it will fail to work.
Since you need the PHP extension to load, you need the relevant DLL files to be at least the version of what the PHP module asks for.
Supposing that you 're using lastest builds for both Apache and PHP and both having been built with the same MVC version, you can copy the following files:
libcrypto-1_1.dll
libcrypto-1_1-x64.dll
libcurl.dll
libsasl.dll
libssh2.dll
libssl-1_1.dll
libssl-1_1-x64.dll
nghttp2.dll
libeay32.dll (if existing in your PHP distribution)
ssleay32.dll (if existing in your PHP distribution)
from the PHP root folder to the Apache2/bin folder, in case you 're confident that the PHP build is newer than the Apache build.
In the opposite case, you can copy the same files from the Apache BIN to the PHP root.
In any case, backup the contents of the APache and PHP folders beforehand.
Adding the PHP path as an enviromental variable will give priority to this path for loading the relevant DLLs and may solve the problem. However, you lose in server portability. Additionally, if you have also added the Apache PATH as a variable and the OpenSSL versions are way different (up to loading different linked DLL files), a lot of shit may happen.
Make sure to have your apache SSH dlls loading correctly. On a fresh install I had to download and load into my apache bin directory the following dll "libssh2.dll"
After ssl dll was loaded cURL was able to load with no issues.
You can download it from the link below:
http://windows.php.net/downloads/pecl/releases/ssh2/0.12/
Solution:
Step1: Uncomment the php_curl.dll from php.ini
Step2: Copy the following three files from php installed directory.i.e "C:\\php7".
libeay32.dll,
libssh2.dll,
ssleay32.dll
Step3: Paste the files under two place
httpd.conf's ServerRoot directive. i.e "C\Apache24"
apache bin directory. i.e "C\Apache24\bin"
Step4: Restart apache.
That's all. I solve the problem by this way.Hope it might work for you.
The solution is given here.
https://abcofcomputing.blogspot.com/2017/06/php7-unable-to-load-phpcurldll.html
After having tried everything here I had to simply upgrade Apache to a newer version in order to make curl extension work.
I was upgrading PHP from 7.0.2 to 7.1.15 after which curl did not work. Only way to fix it was upgrade Apache (which was version 2.4.18) to the latest 2.4.29.
Didn't have to copy any of the lib/ssleay dll files to either Apache or Windows - possibly because I already have the PHP folder in my system path.
Running Windows 10, 64-bit, thread-safe versions, VC14.
Insert to file httpd.conf
LoadFile "D:/DevKit/PHP7.1/libeay32.dll"
LoadFile "D:/DevKit/PHP7.1/libssh2.dll"
LoadFile "D:/DevKit/PHP7.1/ssleay32.dll"
In php.ini you must put the extension_dir static path. extension_dir = "C:\laragon\bin\php\php-7.3.11-Win32-VC15-x64\ext" by example. Don't forget to remove the semicolon before this variable.
I have encountered the same problem before.I resolved it by add php directory to windows system environment variables---Path.
I got this error because, on my system at least, if extension_dir in php.ini is set to a relative path, it is taken as being relative to the root Apache directory, so to get it to point to the correct directory I had to use an absolute path: "C:\Program Files (x86)\PHP\ext". (This was PHP 5.5.31 and Apache 2.4.23 on Windows 10; setting extension_dir to ext worked just fine with the same setup on Windows 7. I first got it to work by putting an ext directory in the Apache folder with the necessary dlls, then figured out what was happening.)
It was also necessary to set the PATH correctly or make sure the dlls mentioned above (libeay32.dll, libssh2.dll, and ssleay32.dll) are in Apache's bin directory (or most likely any of the places other answers mention). The fact that I got the same error message for Apache not being able to find lib_curl.dll as for it not being able to find libssh2.dll did not make things any easier to figure out.
Add your php folder path to the System PATH and everything should work fine. It will also fix some other extensions that are broken.
Maybe not the best approach, but it definitely works. (2019-2022)
"Your install of PHP does not have the 'php_curl.dll' extension enabled."
find "php.ini", if no you have to rename "php.ini-development" to "phh.ini". Open it.
find ;extension_dir = "ext"
add these under that line, there is no ";"
extension_dir = "[php dir]\ext"
extension=php_curl.dll

Call to undefined function curl_init() error in wamp 2.2

I am having below error when I try to implement google and facebook authentication in windows 7 using wamp server.
Fatal error: Call to undefined function curl_init() in
E:\wamp\www\mysite\protected\extensions\eauth\EAuthServiceBase.php
on line 273
I am using,
wampserver 2.2
php version 5.3.13
I have enabled php_curl module as well. I checked in php.ini for confirm and it is uncommented as below.
;extension=php_bz2.dll
extension=php_curl.dll
;extension=php_dba.dll
The code has worked in ubuntu with xampp, but not in wamp in windows. I have done everything I can find. I have tried replacing the php_curl.dll also according to the comment on this thread, Call to undefined function curl_init() - with WAMP
My phpinfo() looks like below.
I have installed wamp in the partition E:\, but the "Configuration File (php.ini) Path" seems different, it is C:\Windows.
Please help me to fix the issue.
Visit this and have a file under Fixed curl extensions:
http://www.anindya.com/php-5-4-3-and-php-5-3-13-x64-64-bit-for-windows/
after download and replace related file then restart server.
In browser navigate to localhost and make sure there is curl extensions showing under Loaded Extensions :
For WAMP running PHP 5.4.3 on Windows 7 64 bit, make sure you use php_curl-5.4.3-VC9-x64.zip NOT php_curl-5.4.3-nts-VC9-x64.zip.
In windows 7 with PHP 5.5.31 after check that php_curl.dll extension is enabled (and still doesnt working), work for me to copy libeay32.dll and libssh2.dll from php directory to Apache bin.
just a guess - this section in php.ini does not reference the correct location
; Directory in which the loadable extensions (modules) reside.
extension_dir = *some value*
http://www.php.net/manual/en/ini.core.php#ini.extension-dir
edit
Also, look for this block in your phpinfo, if it's not there, curl isn't loading (obviously). You're not looking for matching version numbers - just for the block's existence.
edit
look at this question also
PHP and CURL under Windows 7 64 bits and Apache
When using WAMP..
You should have one file php.ini in the main PHP directory
In the php.ini enable the extension extension=php_curl.dll, by removing the ; char
The extension_dir must look like this example: extension_dir = "D:\AMP\PHP\ext\", so not a relative path
You need to restart Apache server only once. No need to restart it many times
Just make sure, you have the php_curl.dll in the ext directory
(windows 10 user)
Since this is the first result in Google and I had exactly the same problem and none of your solutions worked for me and I finally find the correct solution in an other thread of stackoverflow, I'll post link here :
EasyPHP Devserver 16.1 Curl Win 10
The solution is to add the your current PHP directory (depend of which version you use) to your global "path" variable in windows (like explained in the link, but you don't need to add all php directorias of course)
Not sure where to put my experience, hope it will be useful for someone.
In my case (win7 x64 + apache 2.4 + php 7.2), curl extension was enabled in php.ini but did not load. Resolved by replacing libs libssl-1_1-x64.dll and libcrypto-1_1-x64.dll in Apache's bin folder with the latest builds of OpenSSL
For those running PHP 7+ on windows, there is no php.ini file in the php directory by default.
You need to:
create a php.ini file in your PHP directory (it should be under C:\php\, or wherever your php directory is located)
Copy the content of either php.ini-development or php.ini-production into the php.ini file you've created.
Finally remove the semicolon (;) before extension=curl
Change the extention in php.ini file uncomment by removing ; like below
;extension=php_bz2.dll
extension=php_curl.dll
;extension=php_dba.dll
Then restart all services and it will work.

intl extension: installing php_intl.dll

I'm trying to locate php_intl.dll and install it.
Does anyone have any tips?
For the php_intl.dll extension to work correctly, you need to have the following files in a folder in your PATH:
icudt36.dll
icuin36.dll
icuio36.dll
icule36.dll
iculx36.dll
icutu36.dll
icuuc36.dll
By default they're sitting in your PHP directory, but that directory isn't necessarily in your PATH (it wasn't for me, using xampp)
This has to be in your global path, not just your user's path. To set the global path, go to system info (windows key + PAUSE), then Advanced System Settings (Vista+) or Advanced (XP) and click the "Environment Variables" button and add the appropriate directory to the PATH variable in the System Variables list.
The packages at http://windows.php.net/download/ all contain the php\_intl.dll which is located in the subdir ext/.
All you have to do is to check if your extension_dir points to the right directory and add (or uncomment) the extension=php\_intl.dll directive.
I have XAMPP 1.8.3-0 and PHP 5.5.0 installed.
1) edit php.ini:
from
;extension=php_intl.dll
to
extension=php_intl.dll
Note: After modification, need to save the file(php.ini) as well as need to restart the Apache Server.
2) Simply copy all icu* * * *.dll files:
from
C:\xampp\php
to
C:\xampp\apache\bin
Then intl extension works!!!
Had the same issue ... I found the files needed by searching my drive for icu**.dll and found the ones listed above but with 46 instead of 36 in the php folder. I copy pasted them to the apache/bin file and tried starting apache and it finally started. On the Server Checks page it has now changed from Yellow Check to Green OK. Hope this helps.
If you read error message, "icuuc36.dll" is missing.
The problem is that you don't have the PHP dir in your PATH, or you can copy all "intl" files from php directory to apache\bin directory.
They are :
icudt36.dll
icuin36.dll
icuio36.dll
icule36.dll
iculx36.dll
icutu36.dll
icuuc36.dll
The package is already included in the extensions for PHP 7.2 and above and you just need to uncomment the following line in php.ini
extension=intl
I resolved this issue by adding PHP directory to PATH variable.
I just appended ;C:\xampp\php to Path variable in Windows Environment Variables.
For WampServer 2.5 (Apache 2.4.9 and PHP 5.5.12):
In default I've had php_intl enabled (you can enable it when you left click on the wamp icon in the system tray > PHP > PHP extensions and check if is it marked)
To have it properly working, I've had to copy:
C:\wamp\bin\php\php5.5.12\icu**51.dll
(total 8 files)
to
C:\wamp\bin\apache\apache2.4.9\bin
Then just restart the wamp and everything was just fine.
You can type this command in terminal: sudo apt-get install php-intl
I have PHP 5.3.1 and Apache
When I add the extension=php_intl.dll to php.ini and restart apache, it comes an alert that says "the requested operation has failed"
And this error on Event Monitor:
Faulting application name: httpd.exe, version: 2.2.14.0, time stamp: 0x4ac181d6
Faulting module name: php5ts.dll, version: 5.3.1.0, time stamp: 0x4b051b35
Exception code: 0xc0000005
The problem was some DLLs like icudt36.dll were missing (noticed with sysinternals ProcMon), I've downloaded php 5.3.1 zip version and extract all DLL's to PHP folder. That solved the problem.
When I faced this issue it was sorted out by using below mentioned steps:
Edit php.ini:
Make
;extension=php_intl.dll
to
extension=php_intl.dll
Simply copy all icu* * * *.dll files(any icu file with dll extension) from
C:\xampp\php to C:\xampp\apache\bin
Also If you have the msvcp110.dll missing file error. You have to download the right .dll or just go here http://www.microsoft.com/es-es/download/confirmation.aspx?id=30679 and install the vcredist_x64.exe and vcredist_x86.exe.
Now the intl extension should work :-)
I have IIS 7 and installed PHP using Microsoft Web Platform Installer on Windows 7. In IIS, go to PHP Manager in settings main page -> PHP Extensions -> Enable or Disable an Extension.
Intl extension is disabled by default.
I hope this helps
If you have the msvcp110.dll missing file error. You have to download the right .dll or just go here http://www.microsoft.com/es-es/download/confirmation.aspx?id=30679 and install the vcredist_x64.exe and vcredist_x86.exe, it worked for me.
There is a better way of doing this.
I was having same kind of problem with ldap, intl, curl php extensions. I've solved those issues by the following ways:
At first you've to check whether these extensions have been enabled in the php.ini file by removing semicolon (;) in front of the following lines:
;extension=php_intl.dll
;extension=php_ldap.dll
;extension=php_curl.dll
Now you can directly load those necessary dll files (ie libeay32, libssh2, ssleay32, icu**.dll ) from your httpd.conf (apache configuratio file) file. You don't have to do any other things like copying them to the apache's bin directory or php's ext directory. Just add them directly in you apache's httpd.conf file.
Please note that the followng example is for php version 5.5.x.
LoadFile "C:/php/icudt51.dll"
LoadFile "C:/php/icuin51.dll"
LoadFile "C:/php/icuio51.dll"
LoadFile "C:/php/icule51.dll"
LoadFile "C:/php/iculx51.dll"
LoadFile "C:/php/icutest51.dll"
LoadFile "C:/php/icutu51.dll"
LoadFile "C:/php/icuuc51.dll"
LoadFile "C:/php/libeay32.dll"
LoadFile "C:/php/libssh2.dll"
LoadFile "C:/php/ssleay32.dll"
That's it. Now, restart your apache or wamp and you're good to go.
In my case adding PHP directory to PATH in user environment didn't work. After some testing I've found that it should be added to system PATH (I don't know what's the name of this part of system setting windows, 'couse I have Polish Windows).
/Digger here/
Moving the icu*****.dll files to /ext/ seems to resolve the issue as well.
( If you specified the extension directory to be there of course )
In my xampp control panel, Click config to open php.ini
remove ; in
;extension=php_intl.dll
Then restart the apache.
Under php extensions in your wampserver, ensure intl is checked
check your extension_dir in your php/v7.0/php file ensure the directory is not commented and it is accurate
(Dont know if this contributed but i did all three)In your extension list in the same file as 2 above, include the intl file in the same format as the rest(if it is not included).
All the best
I was having trouble getting intl to run using PHP 7.1.7 and PhpStorm on Windows 10. Based on other answers here I could tell it was a PATH/DLL dependency problem but I couldn't seem to find all of the required files even after (re-)installing the Visual C++ Redistributable.
I eventually went searching my C: drive for vcr*.dll and found a copy of vcruntime140.dll in my C:\Program Files\Mozilla Firefox directory. So, in addition to making these changes to php.ini:
extension_dir = "ext"
extension=php_intl.dll
I also set my runtime PATH to ONLY the PHP directory (in my case, C:\Program Files\PHP\7.1.7) and the Firefox directory (above) and it FINALLY worked! I know it needs more than just the vcruntime140.dll but the other required DLLs must be in the FF directory too (there are a few dozen but I didn't bother to figure out which ones are essential).
You have to modify the php.ini file by removing the semi-colon on the line containing
extension=php_intl.dll
After this, go to the php folder of Xamp or Wamp or EasyPHP, copy every dll file containing
icu*,
Paste them inside your windows file.
That worked for me.
Configuration : EasyPHP Dev Server, Windows 10.

How to get CURL to work with PHP on Windows? (WAMP)

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.

Categories