Showing posts with label php. Show all posts
Showing posts with label php. Show all posts

Saturday, 26 November 2016

Install XDebug in Fedora25 and configure Netbeans

Installation

It is definitelly worth to read oficial installation docs before proceeding, it's quite short and it can help to avoid basic mistakes that are sometimes recomended elsewhere. You don't have to read it all - just pick the part which you need - pecl  - homebrew - from source.

Installation of XDebug in Fedora is really simple as there is the newest version in Fedora repositories. We can simply use the pecl installation.
> sudo dnf install php-pecl-xdebug


XDebug Configuration

This type of installation already enables xdebug extension. At least in my case the file /etc/php.d/15-xdebug.ini was already there after installation.

Thursday, 6 October 2016

PhpStorm XDebug configuration when using VM (Vagrant)

I would like to take notes how I did my set up of PhpStorm IDE for debugging with XDebug with the server running on VM (Vagrant). I assume that this configuration will work also for other type of environments where you need to use remote debugging.

Server configuration

At first you have to install XDebug (out of scope of this article).

On the vagrant machine we need kind of this configuration in /etc/php.ini
[xdebug]
zend_extension=/home/www/PHP/php-5.5.22/lib/php/extensions/xdebug.so
xdebug.max_nesting_level=9999
xdebug.profiler_output_dir=/tmp/
xdebug.profiler_output_name=xdebug-%p
xdebug.profiler_append=1
xdebug.profiler_enable_trigger=1
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=10.0.25.21
;xdebug.remote_connect_back=1
xdebug.remote_port=9000
xdebug.idekey="PHPSTORM"
xdebug.remote_autostart=1
xdebug.profiler_enable=0
xdebug.trace_options=1

Restart apache or php processes (depending on your server setup).

Important settings are: remote_host, idekey, remote_enable, remote_autostart

Saturday, 9 January 2016

Symfony console no colors, symfony console progressbar on many lines

When you install symfony installer and after executing symfony command you don't see colorized help text, you might also experience problem with progress-bar on many lines. Progressbar is used when you're creating new symfony project by command symfony new myproject.

Symfony help text without colors Symfony installer progressbar on many lines, because of not installed php posix module


Both problems are probably caused by a lack of POSIX support in your php environment.

Solution

Just install php posix module.

The package named php-process in current Fedora distribution.

So you just need to do:
sudo dnf install php-process

See the result after the installation of the module:

Symfony help text with colors
Symfony progressbar after installation of php posix module