Показаны сообщения с ярлыком debug. Показать все сообщения
Показаны сообщения с ярлыком debug. Показать все сообщения

воскресенье, 1 сентября 2019 г.

Ways to optimize a Sylius project in dev mode

If you feel that your Sylius dev configuration is slow, try this:

1) use nginx (or docker with nginx) instead of php bin/console server:run
2) be sure XDebug is disabled
3) add these lines to your php.ini:

opcache.memory_consumption=256
opcache.max_accelerated_files=20000
realpath_cache_size=4096K

How to fix "504 gateway timeout" [php] [xdebug]

At the long PHP debug browser responds with "504 gateway timeout". If you want to increase this debugging period,

1) set in /etc/nginx/nginx.conf:
http {
    ...
    fastcgi_read_timeout 3600;
    ...
}
2) set this line in php.ini:
request_terminate_timeout = 3600s

3) restart nginx or restart containers.

It also possible to do in your Docker configuration.

суббота, 13 июля 2019 г.

my minimum steps to enable xdebug in ubuntu & phpstorm (locally)

1. install xdebug helper in Chrome-based browser
2. sudo apt-get install php7.2-xdebug
3. add these lines in <>:
xdebug.idekey=PHPSTORM
xdebug.remote_enable = 1
xdebug.remote_autostart = 1
4. add in phpstorm settings Languages & Frameworks > PHP > Servers:

Name & Host: 127.0.0.1
Port 8000
4. set a breakpoint at reachable code line and start debugging