Mittwoch, 27. April 2016

Posted by Unknown | File under : ,

Sometimes, when you are running a PHP script from command line interface(CLI), a higher memory limit may be required in order for the script to be successfully executed.
This can be done by using the "-d" or "–define" option in the command. 

php -d memory_limit=2048m bin/phpunit

In my case, I want to run a project's tests that have high memory consumption.

Here is the link to the php manual's command line features and also directly for the command line options

Mittwoch, 13. April 2016

Posted by Unknown | File under : ,
I think this article is more a note for myself then a real serious blogpost.

For configuring php storm

here a a link with a good desciption:

Here is my current xdebug config taken from xdebug.ini



Running from a browser with Extension

For the chrome browser you can install this extension:  xdebug-helper

Running from Postman

Postman is a nice tool for performing requests and see what comes back.

Add a simple query parameter to your url:


Running from Console

Sometimes you want to debug scripts that were executed from console for that you can pass a parameter:


For example: a call for the symfony console could look like this:

php -dxdebug.remote_autostart=On bin/console

Keep in Mind

For all these options you have to keep in mind, that you should tell your IDE to be in debug mode and you should also set at least one meaningful debugging point