Problems discovering channel in PEAR - installation

im having this problem. everytime i try to install something using channels i get this error:
Discovering channel pear.phing.info over http:// failed with message: channel-add: adding Channel "pear.phing.info" to registry failed
Trying to discover channel pear.phing.info over https:// instead
Discovery of channel "pear.phing.info" failed (channel-add: Cannot open "https://pear.phing.info/channel.xml" (Connection to `pear.phing.info:443' failed: Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?))
im not beyind any proxy, openssl is on
using windows and wamp server
any ideas???
thanks

It seems like its using PHP to make the connection. You need to make sure that openssl is enabled in your php.ini file.
Uncomment the line: extension=php_openssl.dll in php.ini
OR
For mac users you will need to use macports:
sudo port install php5-openssl

I had the same problem. No Proxy, OpenSSL enabled. I ended up with installing it "the new way": Just download the PHAR package, which also contains all dependencies. Run it via php phpunit.phar.

I've got the same error when trying to install phpunit
In my php.ini file
i've uncommented the line bellow by removing ";"
;extension=php_openssl.dll
Saved changes. And then i've run in cmd :
pear channel-discover pear.phpunit.de
pear upgrade-all
pear update-channels
Same problem.
So i've downloaded the phpunit.phar from this link and then i've run in cmd
php phpunit.phar
Now it's working :)

Set the proxy and everything should work:
pear config-set http_proxy http://login:pwd#server:port

Related

OpenSSl error using composer behind proxy on ubuntu

when i tried to run composer install on ubuntu 18.04 i got this:
The "https://packagist.org/packages.json" file could not be downloaded: SSL
operation failed with code 1. OpenSSL Error messages:
error:1408F10B:SSL routines:ssl3_get_record:wrong version number
Failed to enable crypto
failed to open stream: operation failed
I got the rigth proxy configuration on my /etc/apt/apt.conf and /etc/profile, but the error goes on and on, no mather what i do.
The proxy configuration needed for using composer is located in /etc/enviroment file.
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
http_proxy="http://username:password#10.4.1.20:3128"
https_proxy="http://username:password#10.4.1.20:3128"

Laravel valet not working

I use OSX El Capitan and PHP 7. I followed the installation guide so I install Laravel Valet version v1.1.3 successfully. I ping foo.dev or any.dev then the terminal prints
"64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.116 ms"
Everything is ok. My directory /User/mickey/Sites is added to Valet's paths. I created a Laravel 5.2 project named blog, then run the project with php artisan serve ok but when i accessed url blog.dev on the browser, the browser said
This site can’t be reached, blog.dev refused to connect. ERR_CONNECTION_REFUSED.
I don't know what is the problem with my installation. Thanks in advance!
You needn't run php artisan serve as Valet runs Caddy in the background.
Here're a few troubleshooting points.
Ensure that you don't have Apache (or anything else running on port 80)
sudo apachectl stop
Ensure that Valet is running
valet start
Ensure that PHP was installed with FPM
brew uninstall homebrew/php/php70
brew install homebrew/php/php70 --with-fpm
After trying everything I found on the internet (including this one which worth to try) for me the solution was to change valet's domain to test.
valet domain test
So I have no idea if the mentioned reinstall was needed or not but I know that I could ping or even curl my .dev sites but could not open them in any browser (Chrome nor Safari). Then I tried to set domain to .app but that did not work either. In the browsers I was redirected all the time to https even after running valet unsecure.
But then changed domain to .test and suddenly it started to work. I'm not sure what is the real issue here and why is this but I'm okay with it since it works again.
I've also read that .dev is not good any more because it's an official TLD and so reserved. (wikipedia)
I had nearly the same issue of Laravel Valet not working after installing via Homebrew on macOS 10.13 "High Sierra".
The problem I encountered was that DNSMasq would respond to queries, but Nginx would not handle the responses on port 80.
Attempting to connect to the site in a Terminal session would result in the following error:
$ curl -IL http://example.test/
curl: (7) Failed to connect to example.test port 80: Connection refused
I had recently upgraded from macOS 10.2 "Sierra" to 10.13 "High Sierra", so I suspected my Homebrew environment and configuration that was brought by the Migration Assistant could be at fault.
While following the troubleshooting advice here and elsewhere, what eventually solved my problem was to completely uninstall and remove Valet along with its dependencies (PHP, Nginx, DNSMasq, etc):
$ rm -rf ~/.valet
$ brew unlink nginx && brew remove nginx
$ brew unlink php56 && brew remove php56 && brew uninstall --ignore-dependencies php56
$ brew unlink php72 && brew remove php72
$ brew unlink dnsmasq && brew remove dnsmasq
With a clean slate, I was able to successfully install Valet:
$ brew update
$ brew install homebrew/core/php
$ composer global require laravel/valet
$ valet install
I then setup a new development domain:
$ valet domain test
$ valet park ~/Sites
$ mkdir ~/Sites/example && cd "$_"
$ valet link
$ echo "Hello, world" > ~/Sites/example/index.html
With Valet installed, I verified everything was working:
$ valet --version
$ sudo nginx -t
$ ping -c 4 example.test
$ curl -IL http://example.test/
$ valet open example
After doing all of this, I had a 100% successful working Laravel Valet environment.
Hopefully I can now solve this one for you. The Self Control fix worked as a temp fix for me so you may be in luck as I've found a permanent solution for me!
I once had a httpd setup which I followed a guide to install. This came with some baggage as the guide got you to forward 127.0.0.1 port 80 to port 8080.
Try this anyway Go > Go to folder...
/Library/LaunchDaemons/
The file in my case was called co.echo.httpdfwd.plist which I just needed to delete and then restart my Mac. See my question for more info Laravel Valet not working. 127.0.0.1 Connection Refused.
Let me know how you get on!
in my case, I encountered this after putting my mac to sleep but fixed it by running:
valet stop
and then
valet start
The problem was solved by starting self-control app. I don't know the reason but you can try to download and start this app to resolve this problem.

Installing Blackfire prob issue

Having some issue trying to get Blackfire.io set up on my homestead box.
Followed the installation guide a couple of times now, and no having no errors.
When I try to use the chrome companion I get the follow error ...
Are you authorized to profile this page? Probe not found, invalid signature
Also when I try to check out what version of the prob I am using via php --ri blackfire I get the follow message despite installing it as per the guide
Extension 'blackfire' not present.
Any ideas!?
Many thanks!
in my case (i'm using vagrant) this helped:
in file
/etc/php5/mods-available/blackfire.ini
add
extension=blackfire.so
In my case, I had to check the black-fire agent status, and when I found out it was not active I restart it and it works fine.
To check the status:
sudo /etc/init.d/blackfire-agent status
To restart :
sudo /etc/init.d/blackfire-agent restart
I had the same problem when installing blackfire probe as mentionned in the official documentation. And here is how i solved it.
Since I am using MAMP's php in my terminal i installed the PHP Probe manually instead of installing it with homebrew.
In fact in the first place i tried to instal it with homebrew and that's how i get the same error as you :
When i run this command :
php --ri blackfire
I get :
Extension 'blackfire' not present.
To fix this issue i had to install the probe manually by following theses steps:
download the probe library as mentionoed in the blackfire doc
You should have a file like this : blackfire-php-**********.so
rename it to: blackfire.so
execute this command in your terminal, it should tell you where you can put the downloaded file:
php -i | grep 'extension_dir'
move the blackfire.so file to the mentionned directory.
Close all your terminal windows and restart mamp
Execute php -m in your terminal; if you can see blackfire in the list that means that your extension is working correctly.

OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed Failed to enable crypto

I am using OS X Yosemite
I ran the following command in Composer because Laravel fails to download and install properly all the time:
composer diagnose
result:
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: FAIL
[Composer\Downloader\TransportException] The "https://packagist.org/packages.json" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Failed to enable crypto
failed to open stream: operation failed
Checking github.com rate limit: FAIL
[Composer\Downloader\TransportException] The "https://api.github.com/rate_limit" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Failed to enable crypto
failed to open stream: operation failed
Checking disk free space: OK
Checking composer version:
[Composer\Downloader\TransportException]
The "https://getcomposer.org/version" file could not be downloaded: SSL ope
ration failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify
failed
Failed to enable crypto
failed to open stream: operation failed
The main line I want to focus on is:
SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Failed to enable crypto
How can I fix this. I have tried several solutions on the web and none have worked. I am totally new to the use of the command line.
When downloading and installing Laravel with the following command: composer create-project laravel/laravel --prefer-dist can't I just manually download the stuff myself and place it in the correct folder to avoid this SSL problem?
Note: I am running OS X Yosemite. I believe this works with Mavericks too.
After looking a several answers and combining them mixing and matching etc. Here is a rough explanation on what I did.
Open the command line and run:
locate cacert.pem
This will list all the locations where your certificates are.
My result:
/Applications/Adobe Dreamweaver CS6/Configuration/Certs/cacert.pem
/Applications/MAMP/Library/lib/python2.7/test/pycacert.pem
/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pip/_vendor/requests/cacert.pem
/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/test/pycacert.pem
/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/test/test_asyncio/pycacert.pem
/Users/robert/.composer/cacert.pem
/opt/vagrant/embedded/cacert.pem
/usr/ssl/certs/cacert.pem
I downloaded the most recent one from curl
http://curl.haxx.se/docs/caextract.html
I made a directory in /usr/ssl/certs/
and put the downloaded cert there /usr/ssl/certs/cacert.pem
I opened up my php.ini file and placed this line at the top of the file:
openssl.cafile=/usr/ssl/certs/cacert.pem
Restart apache (stop apache and start it again)
Everything worked out for me.
Now one thing that I do believe needs to be done is you need to tell the command line which PHP you are referring to. I am running PHP under XAMPP and not natively on my OS X. So the command line will think that you are referring to the native PHP on OS X and not the one running on XAMPP. This needs to be changed I believe for this to work. If not then it should be good.
As mentioned this solution worked for me.
I faced this issue while executing composer install in Magento 2 , on MAMP , Mac m1 the issue was fixed after I replaced the file in path : /Applications/MAMP/Library/OpenSSL/cert.pem
with the pem file downloaded from the :
http://curl.haxx.se/docs/caextract.html
hope this helps someone on .
The easiest way without the need to change the php.ini file:
DEBIAN/UBUNTU:
# apt-get install ca-certificates
FEDORA:
# dnf install ca-certificates.noarch
CENTOS/REDHAT
# yum install ca-certificates.noarch
Source:
https://linuxconfig.org/routines-ssl3-get-server-certificate-certificate-verify-failed
Another possible reason is that the server's SSL cert has expired. If it is your server, check the /etc/apache2/ssl (for ubuntu). The certs usually last for 365 days. See 'https://www.digitalocean.com/community/tutorials/how-to-create-a-ssl-certificate-on-apache-for-ubuntu-14-04' on how to create one.

Class 'AMQPConnection' not found

I am using Mac OSX Lion. I am running php ver 5.3.6 through MAMP and when trying the create a AMQPConnection I get this error
Class 'AMQPConnection' not found
I installed rabbitmq through macports using this command
$ sudo port install rabbitmq-server
I run the server using this command
$ sudo rabbitmq-server -detached
It all works fine
I added "extension=amqp.so" to my php.ini file. More specifically my /Applications/MAMP/bin/php/php5.3.6/conf/php.ini file.
I have rabbitmq-c
I ran autoreconf -i && ./Configure && make && sudo make install with no errors
I configured rabbit with this command phpize && ./configure && make && make install
All that seemed to go perfectly.
I even created my user with permissions and verified those permissions with the web plugins that can be accessed through localhost:55672
I even tried copying amqp.so into my /Applications/MAMP/bin/php/php5.3.6/lib/php/extensions/no-debug-non-zts-20090626/ file in a futile attempt to get it working.
Everything that I have done has seemed to work flawlessly. I get no error/warning messages. The Rabbit server is running. I ran it without the -detached option to see if I was getting any errors there. Nothing.
Any Suggestions??????
Best way to test your RabbitMQ Server installation is by testing with simple python code.
Installing PIKA library on Mac OSX is very easy. Follow the steps given here.
http://www.rabbitmq.com/tutorials/tutorial-one-python.html
copy paste and create two python files receive.py and send.py. Execute these from two terminal windows. In about 10 minutes you'll know that RabbitMQ is able to receive the message and queue.
Create the info.php on server with
Check the results from browser if it shows AMQP library is active.
I feel your RabbitMQ server is installed, but PHP library is not getting loaded correctly.
Check your error.log. There must be some details why it is failing to load 'amqp.so' file.
Can You please Add:
use PhpAmqpLib\Message\AMQPMessage;
under your:
use PhpAmqpLib\Connection\AMQPStreamConnection;
line and it will work.

Resources