<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Thu, 24 May 2012 20:18:37 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Derick Rethans' Blog: 10 years of Xdebug and Xdebug 2.2.0 released]]></title>
      <guid>http://www.phpdeveloper.org/news/17933</guid>
      <link>http://www.phpdeveloper.org/news/17933</link>
      <description><![CDATA[<p>
Congratulations go out to <i>Derick Rethans</i> for the outstanding work he's done on XDebug for the last ten years. From his <a href="http://derickrethans.nl/xdebug-10.html">latest blog post</a>:
</p>
<blockquote>
Today it has been ten years since the first release of Xdebug: version 0.7.0. I would like to celebrate this tenth anniversary with a new release: Xdebug 2.2.0. Xdebug 2.2 adds support for PHP 5.4 and provides some new features.
</blockquote>
<p>There's five new things on his list of updates in this latest release:</p>
<ul>
<li>Colours on the command line
<li>Better support for closures in stack and function traces
<li>The size of arrays is now shown with the overloaded variable output
<li>Added the method call type to xdebug_get_function_stack
<li>Extra information to error printouts to tell that the error suppression operator has been ignored due to xdebug.scream
</ul>
<p>
If you've found XDebug handy for testing and finding those tough to track bugs over the years, you should consider <a href="http://xdebug.org/buy-support.php">buying "support"</a> to show <i>Derick</i> your appreciation (oh, and you also get a "first in" preference on your XDebug questions)!
</p>]]></description>
      <pubDate>Wed, 09 May 2012 09:19:58 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Markus Pullmann's Blog: Remote Debugging in PHP with XDebug]]></title>
      <guid>http://www.phpdeveloper.org/news/17554</guid>
      <link>http://www.phpdeveloper.org/news/17554</link>
      <description><![CDATA[<p>
<i>Markus Pullmann</i> has a new post to his blog about <a href="http://www.pullmann-is.org/2012/02/16/remote-debugging-in-php-with-xdebug/">setting up XDebug</a> in your PHP installation to help you narrow down those elusive issues more quickly.
</p>
<blockquote>
Debugging locally is a nice improvement to have no debugger at all, but in many situations there is the need to debug on production server, where the application is running on the web. There are different reasons for that, but the most important one for me is, that my local environment / installation is different from the one i have on servers in data center and bugs can be related to the environment.
</blockquote>
<p>
He walks you through the installation and server-side configuration of XDebug first then shows how to install the <a href="http://code.activestate.com/komodo/remotedebugging/">Komodo Remote Debugging Client</a> to help with multi-user debugging setups. He mentions setting up the debugging on the client/IDE side, but there's no specific instructions for any particular IDE - just how it works overall.
</p>]]></description>
      <pubDate>Fri, 17 Feb 2012 08:45:29 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Kurt Payne's Blog: User register_tick_function to profile your code]]></title>
      <guid>http://www.phpdeveloper.org/news/17512</guid>
      <link>http://www.phpdeveloper.org/news/17512</link>
      <description><![CDATA[<p>
<i>Kurt Payne</i> has a new post to his blog showing how to <a href="http://kpayne.me/2012/02/04/use-register_tick_function-to-profile-your-code/">use register_tick_function</a> with a callback to help benchmark and profile your application to find its pain spots.
</p>
<blockquote>
A profiler gives you the ability to trace the performance of your code through every function call and create an overview of your system's performance over a certain time period and helps you make intelligent decisions about where to look for problems. [...] But what if you're in an environment where you can't install [the xdebug or xhprof] extension? Luckily, php has a built-in function called <a href="http://php.net/register_tick_function">register_tick_function</a> that gives you a way to hook in to every user function that's called.  With this, you can write a profiler yourself.
</blockquote>
<p>
A bit of sample code illustrates his method - it defines a "do_profile" function and assigns it with the <a href="http://php.net/register_tick_function">register_tick_function</a> call. This function generates a debug backtrace and echos out the function path it took to get to that spot (output is included). He provides code for a bit more useful profiling and points out that it could easily be graphed to help visualize the problems. Also included are a few caveats to watch out for when using this method of profiling.
</p>]]></description>
      <pubDate>Tue, 07 Feb 2012 13:26:23 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Joshua Thijssen's Blog: Setting up a development environment]]></title>
      <guid>http://www.phpdeveloper.org/news/17499</guid>
      <link>http://www.phpdeveloper.org/news/17499</link>
      <description><![CDATA[<p>
In a new post to his blog <i>Joshua Thijssen</i> <a href="http://www.adayinthelifeof.nl/2012/02/04/setting-up-a-development-environment/">gives a guide</a> to how he usually sets up his development environments when working in PHP. It includes working with virtual machines, configuring DNS and setting up his tools to work with it all.
</p>
<blockquote>
Doing development on multiple projects can be a burden from time to time. One project would be running on PHP 5.3, while another still needs 5.1. Sometimes you need a MySQL server, while on other occasions, you need a NoSQL solution like couchDB or MongoDB together with all kind of gearman functionality. This article shows you how I've setup such a development platform that allows you to quickly create new projects, and still maintain flexibility when you need it.
</blockquote>
<p>
He uses <a href="https://www.virtualbox.org/">VirtualBox</a> with either a Debian or CentOS installation as a base platform. He uses Vagrant to set up and configure the machines to make setup almost automatic. He still has to go in and configure a few things like the VirtualHost and DNS settings for the site/application he's working on. 
 Next up is setting up the tools he uses, specifically <a href="http://xdebug.org">XDebug</a> and setting up his editor of choice (PHPStorm) for remote debugging.
</p>]]></description>
      <pubDate>Mon, 06 Feb 2012 09:27:41 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Volker Dusch's Blog: Never trust other peoples benchmarks - A recent example (exceptions)]]></title>
      <guid>http://www.phpdeveloper.org/news/17417</guid>
      <link>http://www.phpdeveloper.org/news/17417</link>
      <description><![CDATA[<p>
In response to a <a href="http://phpdeveloper.org/news/17403">previous post</a> benchmarking exceptions, <i>Volker Dusch</i> has posted <a href="http://edorian.posterous.com/never-trust-other-peoples-benchmarks-a-recent">some of his own thoughts</a> and benchmarking results on the same topic.
</p>
<blockquote>
Some days ago there was a blog post regarding php exception performance in 5.4 and the numbers got reported all over the place. The actually numbers are secondary. The main point is: Don't trust "random" stuff on the Internet when thinking about improving your application performance. You always need to measure things for your self and take care doing so! I've initially trusted the benchmark myself and disgraced the whole post saying: "Well yes, exceptions are slower than if statements but nice that they got faster".
</blockquote>
<p>
He includes some results with a bit more standardized testing - one run with both 5.3 and 5.4 using XDebug and another with it turned off for both. His results make sense, if you think about them:
</p>
<blockquote>
So what we learn from that? Running stuff with debugging tools is slower than not doing that. That's why we don't use xDebug in production.
</blockquote>]]></description>
      <pubDate>Thu, 19 Jan 2012 09:20:32 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Learncomputer.com: PHP Profilers Compared (PHP Quick Profiler & XDebug)]]></title>
      <guid>http://www.phpdeveloper.org/news/17125</guid>
      <link>http://www.phpdeveloper.org/news/17125</link>
      <description><![CDATA[<p>
In a recent post from Learncomputer.com, there's a <a href="http://www.learncomputer.com/php-profilers/">comparison of two PHP profilers</a> - the <a href="http://particletree.com/features/php-quick-profiler/">PHP Quick Profiler</a> and the one included in <a href="http://xdebug.org/docs/profiler">Xdebug</a>.
</p>
<blockquote>
Whether you are an experienced developer or just getting started it is important to know how to measure the performance of your scripts and applications so that you can learn to make improvements and optimizations to your code. [...] This article compares two of the most popular [profiling] solutions under free license that you can begin using today to profile your PHP applications.
</blockquote>
<p>
They describe each of the tools - the Quick PHP Profiler acting more like a plugin (running on each page load) and Xdebug working more behind the scenes and providing cachegrind files. These files can be viewed in cachegrind tools to drill in to the badly performing aspects of your applications and find the issues.
</p>
<blockquote>
If you need a free tool it can be difficult to find a PHP profiling tool that has all of the features you may want and the interface that you like all rolled into one. Identifying what kind of data you are looking for and what information you need from a profiling tool will allow you to choose the best solution for your needs.
</blockquote>]]></description>
      <pubDate>Mon, 14 Nov 2011 11:53:31 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Derick Rethans' Blog: Xdebug's Code Coverage speedup]]></title>
      <guid>http://www.phpdeveloper.org/news/16898</guid>
      <link>http://www.phpdeveloper.org/news/16898</link>
      <description><![CDATA[<p>
<i>Derick Rethans</i> has a new post to his blog today talking about some work that's been done to <a href="http://derickrethans.nl/xdebug-codecoverage-speedup.html">speed up XDebug's code coverage generation</a>. Changes in the coming 2.2 release have some improvements that make things perform better and put less stress on PHP in the process.
</p>
<blockquote>
Code coverage tells you how much of your code base is actually being tested by your unit tests. It's a very useful feature, but sadly, it slows down PHP's execution quite a lot. One part of this slowdown is the overhead to record the information internally, but another part is because I have to overload lots of opcodes. (Opcodes are PHP's internal execution units, similar to <a href="http://en.wikipedia.org/wiki/Assembler_%28computer_programming%29#Assembly_language">assembler</a> instructions) They are always overloaded even if code coverage is not used, because it's only safe to overload them for the whole request.
</blockquote>
<p>
These changes were from a combination of <a href="https://github.com/taavi/xdebug/commits/coverage_line_array">contributions from Taavi Burns</a> and a new ini setting that will allow you to enable or disable the code coverage in XDebug. Benchmarking shows a good amount of time reduction in coverage runs - dropping anywhere from a few seconds to over a minute. He also mentions the idea of "modes", shortcuts to predefined settings for different types of reporting (like "profiling" or "tracing").
</p>]]></description>
      <pubDate>Fri, 23 Sep 2011 09:56:33 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[XPertDeveloper.com: PHP Debugging Tools]]></title>
      <guid>http://www.phpdeveloper.org/news/16866</guid>
      <link>http://www.phpdeveloper.org/news/16866</link>
      <description><![CDATA[<p>
On the XPertDeveloper.com blog today there's a new post sharing <a href="http://www.xpertdeveloper.com/2011/09/php-debugging-tools/">four handy debugging tools</a> you can use to make finding those elusive problems in your code simpler.
</p>
<blockquote>
PHP is very well used scripting language in now a days. But PHP does not have any inbuilt debugging tools or extension. But we have some extensions and tools available which serves the debugging purpose of the PHP.
</blockquote>
<p>The tools on their list involve both the backend and frontend:</p>
<ul>
<li><a href="http://xdebug.org/index.php">XDebug</a>
<li><a href="http://www.zend.com/en/community/pdt">Zend Debugger</a>
<li><a href="http://www.firephp.org/">FirePHP</a>
<li><a href="https://chrome.google.com/webstore/detail/nfhmhhlpfleoednkpnnnkolmclajemef?hc=search&hcp=main">PHP Console</a>
</ul>]]></description>
      <pubDate>Fri, 16 Sep 2011 08:49:22 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Mark Hamlin's Blog: Debugging xdebug (tcp, dns, ubuntu, osx, vmware) ((all at once))]]></title>
      <guid>http://www.phpdeveloper.org/news/16799</guid>
      <link>http://www.phpdeveloper.org/news/16799</link>
      <description><![CDATA[<p>
In a recent post to his blog <i>Mark Hamlin</i> talks about <a href="http://uber-code.blogspot.com/2011/08/more-debugging-xdebug-tcp-dns-ubuntu.html">some of his difficulties</a> in getting <a href="http://xdebug.org">XDebug</a> and <a href="http://netbeans.org">Netbeans</a> working together from an OSX machine hitting a Ubuntu server.
</p>
<blockquote>
For the past 18 months working with PHP, i've primarily used alternatives, not out of preference, but because netbeans xdebug integration consistently failed me.  It would (might) work with a remote apache, but would not play with scripts executed remotely from the command line.  I could be fairly sure my xdebug config was sound as I no problems with MacGDB and PHPStorm whatsoever.
</blockquote>
<p>
With a little more investigation, he discovered that it was the OSX firewall causing issues. He found that, with a new incoming connection came a confirmation box to approve the connection. This, of course, wasn't passed along to Netbeans so he never saw it. In the end, he set up a reverse SSH tunnel to bypass the firewall completely (command included).
</p>]]></description>
      <pubDate>Wed, 31 Aug 2011 13:04:43 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Derick Rethans' Blog: Remote Debugging PHP with a Firewall in the Way]]></title>
      <guid>http://www.phpdeveloper.org/news/16779</guid>
      <link>http://www.phpdeveloper.org/news/16779</link>
      <description><![CDATA[Sometime debugging PHP applications isn't as easy as just pointing your IDE directly at the server and starting to work. <i>Derick Rethans</i> has a new post talking about one such situation, <a href="http://derickrethans.nl/debugging-with-xdebug-and-firewalls.html">remote debugging with a firewall in between</a> you and the remote machine with <a href="http://xdebug.org">XDebug</a>.
</p>
<blockquote>
The PHP debugging extension Xdebug has "remote" debugging capabilities for single-step debugging PHP applications. This works by setting your favourite IDE into listening mode and instructing Xdebug (with one of the handy browser extensions for example) to initiate debugging. [...] There could however be a firewall in the way that prevents Xdebug connecting directly to your IDE's IP address. That can be because the network you are on employs NAT. [...]  In this case, there is no way Xdebug can connect to your IDE's IP address and port. Or is there?
</blockquote>
<p>
His alternative requires <a href="http://en.wikipedia.org/wiki/Secure_Shell">SSH access</a> to the remote machine - building a tunnel from your local machine to the remote server XDebug can use to get around the firewall. He explains the shell command to set up the tunnel and, a more graphical way, through the <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/">Putty</a> ssh/telnet client. A quick call to "netstat" can tell you if things are working correctly or not. All that's left then is to point your XDebug to the port on the localhost and you should be good to go on debugging.
</p>]]></description>
      <pubDate>Fri, 26 Aug 2011 11:24:17 -0500</pubDate>
    </item>
  </channel>
</rss>

