Strace is a debugging utility for *nix systems, used to monitor the system calls used by a program, as well as any signals received by the program. Strace is useful for seeing what an application is doing under the hood, which can be vital to find subtle bugs in your code obscured by built-in functionality. […]
How To
- Development
- ...
Optimizing Your PHP with Xdebug
I work with a lot of PHP applications, and part of my job is optimizing those applications to reduce server costs and maximize how many requests each server can handle. There are many ways to do this, but I’m going to talk about using a profiler, which is one of the better ways to start […]
- Development
- ...
How to run background tasks in PHP
This post is mostly to introduce some cool ways of doing tasks in PHP, that you may not be aware of. The recommended approach for anything like this is to use a cron job however. One of things I often do in PHP is create code that needs to run occasionally and perform some function […]
Linux – Resize a directory of pictures
In Linux, resizing a large amount of pictures is very simple. This is a neat little command line script perfect for making thumbnails to go on websites or what not, and I’ve used it in some PHP websites before. for i in *.jpg; do convert -resize 640×480! -quality 75 “$i” thumb/”$i”; done The script shouldn’t […]
- Development
- ...
PHP serialize and unserialize
The other day I finally decided to try using PHP’s serialize and unserialize functions; A function I’ve heard of, and read about, but never really used. As soon as I printed the output I realized two things: Now I understand how those fields in IPB’s database work! Fuck I could of saved so much time! […]
Compiling PHP with Suhosin
So upon checking php.net I noticed they released PHP 5.2.11. I still haven’t upgraded to PHP 5.3.0 because it breaks too many things and I haven’t bothered to figure out how to install both of them at the same time (Working on it though). I’ve compiled PHP so many times I can do it quickly […]
- Development
- ...
How to spoof email with PHP
PHP is by far my favorite programming language. It is fast to develop with, flexible and high level. It’s also pretty secure (If you know what you’re doing) and extensible. You can do a lot of things with it, including spoof e-mails (Which I’m about to show you how to do). This also illustrates why […]