Installing Xdebug on Windows and PhpStorm


There is a catch when installing Xdebug on windows: You need to set the full path of the extension directive in the php.ini, since the default directory is only used for non-zend extensions. Also don’t forget to use quotes.

;used only for 'normal' extensions
extension_dir = "C:Program Files (x86)PHPext"

;still necessary to use full path
zend_extension = "C:Program Files (x86)PHPextphp_xdebug.dll"

;won't work
;zend_extension = php_xdebug.dll

To make Xdebug work in PhpStorm you also need to enable remote debugging:

xdebug.remote_enable = 1

Why I love PhpStorm: SQL table aliases

2 Replies

Here’s another example for the reason why I like JetBrains PhpStorm so much: SQL code assist in the Database Console completes statements either in upper case or lower case depending on how you started typing, not to speak of understanding aliased tables when suggesting column names after typing a dot.

Screenshot: SQL code assist in PhpStorm understands aliased tables.

More PhpStorm love:
SQL GROUP BY handling
JavaScript code completion with dojo

Why I love PhpStorm: JavaScript code completion with dojo

2 Replies

Just a quick post about the new PHP IDE by JetBrains. So far I’ve been working with Aptana Studio. I also tried NetBeans and Comodo Edit, but none was really satisfying, because either dojo or ftp support was missing (if I find time, I’ll write a post in more detail about the differences between those IDEs).

But now there is PhpStorm. I’m really impressed and enthused by its features, especially code completion for JavaScript. Since JavaScript is a loosely typed language, it’s difficult to write a good code assist. But PhpStorm just picks up everything.  For example, if I use dojo.hitch to set the scope of a function, it catches what ‘this’ refers to within the anonymous function !

Code Assist in action

PHPStorm’s amazing code assist in action. Notice that setting the scope with dojo.hitch is reflected in code assist!

More PhpStorm love:
SQL table aliases
SQL GROUP BY handling

Tutorial Part 1: REST with Dojo and PHP

7 Replies

I only started recently to dig into REST, so I’m in no way an expert in this field. There are not that many tutorials on the internet, and the ones I found were only of limited help. They all seemed to miss something or, rather, I missed something. So I decided to write my own tutorial about my findings to help others that might have the same problems. On the client side, I’ll use the Dojo Toolkit, on the server side, PHP.

I will focus mainly on providing and explaining some working code examples including server PHP code. At the end of this article you can find all code as a downloadable zip-file. As an introduction to REST, read some of the tutorials linked at the end of this article, because I’m not going to repeat some of the things you can read there.

Continue reading

PHP, und SQLite mit kurzen oder langen Spaltennamen


Je nach Version von SQLite werden Tabellenspalten nach einer SELECT Abfrage mit oder ohne Tabellennamen zurückgegeben. Zum Beispiel liefert die Abfrage:

SELECT Spalte FROM Tabelle t

die Spalten als t.Spalte oder als Spalte. Dies kann mit der PRAGMA Abfrage

pragma short_column_names = 0

auf t.Spalte gesetzt oder mit

pragma short_column_names = 1

auf nur Spalte gesetzt werden (Stand PHP5.3).