I've installed Xdebug in my system. Then in PhpStorm I've done all the configuration to debug the code using Xdebug.
But in Xdebug is not working properly with PhpStorm. So I would like to remove Xdebug from my local machine. But it's unable to uninstall it.
Using the following command I understood it was installed in my local machine:
php -v shows:
PHP 7.3.28-2+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Jun 4 2021 21:23:19) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.28, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.28-2+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
with Xdebug v3.0.4, Copyright (c) 2002-2021, by Derick Rethans
But while ran the uninstall command I am getting the following response in terminal:
sudo apt-get remove php-xdebug
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'php-xdebug' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 58 not upgraded.
Previously I was using Xdebug v2.9.8, it was working fine and I was able to debug the code. So I would like to install the same version.
So looking forward for your support to uninstall version 3 and proper command to install version 2.9.8 in my PHP 7.3 version.
Related
I have recently upgraded my Mac to run PHP 8. I noticed Xdebug was no longer installed, so I tried to install it again but I get the following error:
% pecl install xdebug
/usr/local/bin/pecl: line 28: /usr/local/Cellar/php#8.0/8.0.15/bin/php: No such file or directory
/usr/local/bin/pecl: line 28: exec: /usr/local/Cellar/php#8.0/8.0.15/bin/php: cannot execute: No such file or directory
I tried the wizard at https://xdebug.org/wizard, but I can't get phpize installed.
My Mac is running Montery 12.0.1, any idea how I can fix this?
I had the same error message, I resolved it by reinstalling PHP 8.0 with homebrew as explained in this answer:
brew install php#8.0
Be careful that homebrew with also try to update all dependencies and other packages.
Then pecl worked again and I could install xdebug.
[22:39:40] coil#mac-mini.home:/Users/coil/Sites/strangebuzz.com$ php -v
PHP 8.0.19 (cli) (built: May 12 2022 09:09:32) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.19, Copyright (c) Zend Technologies
with Xdebug v3.1.4, Copyright (c) 2002-2022, by Derick Rethans
with Zend OPcache v8.0.19, Copyright (c), by Zend Technologies
I'm trying to install PHP 7.(2|3) with Homebrew on Mojave 10.14.5 and I can't get it to work.
Fresh install of Mojave with only :
Google Chrome
Iterm
Zsh
Oh My Zsh
Right after Mojave is installed I run the following in my terminal :
Install Homebrew (command line from the official website)
brew install composer
brew install php
composer global require laravel/installer (composer is in the path)
laravel new blog
It ends up with a segmentation fault :
[1] 9310 segmentation fault laravel new blog
I tried to reboot, uninstall and reinstall PHP/Homebrew/Mojave several times. I always ends up with the same error.
Also tried with php#7.2 and php#7.1 and other packages like wp-cli, it's the same.
I'm desperate, please help.
EDIT WITH MORE INFO :
composer --version:
Composer version 1.8.6 2019-06-11 15:03:05
php -v:
PHP 7.1.26 (cli) (built: Apr 23 2019 10:38:28) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.1.26, Copyright (c) 1999-2018, by Zend Technologies
php -i:
here
I have installed composer but when I try to run $ composer I get the following error:
php: error while loading shared libraries: libicui18n.so.55: cannot
open shared object file: No such file or directory
The php -v command returns:
PHP 7.1.23-2+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Oct 15 2018
11:37:26) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine
v3.1.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.1.23-2+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
I have tried to search for libicu in synaptic and I installed libicu60!
However, php composer.phar works fine
composer shouldn't need that dependency, but in case it really does, this should work:
wget http://security.ubuntu.com/ubuntu/pool/main/i/icu/libicu55_55.1-7_amd64.deb
sudo dpkg -i libicu55_55.1-7_amd64.deb
sudo apt-get -f install
However, I'd post that as a bug to composer maintainers (github repo), because the package should have this as a dependency and install it along the way with apt.
Composer.phar is really a standalone program, so it doesn't need other dependencies. much like a snap package.
Trying to configure my Vagrant server to use Xdebug. Read that it comes with Xdebug, but I checked this and doesn't seem to be true.
SSH into Vagrant machine,
$ php -v
reveals that machine is using
PHP 7.2.0-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Nov 30 2017 13:58:33) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.2.0-1+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2017, by Zend Technologies with blackfire v1.18.0~linux-x64-non_zts72, https://blackfire.io, by SensioLabs
No xdebug. So I tried installing xdebug with
$ brew install homebrew/php/php72-xdebug
Seemed to work. But then I tried finding the path to xdebug.so:
$ locate xdebug.so
/usr/lib/php/20131226/xdebug.so
/usr/lib/php/20151012/xdebug.so
/usr/lib/php/20160303/xdebug.so
Tried putting all of these into php.ini, and they all failed.
Tried installing via
$ sudo apt-get install php7.2-xdebug
E: Unable to locate package php7.2-xdebug
So, I searched, and found:
$ apt search xdebug
Sorting... Done
Full Text Search... Done
php-xdebug/xenial,now 2.5.5-3+ubuntu16.04.1+deb.sury.org+1 amd64 [installed] Xdebug Module for PHP
What am I doing wrong to get Xdebug and php configured on my remote machine?
I was testing with Postman using the mapped domain.. Using the actual server IP works.
So, instead of "restfulapi.dev", hit "128.153.123.21" or whatever it is.
Very silly.
I've just moved from a WAMP installation to Homestead and I can't get my app running.
When running composer install I get this error:
Use of undefined constant MCRYPT_RIJNDAEL_128 - assumed 'MCRYPT_RIJNDAEL_128'
Many people seem to have problems with that but most of them use custom installation (they install php from scratch for example). I have just followed the steps here.
I tried to grep mcrypt from php --info and not a single line is returned so I assumed mcrypt is not install.
I've run sudo apt-get install php5-mcrypt and it says:
php5-mcrypt : Depends: phpapi-20121212
I could try to install this dependency but I'm wondering if I'm doing something wrong (the point of using Homestead was to get rid of everything but the project itself, I assume).
The php version used in the vm:
PHP 7.0.2-4+deb.sury.org~trusty+1 (cli) ( NTS )
Copyright (c) 1997-2015 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2015 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
with Xdebug v2.4.0RC3, Copyright (c) 2002-2015, by Derick Rethans
(Not sure why it's php 7, I've never asked for that.)
Any help would be greatly appreciated :)
The latest Homestead with PHP7 does not support Laravel 5.0, out of the box.
As mentioned above in the comments this worked:
git clone -b 2.0 https://github.com/laravel/homestead.git