Tag: phpstorm

在PhpStorm中debugging2个应用程序

我有两个应用程序在单个PHP容器上运行。 应用程序使用cURL通过HTTP相互通信 xdebugconfiguration是: xdebug.remote_enable=1 xdebug.remote_autostart=1 xdebug.remote_connect_back=1 xdebug.remote_host=172.17.0.1 xdebug.remote_port=9000 xdebug.remote_log=/tmp/php5-xdebug.log 我使用PhpStorm作为我的IDE,如果我尝试单独debugging每个应用程序(我也将同时连接设置为3,但显然没有帮助) 我想要做的是testing一个E2Escheme,这意味着我将开始一个项目的debugging过程,并且在调用API时,我会继续在另一个项目的窗口中进行debugging。 到目前为止,我找不到解决scheme,再加上PhpStorm只允许我为debugging过程select一个项目(附图)。 任何想法如何解决这个问题?

无法在Windows上使用docker-container作为PhpStorm中的php解释器

我使用docker-tools在Windows 7上运行docker。我有docker-machine安装程序,我从命令行运行的命令正常工作。 我现在试图把这个整合到PhpStorm中。 这是我尝试的两件事情: 1.作为当地口译员 我做了以下内容的php.bat @echo off SET DOCKER_TLS_VERIFY=1 SET DOCKER_HOST=tcp://192.168.99.100:2376 SET DOCKER_CERT_PATH=C:\Users\phillaf\.docker\machine\machines\default SET DOCKER_MACHINE_NAME=default docker run -it –rm -v /c/Users/phillaf/app:/app -w /app php php %* 我可以使用php.bat从Windows命令行成功运行PHP脚本。 在PhpStorm我尝试添加php.bat作为本地PHP解释器,但它不被认为是一个解释器。 2.作为远程口译员 我可以使用docker@192.168.99.100 ,密码tcuser成功连接到docker@192.168.99.100 -machine。 然而PhpStorm似乎无法连接相同的信息。 我试图设置它作为一个远程解释器。 在Settings > Languages & Frameworks > PHP > Interpreters > Remote ,添加SSH信息,然后单击浏览。 我收到错误“无法发送频道请求”。

Docker上的Xdebug不支持PhpStorm

我在Docker中很新。 我无法将Docker容器上的xdebug连接到PhpStorm IDE。 我花了很多时间去寻找如何解决负面结果。 我很确定我尝试了所有我find的东西,并find更多的解决scheme。 我知道这里有很多文字,但我希望有人能得到它:D 我的PhpStorm是v 8.0.3 我的实际docker组成snip: ports: – "8081:8081" – "80:80" – "443:443" expose: – "9001" links: – magedb_m1 environment: XDEBUG_CONFIG: "remote_host=172.17.0.1" PHP_IDE_CONFIG: "serverName=docker" XDEBUG_CONFIG: "idekey=PHPSTORM" PHP_XDEBUG_ENABLED: 1 volumes: – ./project/:/var/www/html/ xdebug.ini: [xdebug] zend_extension=xdebug.so xdebug.idkey = "PHPSTORM" xdebug.default_enable=1 xdebug.remote_enable=1 xdebug.remote_handler=dbgp ; This is the default Docker gateway xdebug.remote_host=172.17.0.1 xdebug.remote_port=9001 xdebug.remote_autostart=1 xdebug.remote_connect_back=0 PhpStorm […]

除了Docker容器中的两个用户以外,如何让我的桌面Ubuntu机器的用户对泊坞窗的完全权限?

我有一个docker容器,它有一个www-data用户的PHP-FPM。 我有一个卷,我的本地应用程序映射到/var/www/html目录。 我find了www-data的UID(比方说33)。 在我的本地机器上,我将应用程序目录chown到33:hostuser,其中33是Docker中的www-data用户,hostuser是我在主机上的组。 现在PHP-FPM可以在应用程序中写入日志等,我可以在本地写入文件。 现在,棘手的部分:我正在努力让PhpStorm运行PHPUnittesting,并且将Docker容器设置为PHP的远程解释器。 换句话说,PhpStorm将HHS放入容器并运行testing。 所以现在我需要在容器中创build一个新的用户,我可以SSH进入。 现在的问题是:这个新用户不是应用程序目录(www-data是)的所有者,并且该组不属于容器内的任何人。 我正在以正确的方式进行吗? 如果是这样,让所有3个用户访问容器的最佳方式是什么? 我正在考虑为www数据用户启用SSH,但是我无法正常工作,反正我不确定这是个好主意。

如何使用Xdebug和phpStormdebuggingSymfony命令?

首先让我们开始说我在一个Docker容器中运行整个项目,这意味着我没有在主机上安装任何东西。 有这个我正在尝试debugging一个Symfony命令,这是一种CLI脚本,它不会被称为php script.php而是作为bin/console command 。 console文件里面有什么? 见下文: #!/usr/bin/env php <?php use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Component\Console\Input\ArgvInput; use Symfony\Component\Debug\Debug; set_time_limit(0); /** @var Composer\Autoload\ClassLoader $loader */ $loader = require __DIR__.'/../app/autoload.php'; $input = new ArgvInput(); $env = $input->getParameterOption(['–env', '-e'], getenv('SYMFONY_ENV') ?: 'dev'); $debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(['–no-debug', '']) && $env !== 'prod'; if ($debug) { Debug::enable(); } $kernel […]

PhpStorm不会从Docker容器读取PHPconfiguration

我想要的是 在PhpStorm中通过terminal和configuration运行PHPUnit 我拥有的 以前的问题 解决在这里 – 关于找不到文件 运行的文件 #!/usr/bin/env bash # echo "Current working directory: '"$(pwd)"'" cd $(pwd) && docker run –rm -t -v $(pwd):/var/www -e SYMFONY_ENV=dev ezsystems/php:7.1-v1-dev php $@ 概要 当我通过terminal运行这个: docker-phpez vendor/bin/phpunit –coverage-text 一切工作正常。 当我尝试运行PhpStorm的configuration时,我得到警告: PHP is not installed 。 但是运行这个远程PHP解释器,给我: docker://ezsystems/php:7.1-v1/php /opt/.phpstorm_helpers/phpunit.php –configuration /var/www/phpunit.xml.dist Testing started at 17:06 … The value $_SERVER['IDE_PHPUNIT_PHPUNIT_PHAR'] […]

带有PHP7的Xdebug运行在带有nginx的Docker容器上的远程EC2实例上

我试图设置Xdebug来帮助我们的开发周期,但我有一些困难得到它的工作。 我也从来没有使用Xdebug,所以也许我误解了它的工作原理。 我们使用运行在Docker容器上的PHP7,前面有nginx。 这些Docker容器托pipe在EC2服务器上的专用VPC上。 我已经通过我的dockerfile安装了xdebug-2.5.4 RUN wget http://xdebug.org/files/xdebug-2.5.4.tgz && tar -xvzf xdebug- 2.5.4.tgz WORKDIR xdebug-2.5.4 RUN phpize RUN ./configure RUN make && cp modules/xdebug.so /usr/lib64/php/modules 我已经确认它是通过检查我安装的php模块( php -m ) 我修改了我的PHP.ini: [xdebug] zend_extension = /usr/lib64/php/modules/xdebug.so xdebug.remote_autostart=on xdebug.remote_enable=on xdebug.remote_enable=1 xdebug.remote_handler="dbgp" xdebug.remote_host="<ip address of machine running docker>" xdebug.remote_port=9000 xdebug.remote_mode=req xdebug.remote_log="/tmp/xdebug.log" 我已经将主机的PhpStorm首选项修改为xdebug.remote_host和xdebug.remote_port的相同IP地址和端口。 然而,我不知道从哪里继续下去。 值得注意的是,这不是运行PHP Web服务器,而是更多的是使用Postmantesting的RESTFUL API。 是否有可能使用xdebug这样的工作stream程?

XDebug的。 泊坞窗。 无法禁用自动启动

我正在通过docker-compose命令与Docker一起工作。 我希望能够在debugging模式和正常模式下运行我的应用程序,但现在debugging器启动了。 我有这样一个app.docker文件。 FROM php:7-fpm RUN apt-get update && apt-get install -y libmcrypt-dev mysql-client \ && docker-php-ext-install mcrypt pdo_mysql RUN yes | pecl install xdebug \ && echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \ && echo "xdebug.remote_enable=1" >> /usr/local/etc/php/conf.d/xdebug.ini \ && echo "xdebug.remote_autostart=0" >> /usr/local/etc/php/conf.d/xdebug.ini \ && echo "xdebug.idekey=PHPSTORM" >> /usr/local/etc/php/conf.d/xdebug.ini WORKDIR /var/www 如果我点击“运行” […]

访问Docker容器中的文件

我今天开始玩Docker,拉了Centos镜像,用PHPconfiguration了容器内的apache,我可以使用ip地址访问网站。 但是,我不知道如何使用IDE(PHPStorm)访问存储在容器内的应用程序的源文件。 什么是最好的方法来做到这一点?

在Docker中用PhpStormdebuggingPHP cli应用程序

我有麻烦设置debuggingPHP CLI应用程序。 我在Mac OS上工作,我在这里有Ubuntu的stream浪汉,在这个Ubuntu里面我有docker。 所以,其中一个docker容器运行我的PHP应用程序,PHP解释器居住的地方。 之前(当应用程序正好在Vagrant机器中)我使用这个命令来debugging我的cli应用程序,但现在它不工作: export XDEBUG_CONFIG =“remote_enable = 1 remote_mode = req remote_port = 9000 remote_host = 192.168.10.10 remote_connect_back = 0” 我如何设置PhpStorm来debugging我的php cli应用程序?