Category Archives: Hakre's Tips

Mitigating XPath Injection Attacks in PHP

PHP has two libxml based extensions that allow to execute XPath 1.0 expressions: DOM (by the DOMXPath class) and SimpleXML (with its xpath() method). Both extensions are prone to XPath Injection Attacks, a common attack form. Albeit all this, and … Continue reading

Posted in Hakre's Tips, PHP Development, Pressed, Surviving the Internet | Tagged , , , , , , , | 1 Comment

PHP: XPath on HTML and XHTML

Christan Weiske has published a nice summarizing article with the same title. It contains some detailed information I haven’t found so far on the web so worth the link: PHP: XPath on HTML and XHTML. It also reminds me of … Continue reading

Posted in Developing, Hakre's Tips, PHP Development, Pressed | Tagged , , , , | Leave a comment

PHP on Google App Engine – Quick First Review

This is fresh out of the news (Ars; Wired; WHIR; VB), and what Google wants to offer looks like a very cool package. So if you hadn’t had the time to view the video, here is a quick summary and … Continue reading

Posted in Features, Hakre's Tips, PHP Development, Pressed, Reports, Tools | Tagged , , , , , , , , , , , | 7 Comments

SimpleXML Type Cheatsheet

A SimpleXMLElement can represent many different things, from an element, to a list of attributes or childelements. Sometimes it’s good to know how to find out, especially with the magic the extension comes with. The following is a table with … Continue reading

Posted in Hakre's Tips, PHP Development, Pressed, The Know Your Language Department | Tagged , , , , , , , , , | 1 Comment

PHP Autoload Invalid Classname Injection

There are many ways to attack an application, many are working by injecting some malicious data hoping to trigger a deserved action in the end. Most of these are possible when input data is not properly sanitized. This can have … Continue reading

Posted in Features, Hakre's Tips, PHP Development, Pressed, The Know Your Language Department | Tagged , , , , , | 1 Comment

Debug with Xdebug on the Commandline with Phpstorm and Git Bash

Enable Phpstorm Xdebug listening: Press the listen button inside Phpstorm to actually listen: To disable Phpstorm Xdebug processing in Bash again: This (PHPSTORM) is the default Phpstorm IDE-Key. You don’t need to disable listening after the variable is unset. Should … Continue reading

Posted in Hakre's Tips, PHP Development, Pressed | Tagged , , , , | 1 Comment

Assorted SPL Iterator Examples

This is an assorted list for three SPL iterator resources out there in the net. I’m sure there is more, so feel free to leave a comment I’m happy to add them. spl-examples (salathe) The idea is to have you … Continue reading

Posted in Hakre's Tips | Tagged , , , , , , | 4 Comments

Getting N Random Elements out of an Iterator – RandomIterator

Considering there is an Iterator or Traversable with an unknown number of elements, I wondered if it is possible to get one or more random iterations out of it.

Posted in Developing, Hakre's Tips, PHP Development, Pressed | Tagged , , , , , , | Leave a comment

Prepared Statements

In Programming With Anthony – Prepared Statements (by Anthony Ferrara; 12 Dec 2012) the author needs only two minutes and 17 seconds (Youtube Video) to explain *Prepared Statements*. Worth to watch. See as well the Playlist of Programming With Anthony … Continue reading

Posted in Hakre's Tips, Linked, PHP Development, Pressed, Surviving the Internet | Tagged , , , , , , , , , | Leave a comment

Getting the Vagrant in the Box (Fedora 17)

This post is about installing a useful development tool to play with systems and configurations in a virtualized environment on your fingertips. Want to test your WordPress with a completely differnt web- and database server? Maybe running a proxy in … Continue reading

Posted in Developing, Hakre's Tips, Pressed, Tools | Tagged , , , | Leave a comment

Using the SPDX License List for Tagging and Linking

The Software Package Data Exchange® (SPDX™) specification is a standard format for communicating the components, licenses and copyrights associated with a software package. Their website has a lot of detailed information about the specs, format and tools itself. But in … Continue reading

Posted in Developing, Hakre's Tips, Licensing, Pressed | Tagged , , , , , | 2 Comments

PHP on Heroku, again

Setting up a PHP project for the Heroku platform is straight-forward if you know how. The information is a bit scattered, that’s why I write my own little post about it so I don’t have to remember this my own … Continue reading

Posted in Hakre's Tips, PHP Development, Pressed, Reports | Tagged , , , | 31 Comments

Mosh (mobile shell), sort of client / server type of screen.

Posted on by hakre | Leave a comment

DataCleaner – Data quality, profiling, cleansing and matching utility

DataCleaner – Open source data quality, data profiling, data cleansing, data matching (via Cubrid)

Posted in Hakre's Tips, Linked, Pressed, Tools | Tagged , , , | Leave a comment

Iterating over Multiple Iterators at Once

PHP’s SPL has two build-in Iterators that deal with multiple iterators at once: AppendIterator and MultipleIterator. In this posting I’ll cover both a bit: AppendIterator will put one iterator after the other so it get’s like a long queue or … Continue reading

Posted in Developing, Hakre's Tips, PHP Development, Pressed | Tagged , , , , , , , | 1 Comment

Some PHP Iterator Fun

I must have had too much free time. Over at Stackoverflow some kind of PHP question pops up from time to time about how to distribute a sequence of data in form of a table or in columns. You already … Continue reading

Posted in Developing, Hakre's Tips, PHP Development, Pressed | Tagged , , , , , , , | 1 Comment

Resign Patterns – Ailments of Unsuitable Project-Disoriented Software; by Michael Duell

Posted on by hakre | Leave a comment

Architecture the Lost Years (Robert Cecil Martin; 4 Nov 2011)

Did worldwide Hypertext turned software developers out in the field upside-down? In Architecture the Lost Years (1h 06m) Robert C. Martin talks about the web and how it influenced development design decisions in the last decade(s). Is the system the … Continue reading

Posted in Developing, Hakre's Tips, Linked, Pressed, Surviving the Internet | Tagged , , , , , , , , , | 1 Comment

Using References to Improve Performance in PHP

Posted on by hakre | Leave a comment

phptags – tidies up tags in PHP scripts and guards whitespace

Just stumbled over another PHP related tool today, which I think is worth the link: phptags is a simple commandline tool to tidy up open and close tags in PHP scripts. It can rewrite close tags, and strip leading or … Continue reading

Posted in Hakre's Tips, Linked, PHP Development, PHP Development, Pressed, Tools | Tagged , , , , , , , | Leave a comment