PhpStorm & XDEBUG

Posted by:

  1. Environment:
    • Phpstorm 10
    • php-cgi: sudo apt-get install php-cgi
  2. Setup:
    • File/Settings/Languages & Frameworks/PHP

    Screenshot from 2016-02-25 14:40:22

    Screenshot from 2016-02-25 14:41:34

    Screenshot from 2016-02-25 14:42:27

    [xdebug] zend_extension=”/usr/lib/php5/20121212/xdebug.so”
    xdebug.remote_enable=true
    xdebug.remote_port=9000
    xdebug.profiler_enable=1
    xdebug.remote_host=localhost
    xdebug.profiler_output_dir=”/home/quachson/tmp/xdebug”
    xdebug.max_nesting_level=1000

    Screenshot from 2016-02-25 17:05:03

    Screenshot from 2016-02-25 14:44:43

    Screenshot ...</p></ol><a class=Đọc tiếp

    0

PHP & XDEBUG

Posted by:

  • Environment: Ubuntu with LAMP (Apache, PHP, MySql)
  • Install xdebug:
[code language=”bash”] sudo apt-get install php5-dev php-pear
sudo apt-get install php5-xdebug
sudo php5enmod xdebug
sudo /etc/init.d/apache2 restart
[/code]

 

  • Find path xdebug.so
[code language=”bash”] find /usr/lib -name ‘xdebug.so’
[/code]

/usr/lib/php5/20121212/xdebug.so

  • Find path php.ini
[code language=”bash”] find / -name ‘php.ini’
[/code]

/etc/php5/apache2/php.ini

  • Add these lines into php.ini
    zend_extension="/usr/lib/php5/20121212/xdebug.so"
    xdebug.remote_enable=1
    xdebug.remote_handler=dbgp
    xdebug.remote_mode=req
    xdebug.remote_host=localhost
    xdebug.remote_port=9000
  • Restart apache
[code language=”bash”] sudo /etc/init.d/apache2 restart
[/code]
  • Check xdebug

Create phpinfo.php with content:

<?php

phpinfo();

?>

Install in local, a recommended configuration of php.ini

  • max_execution_time = 1000 ( timeout php execute)
  • memory_limit = 512M
  • post_max_size = 100M
  • upload_max_filesize = 100M

 

 

 

Đọc tiếp
0