Connect failed when installed PHPUnit - phpunit

I had a problem when installed PHPUnit, i couldn't open a connection when used pear channel-discover (website pear.phpunit.de is normal and i still use channel-info or clear-cache normally). I tried many ways but failed.
I hope a help from you,
Thank everyone very much,
Command line: pear channel-discover pear.phpunit.de
Error: ...Connection to 'pear.phpunit.de:80' failed: A connection attempt...because connected host has failed to respond

You are not supposed to use pear distribution for phpunit anymore.
The only valid day to install it these days is composer. Here are the instructions on how to do that.
Relevant Sebastian Bergmann tweets:
https://twitter.com/s_bergmann/status/539426863375212544
https://twitter.com/s_bergmann/status/539427096750481408

Related

Trying to run mariadb using homebrew and receiving the following error Bootstrap failed: 5: Input/output error

When I enter "brew services start mariadb" on the command line I receive the following error -
Bootstrap failed: 5: Input/output error
Try re-running the command as root for richer errors.
Error: Failure while executing; /bin/launchctl bootstrap gui/501 /Users/jordanjohnston/Library/LaunchAgents/homebrew.mxcl.mariadb.plist exited with 5.
I've seen folks having the same error and have tried entering -
"launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mariadb.plist"
followed by -
"launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mariadb.plist"
which does nothing for me, still receiving the same error. I have also entered "brew restart mariadb" which does not work either. I have also uninstalled and reinstalled mariadb which did not work. Thank you in advance for any help!
Also tried the same as you described with no luck. Finally ended up reinstalling Homebrew:
Make any pending updates for XCode. However, it might ask to also update the developer tools later on in step 4
Remove Homebrew. Make sure to have a backup of anything you want to save. For me, it was MariaDB and PostgreSQL databases. I also kept track of any important package I wanted to reinstall later:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
Remove any other pending directory as Homebrew suggests:
sudo rm -r /opt/homebrew
Reinstall Homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Install MariaDB:
brew install mariadb
Start MariaDB:
brew services start mariadb
Check that is all good:
brew services list
You should see something like this:

Centos7: Can't install nginx (or epel)

I have a clean install of Centos 7 on a RaspberryPi3b+. I am trying to install nginx and am running into problems with each approach.
Most of the research I've done points to installing epel, and then installing nginx. When I run yum install epel-release, I get the error:
No package epel-release available.
Error: Nothing to do.
Some searching led me to wget it directly from fedora. I was able do that. I then ran rpm -ivh epel-release-latest-7.noarch.rpm successfully and then tried yum install nginx. That gave me this long error:
One of the configured repositories failed (Unknown),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:
1. Contact the upstream for the repository and get them to fix the problem.
2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).
3. Run the command with the repository temporarily disabled
yum --disablerepo=<repoid> ...
4. Disable the repository permanently, so yum won't use it by default. Yum
will then just ignore the repository until you permanently enable it
again or use --enablerepo for temporary usage:
yum-config-manager --disable <repoid>
or
subscription-manager repos --disable=<repoid>
5. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:
yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true
Cannot retrieve metalink for repository: epel/armhfp. Please verify its path and try again
So, I found another method that doesn't require epel. I created a .repo file for nginx at /etc/yum.repos.d/nginx.repo, and added:
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=0
enabled=1
I ran yum repolist and got an error:
http://nginx.org/packages/centos/7/armhfp/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
For laughs, I tried installing nginx anyway and got an error similar to the long one above that the nginx repo failed.
Finally, I tried going to nginx.org and finding the correct link and hard-coding it in the repo file. That didn't work either, and now I am well and truly stuck.

Can't start symfony server

I'm new to symfony and while following the video tutorial, I ran into the problem. The guy in the video started his server without any problems, but for me, while trying to run php bin/console server:start I get a huge error message. Please bear with me as Im the begginer and thank you for all the help.
You're missing the DOM library. As the first comment on Installing/Configuring notices, on some linux-distributions this library is not included in the minimal PHP package.
Certain Linux distributions do not have this extension included in the
minimum PHP package. It can usually be found in one of the "optional"
php-* packages.
For CentOS, you will need to run "yum install php-xml", which provides
this extension.
As this looks like ubuntu, sudo apt-get install php-xml should do the job.

How to install libraries with pear when no release is available

This is not the first time I experience something like that. This time it was with PHPunit.
I wanted to install the library using pear..
pear config-set auto_discover 1
pear install pear.phpunit.de/PHPUnit
The installation fails saying :
No releases available for package "pear.phpunit.de/PHPUnit"
What can I do ?
Thank you
Note :
pear upgrade says that I have the latest version
pear update-channels says that I am up to date
Note2 : I am at work so behing a proxy
Note3: using windows OS
In Windows Explorer, go to your WAMP PHP installation folder (default will be C:\wamp\bin\php\php[version]).
Create a new directory called “PEAR” here.
Download the PEAR phar installer https://phar.phpunit.de/phpunit.phar and place it in the new directory above.
Fire up a cmd window (Start and search for “cmd”) as administrator
Change to your new directory
(default command will be “cd C:\wamp\bin\php\php[version]\PEAR”)
Run the following command: “php go-pear.phar”.
The first thing that the installer will ask is whether you are installing a system wide copy of PEAR. Since you are probably working on a development machine, either is fine. Just press enter to install system wide.
Next, the installer will show you a bunch of paths that it automatically calculated by using it’s current location on your disc.
You mentioned you are behind a proxy, you may then need to set it explicitly, with something like the following:
$ pear config-set http_proxy http://username:password#proxy.example.com:80
I found it in another post. the cache has to be cleared.
pear clear-cache

Running PHPUnit from CMD in Windows

I've installed PHPUnit and everything seems to be working fine as when I run phpunit from the root php directory C:\wamp\bin\php\php5.4.16 it runs as expected.
However, the problem I am having is running PHPUnit from elsewhere within the command line, so I cannot run any tests because of this. I get the error
phpunit' is not recognized as an internal or external
command, operable program or batch file.
My path is set correctly C:\wamp\bin\php\php5.4.16 which is where php.exe is installed.
I have also tried re-installing, and am running version 3.7.24.
Anyone have any tips on what I may be doing wrong?
PHPUnit is not set in the PATH global variable. Try installing PHPUnit using PEAR. For win7 use this tutorial: http://designbyjeeba.blogspot.ro/2012/12/easy-way-to-install-pear-and-phpunit-in.html
If PEAR doesn't find any package to install (when trying to install anything using it) clear PEAR's cache:
pear clear-cache
I dont know the way you installed it, but i did it this way and it works fine for me.
Also i recommend installing DBUnit and PHPUnit selenium. Use the following commands:
pear install phpunit/PHPUnit_Selenium
pear install phpunit/DbUnit
For Linux use the commands given by PHP at the following link:
http://phpunit.de/manual/3.7/en/installation.html

Resources