Category Archives: php

Compiling PHP With “--with-jpeg-dir” Not Working?

Had this strange issue a couple of days ago, where the following compile command didn’t give me the expected results (ability to use imagecreatefromjpeg() function). ./configure --with-gd --with-jpeg-dir=/usr/lib make make test The “make test” yielded the following results. SKIP gif --> … Continue reading

Posted in php | Tagged , , | 5 Comments

On The Subject Of Naming Variables

It happens to everyone. You’re typing hundreds and thousands of lines of code, and you suddenly find yourself stuck. You need to come up with the name of a new variable, and you can’t find one. It’s something so incredibly … Continue reading

Posted in php | Tagged , , , | Leave a comment

‘php_admin_value’ Bug When Overwriting PHP Settings

If you want to overwrite certain settings for a particular directory, you can either use a .htaccess file or edit the apache config file. One of those changes, could be to alter the include_path for PHP for certain projects. Normally, … Continue reading

Posted in php | Tagged , , , | 1 Comment

Reverse Shell Implementation in PHP5

Here’s a very interesting PHP script found on a compromised Linux box. I won’t discuss how it got there (using/abusing exploits is not in the scope of this post, and shouldn’t be discussed in comments either). Original credits for the … Continue reading

Posted in php | Tagged , , , | Leave a comment

Input Validation: Using filter_var() Over Regular Expressions

Just about the biggest time-sink on any project, is the amount of input validation that needs to be done. You _have_ to assume your visitor is a maniac serial killer, out to destroy your application. And you have to prevent … Continue reading

Posted in php | Tagged , , , | 20 Comments