Post thumbnail of Install Snort IDS with Barnyard and Basic Analysis and Security Engine (BASE) on Fedora
2 November 2009
Continue reading Install Snort IDS with Barnyard and Basic Analysis and Security Engine (BASE) on Fedora

Install Snort IDS with Barnyard and Basic Analysis and Security Engine (BASE) on Fedora

Start by installing all of the required dependencies. Here’s the list, but your specific versions may vary. I’m just letting yum install all the latest packages. And I finish by running a “yum update -y” to get the whole system up to date. There are newer versions of the libnet package available, but you specifically need libnet-1.0.2a.tar.gz. You can search and find a bunch of mirrors or try the one I used below: Now download the snort source.

Post thumbnail of Simple php function to check if post variables are set without triggering warnings
13 August 2009
Continue reading Simple php function to check if post variables are set without triggering warnings

Simple php function to check if post variables are set without triggering warnings

If you check the contents of a post variable that never got passed, you get warnings. If you like keeping your verbosity set that high and want to avoid this warning, or you just want to avoid checking against a non-existent variable, try this

Post thumbnail of Send gzipped PHP output to users browser’s to save bandwidth
10 August 2009
Continue reading Send gzipped PHP output to users browser’s to save bandwidth

Send gzipped PHP output to users browser’s to save bandwidth

The oneliner ob_gzhandler only works for Apache and you have to have the mod_gzip module loaded. This method is crap. So to send gzipped PHP output to users browser’s to save bandwidth, try this. It also helps for slow Internet connections and large pages too.

Post thumbnail of Wordpress Automatic Updates broken, asks for Connection Information - fixed!
6 August 2009
Continue reading Wordpress Automatic Updates broken, asks for Connection Information - fixed!

Wordpress Automatic Updates broken, asks for Connection Information - fixed!

Automatic updates of plugins and wordpress itself does not work with lighttpd out of the box. No matter how much I searched for an answer to why this was happening, I couldn’t seem to find anyone that addressed the problem and came up with a solution. I wanted to fix …

Share this:
  • Digg
  • Facebook
  • Reddit
  • LinkedIn
  • Google Bookmarks
Post thumbnail of Toggling debug output within a PHP class
6 August 2009
Continue reading Toggling debug output within a PHP class

Toggling debug output within a PHP class

I don’t care what anyone says, I like lots of debug output available in my programs. It helps me crank out code faster with less errors. You can keep a private member called debug and just flip it on and off when you want to see the output. It’s a lot cleaner than interjecting prints and echos all over the place.

Post thumbnail of How to pass multiple post array variables in PHP
6 August 2009
Continue reading How to pass multiple post array variables in PHP

How to pass multiple post array variables in PHP

Now when go.php loads, you can check to see if there’s anything in the post_arr, and if there is, cycle through the array and store all the elements. I couldn’t find a working example of this just by googling. It seemed like tons of people would ask for this, but any responses on forums would be, “well what are you really trying to do”. So here it is.

Share this:
  • Digg
  • Facebook
  • Reddit
  • LinkedIn
  • Google Bookmarks
Post thumbnail of Using PHP’s explode to split a full path into directory and file name
3 August 2009
Continue reading Using PHP’s explode to split a full path into directory and file name

Using PHP’s explode to split a full path into directory and file name

This is the easiest way I could think of to figure out the directory given a full path in PHP. I reverse the whole string, then look for the first slash and break off that part. Then reverse it back. You could drop each part into an array, so the first element could be the path to the present working directory, and the second element would be the directory itself. Or you could write a second function called getPWD and return the path instead of the directory.

Post thumbnail of LDAP Authentication in PHP made simple
2 July 2009
Continue reading LDAP Authentication in PHP made simple

LDAP Authentication in PHP made simple

Using Auth.php which everyone should have, authenticating with Active Directory is pretty simple. I’ve tried this on an OpenLDAP directory and AD.

Share this:
  • Digg
  • Facebook
  • Reddit
  • LinkedIn
  • Google Bookmarks
Post thumbnail of cpp fails sanity check solved for pecl installations!
25 June 2009
Continue reading cpp fails sanity check solved for pecl installations!

cpp fails sanity check solved for pecl installations!

I found pecl:svn wanted to ask me two questions about subversion, so I was able to let it sit there while I opened another terminal to look in the temp directory and find the log. So I finally figured out what its problem was.

Share this:
  • Digg
  • Facebook
  • Reddit
  • LinkedIn
  • Google Bookmarks
Post thumbnail of Install phpMyFAQ from scratch
14 May 2009
Continue reading Install phpMyFAQ from scratch

Install phpMyFAQ from scratch

There’s a few packages you might not have installed that you’ll need before php phpMyFAQ will install. On a basic, headless virtual machine, I don’t install a web server, php or databases by default. So I’ll start from there.

Share this:
  • Digg
  • Facebook
  • Reddit
  • LinkedIn
  • Google Bookmarks
 Page 1 of 2  1  2 »
Powered by Wordpress   |   Lunated designed by ZenVerse