- 最新
- 最多得票
- 最多評論
Xdebug is an extension for PHP, and provides a range of features to improve the PHP development experience. Step Debugging. A way to step through your code in your IDE or editor while the script is executing.
how to install Xdebug on Amazon Linux.
- Update your system packages:
sudo yum update
- Install the EPEL repository, which provides additional packages, including Xdebug:
sudo amazon-linux-extras install epel
- Install the appropriate PHP development package:
3.1. For PHP 7.x:
sudo yum install php-devel
3.2. For PHP 8.x:
sudo yum install php80-devel
- Install the Xdebug extension:
sudo yum install php-xdebug
- Enable and configure Xdebug by editing your php.ini file, typically located at /etc/php.ini or /etc/php.d/xdebug.ini.
Add the following lines to enable remote debugging: ini
zend_extension=xdebug.so
xdebug.mode=debug
xdebug.start_with_request=yes
xdebug.client_host=<YOUR_HOST_IP>
xdebug.client_port=9003
Replace <YOUR_HOST_IP> with the IP address of your development machine.
- Restart your web server (Apache or Nginx) to apply the changes:
6.1. For Apache:
sudo systemctl restart httpd
6.2. For Nginx:
sudo systemctl restart nginx
- Restart the PHP-FPM service if you are using it:
sudo systemctl restart php-fpm
Sorry you are right
i have tested the steps Installation From Source @ https://xdebug.org/docs/install#linux
by installing php-devel and git
so i managed to install php xdebug on amazon 2023 maybe this works for you
note 1: replace git:// with https:// note 2 : run rebuild sith sudeo ./rebuild.sh to compile and deploy xdebug then follow the other steps
I was hoping to avoid compiling from source but -- since you have been so good as to try it and you say it works I will give it a go. Thanks
Good Luck and please update this post if you find another way to do i t
sudo yum install php-pear
sudo yum install php-devel
sudo pecl install xdebug
sudo systemctl restart httpd
sudo systemctl restart php-fpm
add zend_extension=xdebug to php.ini
相關內容
- 已提問 10 個月前
- 已提問 6 個月前
- AWS 官方已更新 1 年前
Thanks for the attempt but.... These instructions work for Linux 2 but not for 2023. It fails at: sudo amazon-linux-extras install epel with sudo: amazon-linux-extras: command not found Any one know what happened to linux-extras for 2023? Edit: I just found in the release documents: However, AL2023 doesn't support EPEL or EPEL-like repositories.