How to enable SSL extension for Composer? - php

I am trying to use the PayPal PHP SDK to make an online store, however the documentation tells me I need composer. When I try to install composer I get this error. I have no idea what this means, or how to fix it. What can I do to fix this? I
P.S. There are quite a few questions about this on SO, however, all of them that I have seen ask about using WAMP or something similar. I have no intention of using WAMP, or anything like that. The only thing I am trying to do is install composer properly.
EDIT: I am just using the Composer installer for Windows.

You need PHP installed whether you have a full test environment running or not. If you can't run PHP from the command line Composer stuff doesn't work. With a basic install of PHP the openssl extension is included so that error would go away.
You can install PHP manually on its own, or you could just install WAMP or any of the many others. I use Zend Server myself. It just installs everything for you so that it works without needing to mess with manual installation.
Once PHP in general is installed, though, that should get rid of this error.

Related

Trying to get icu4c version 64 working with PHP 5.6 on Mac Catalina

I just got handed a big project running Symfony 3.4, and PHP 5.6, that I'm trying to get working on my "new" Mac Catalina (just purchased and installed, not upgraded from a previous macOS version), and I've gotten things working up to a certain point:
our-symfony-3-project $ bin/console server:start
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.64.dylib
Referenced from: /usr/local/opt/php#5.6/bin/php
Reason: image not found
zsh: abort bin/console server:start
I was able to fix a previous similar error with needing openssl 1.0.0 (I had to compile it from source using Homebrew then link it), and I think the solution is the same here, but it appears that I need to find the library or repo or download for icu4c version 64 (not sure I'm reading this right) to get brew extract to install it (it won't any other way), or figure out how to compile it and manually get it working for PHP 5.6, and I'm not finding the library I need apparently.
I've gone through pages and pages and probably a hundred command attempts trying to fix this error... and so far the recommendations have either been outdated (due to macOS/brew changes), or just didn't work.
I'd like to know where I can find the appropriate file/download/repo to just be able to install or compile this through brew or otherwise. PS: I know we shouldn't be using old versions but I just got this job and the company will not upgrade for a while.
I'm answering this by saying that I got the repo to work on a PHP 5.6 host using MAMP Pro (and Apache, not that that's relevant)... which already had the required libraries in question.
I went through the docs on the trial version (version 6.3.2):
https://documentation.mamp.info/en/MAMP-PRO-Mac/Settings/Hosts/General/
However, unlike Homebrew, switching PHP versions across hosts in MAMP Pro doesn't overwrite PHP symlinks like brew unlink and brew link does, I have to still edit my .zshrc file aliases and my PATH to have things like php (or pecl or pear etc) point to the MAMP Pro PHP version folders to get them to work correctly with the repos, as well as with composer (which runs the php command). Even MAMP's documentation says to modify the files yourself...
I can't tell yet if this difficulty is just natural to having multiple hosts with different PHP versions configured, as I could see how multiple variations running at the same time could conflict if they're using the same system files (like /usr/local files)... which sound like system software dependencies, and I don't know that these dependencies could be relegated to their own host folders (like /Applications/MAMP/bin/php/php5.6.40 folders), or maybe I just missed something somewhere. I'll update this answer if I learn better what to do here, or will add another answer if I find a way to do them using Homebrew better.

typo3/cms install with composer issue

I am really new in learning about CMS.
I started to create a test projekt for learning about TYPO3 and creating extbase ext.
Now I am stucked in installing TYPO3 with composer, it shows me this Problem.
couldnt find something in the web about this problem.
What do I have to do next? What do i have to looking for in the internet to solve the problem, or could one of you explain me (if quick), whats wrong here?my terminal Problem
You are missing the PHP extension xml which is one requirement to use TYPO3. Make sure you have enabled it in your server configuration. How this works depends on your environment thus you should check its documentation for this.
The composer error message tells you pretty clear what the problem is and what you have to do:
The Problem: PHP extension ext-xml is not installed
The Solution: Install it and activate it in the CLI context

Working with yaml

Me and a friend of mine are working with a project. She was responsible for a part of it, while I would add some functionalities to her code. So she send me her code and I should make it work in my machine and add my part.
However, I'm facing this problem. She has used yaml in the project (which I had no idea it existed before, I don't do web programming, only algorithm implementation). I tried to follow her instructions but got stuck at
Fatal error: Call to undefined function yaml_parse_file() in /var/www/html/cdn/map_of_site.php on line 8
So I thought that I should install the yaml library (which I think I did correctly).
I also added the yaml parser in the php.ini
But the error continues to appear.
The worst part is that I won't be able to get in touch with her for a couple of days (and I kind of dislike telling her that I don't know how to make her code work).
Could you please tell me in general what is required to make a project that uses yaml_parse_file() function work? Like what should I install or where to install it ...
PS: I work with linux mint and the project is php
Your frend used a php module that you don't have installed or enabled.
You can try to install it in the regular way (I don't know linux mint myself):
- apt-get install php5-yaml
- yum install php5-yaml
Or something like that.
If yaml is not available like that, you can try to use pecl.
You need this package: http://pecl.php.net/package/yaml
If you have pecl installed on your system (apt-get install pecl), you can just do pecl install yaml.
Usually when the extension is installed it is also directly enabled. You can test if it is enabled by creating a php file with <?php phpinfo(); ?> in it and running or visiting it (then search for yaml).
It turned out I hadn't installed yaml correctly. This article and the instructions that linux itself gives (<3) helped me solve it:
https://code.google.com/p/php-yaml/wiki/InstallingWithPecl

Setting up a PHP 5.2 server

I am not sure if this is the proper place for this, so I apologize if I should ask it elsewhere.
I am attempting to setup an old Drupal 5 site just for the purpose of being able to view it short term. To do this I need to install PHP 5.2 on the web server (Ubuntu 10.04). Does anyone have any suggestions on how to do this? I can't find a simple way to install old versions of PHP.
This is quite a problem, as you probably know PHP-5.2 is been dead for some time now, so you can't just apt-get install php. The best way to go is to compile it yourself.
You can grab a copy from the github PHP repository, and the follow the installation instructions (under ubuntu you'll need first to install the meta package build-essential to get all the tools needed to compile it).
Be aware that you should not run php5.2 in production by now!
PS: You'll probably have a better answer if you try superuser or serverfault.

Installing html_quickform2 with EasyPHP

I am using the most recent version of EasyPHP (a PHP 5.5 installation) as of this writing and it does not have Pear installed. That wasn't a problem until I read about html_quickform2 which seemed like a useful utility but I couldn't figure out how to add it to my project. It's installable via Pear but that's not included with EasyPHP anymore and I'm not sure how to set it up.
Does anyone know how to do this? Otherwise, is there a simple PHP library that allows me to just drop a couple of PHP files into my application instead?
See the installation instructions on the PEAR website.

Categories