Problem: Because the xdebug extension is enabled, the prompt "{code...}" appears when you use composer ...} so I want to stop loading the xdebug environment under cli: linux is installed for archlinuxphp through pacman, and version 7.0.1web service runs the configuration file distribution through php-fpm: {generation... problem:
When composer is used, the following message is displayed:
You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug
So I want to stop loading xdebug under cli.
Environment:
Configuration file distribution:
/etc/php├── conf.d│ └── xdebug.ini├── fpm.d├── pear.conf├── php-fpm.conf├── php-fpm.d│ └── www.conf├── php.ini└── php.ini.pacnew
Compare the distribution of php configuration files installed with apt in ubuntu:
/etc/php5/├── cli│ ├── conf.d│ └── php.ini├── fpm│ ├── conf.d│ │ ├── 20-xdebug.ini -> ../../mods-available/xdebug.ini│ ├── php-fpm.conf│ ├── php.ini│ └── pool.d│ └── www.conf└── mods-available └── xdebug.ini
--- Update ---
InDo not compile and install the configuration manually, and re-specify the config parameters.
In this case, you have to manually specify php. ini to run.
Reply content: Question:
When composer is used, the following message is displayed:
You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug
So I want to stop loading xdebug under cli.
Environment:
Configuration file distribution:
/etc/php├── conf.d│ └── xdebug.ini├── fpm.d├── pear.conf├── php-fpm.conf├── php-fpm.d│ └── www.conf├── php.ini└── php.ini.pacnew
Compare the distribution of php configuration files installed with apt in ubuntu:
/etc/php5/├── cli│ ├── conf.d│ └── php.ini├── fpm│ ├── conf.d│ │ ├── 20-xdebug.ini -> ../../mods-available/xdebug.ini│ ├── php-fpm.conf│ ├── php.ini│ └── pool.d│ └── www.conf└── mods-available └── xdebug.ini
--- Update ---
InDo not compile and install the configuration manually, and re-specify the config parameters.
In this case, you have to manually specify php. ini to run.
Use two different php. the ini configuration file configures different running parameters (including extended parameters). When cli or fpm is enabled, use the-c parameter to specify the php. ini.
Both PHP and PHP-FPM can use the-c parameter to specify the php. ini configuration file.
Run the following command:
strace -f -o strace.log \/png/php/5.4.45/bin/php -v && \cat strace.log|egrep 'open|read'|grep 'ini'3080 open("/png/php/5.4.45/bin/php-cli.ini", O_RDONLY) = -1 ENOENT (No such file or directory)3080 open("/png/php/5.4.45/lib/php-cli.ini", O_RDONLY) = -1 ENOENT (No such file or directory)3080 open("/png/php/5.4.45/bin/php.ini", O_RDONLY) = -1 ENOENT (No such file or directory)3080 open("/png/php/5.4.45/lib/php.ini", O_RDONLY) = 3
PHP will first read the php-cli.ini under the directory where the php program is located, access to it will not read other INI files.
The PHP-FPM is as follows:
strace -f -o strace.log \/png/php/5.4.45/sbin/php-fpm -v && \cat strace.log|egrep 'open|read'|grep 'ini'3537 open("/png/php/5.4.45/lib/php-fpm-fcgi.ini", O_RDONLY) = -1 ENOENT (No such file or directory)3537 open("/png/php/5.4.45/lib/php.ini", O_RDONLY) = 3
The PHP-CGI is as follows:
strace -f -o strace.log \/png/php/5.4.45/bin/php-cgi -v && \cat strace.log|egrep 'open|read'|grep 'ini'3568 open("./php-cgi-fcgi.ini", O_RDONLY) = -1 ENOENT (No such file or directory)3568 open("/png/php/5.4.45/bin/php-cgi-fcgi.ini", O_RDONLY) = -1 ENOENT (No such file or directory)3568 open("/png/php/5.4.45/lib/php-cgi-fcgi.ini", O_RDONLY) = -1 ENOENT (No such file or directory)3568 open("./php.ini", O_RDONLY) = -1 ENOENT (No such file or directory)3568 open("/png/php/5.4.45/bin/php.ini", O_RDONLY) = -1 ENOENT (No such file or directory)3568 open("/png/php/5.4.45/lib/php.ini", O_RDONLY) = 3
You can disable the 20-xdebug.ini of conf. d In the cli directory.