I'm beginer with Symfony2 Framework and php. I have started doing a SF2 tutorial and i stopped on setting up the project. I can't install Composer from SF official page on Windows 8, when i choose a php.exe from my php file and click install, then i see following 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
I'm working with WebServ 2.1. I have added to php.ini DEVELOPMENT following code
extension_dir = C:\WebServ\php\ext
extension=php_openssl.dll
C:\WebServ\php\ext is a path to folder with extension files and it contain php_openssl.dll.
It still doesn't work. Do anybody knows how to fix it?
Print phpinfo() and make sure SSL is present there.
Don't forget to restart the webserver after editing php.ini
Related
I am trying to make composer install in my Symfony 4 project with Sonata Admin Bundle. But still getting this error and it drives me mad. I can't find any information :/ do you have any adivces or answer?
Thank you :)
I assume you're using XAMP or similar on Windows OS because you have a C:/[..] path in the error message.
You need to enable the PHP gd extension (used for image processing) to get rid of the error.
Gd not installed
Search for your php.ini configuration file, look for "extension=gd2" and uncomment it.
The path for XAMP is <xampp_dir>/php/php.ini.
Eventually there are multiple php.ini files i.e. one for the PHP CLI and another one used by your webserver. Enable the extension in all of them.
Restart your webserver (likely apache) afterwards.
I wanted to install composer on my other computer. I have encountered this question before but none of the answers seem to work for me.
I tried enabling the openssl package in php.ini but it is already enabled. i tried changing the include path in my php.ini file. I reinstalled mamp . But none of the above fix the problem.
i'm using php 5.6.8
I fixed the problem by putting the php.ini file in the c:\windows file, it's a messy solution but it works. I can't use MAMP PRO anymore for some reason it keeps crashing, but it works on MAMP and i installed composer.
I suggest to take the following steps to make sure that the openssl extension gets loaded:
determine where your PHP is: open a command prompt, then php --ini.
find under "Loaded Configuration File" the path to the active php.ini
make sure this php.ini has extension=php_openssl.dll
I think you either have multiple PHP version installed and the Composer installer picks the one, where you didn't modify the php.ini or starts php without an php.ini.
(There are server stacks for windows with composer support out of the box, like wpn-xm. Sorry, shameless plug.)
openssl missing whene install composer
my windows: 10
local server: UwAmp
I've activated openssl in :
C:\UwAmp\bin\apache\php.ini
C:\UwAmp\bin\php\php-5.4.31\php.ini-development & php.ini-production (2 files) by delete - ; -
As well as from UwAmp GUI
But
This problem is not solved
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
Thank you
I ran into the same issue installing Composer with MAMP for Windows 10. My php.ini file was not in the same directory as php.exe. I'm guessing Composer doesn't know to look elsewhere for the ini.
Try making a copy of your php.ini from C:\UwAmp\bin\apache\php.ini, pasting it into C:\UwAmp\bin\php\php-5.4.31, and then try to run the Composer setup again. Confirm that extension=php_openssl.dll is not commented out with a ;.
Copy php.in from php dir to Apache24/bin works for me. Please make sure you enable the extension in there.
Composer has nothing to do with apache, so C:\UwAmp\bin\apache\php.ini doesn't matter.
php.ini-development and php.ini-production are sort of examples to get started with. So you should choose one (probably development) and rename it to php.ini for it to actually work.
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 want to install zend framework 2 Skeleton App
I did php composer.phar self update
Downloading completed: 100%
Then I did php composer.phar install
I get this error [RuntimeException] You must enable the openssl extension to download files via https.
I tried editing my php.ini and uncomment: extension=php_openssl.dll
I still get the same Error!
Thank you
**
SOLUTION
**
Verify you are editing the correct php.ini file.
Reference: https://github.com/composer/composer/issues/1440
"WAMP uses different php.ini files in the CLI and for Apache. when you enable php_openssl through the WAMP UI, you enable it for Apache, not for the CLI. You need to modify C:\wamp\bin\php\php-X.Y.Z\php.ini to enable it for the CLI."
Answered By on another post by: Duramba
Verify you are editing the correct php.ini file.
Reference: https://github.com/composer/composer/issues/1440
"WAMP uses different php.ini files in the CLI and for Apache. when you enable php_openssl through the WAMP UI, you enable it for Apache, not for the CLI. You need to modify C:\wamp\bin\php\php-X.Y.Z\php.ini to enable it for the CLI."
Answered On other post By: Duramba
Thank you