Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
373 views
in Technique[技术] by (71.8m points)

phpStorm为何会运行9000端口?以及如何才能找到/usr/bin/php的配置文件?

1)我在查看9000端口的时候,发现把绑定它的是phpstorm进程:

phpstorm 2113 ldl 36u IPv4 0x9663f0366e0e43a3 0t0 TCP *:9000 (LISTEN)

也就是说,这里是phpStorm开启了9000端口来运行PHP,但是为何phpStorm会运行php呢?这个作用是什么?

2)我退出phpStorm, 然后9000端口就down掉,说明就是phpStorm在运行PHP。
但是现在我执行php命令:

php --version
PHP 7.3.9 (cli) (built: Nov 9 2019 08:08:13) ( NTS )

这个能说明php是在运行的吗?如果不是,是否是有fpm-php进程,才能说明php是运行的?

3)我找到php位置:

$ whereis php

/usr/bin/php

但是怎么才能知道/usr/bin/php的配置文件所在位置呢?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

9000 是 xdebug 的端口
这个确实和 php-fpm 冲突, 不过不得不说实际上 xdebug 使用这个端口比 php-fpm 的历史还要早
所以改个端口就行了
另外你如果仅是本地开发, 其实 php -S 这个给开发用的单线程 HTTP 服务器也挺好用的 (但静态文件你需要在 index.php 里面判断处理下)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...