PHP, MySQL, JavaScript, Windows 7, Linux
Tutorials
Using Gmail for Spiceworks’ Help Desk
Mar 14th
In case you haven’t heard, Spiceworks is a free “network management & monitoring, help desk, PC inventory & software reporting solution to manage everything IT.” I must admin, I was skeptical at first, but I ending up being very impressed with this software. The only downside I’ve found so far is the presence of ads within the software; however, you’ll soon see it is still well worth it. This software also requires Windows XP or higher, and will not run on Linux. On the other hand, Spiceworks will detect and properly monitor any Linux-based PC on the network. Below are some of the advantages of using Spiceworks:
- 100% free
- Can be used as portal, and help desk (includes full ticketing system)
- Works with Active Directory
- Will monitor software, DNS settings, disk space, etc., on all computers within network
- Network map
- Will monitor ink and toner levels in compatible printers/copiers
- E-mail alerts can be configured to send in the event printer ink dips below a certain threshold
- Compatible with Windows Server 2008 R2
- …and much more!
Now, onto configuring Spiceworks to work with Gmail:
Within Gmail settings, make sure that IMAP is enabled.

Login to your Spiceworks installation.

Generate HTML drop downs from arrays & ranges with a PHP class
Dec 1st
There comes a time (or a multitude of times) where a developer finds him- or herself rewriting the same code over and over again. Eventually, we get tired of it and need to find a solution. Recently, I frequently found myself writing code to generate HTML drop downs. This became tedious, and I started to think it was unnecessary. But wait! There must be a better way! I didn’t want to use Zend_Form or any other 3rd party solution; I wanted to create my own class to help take care of this problem. Below is the code/examples for the class, then a description of some of the methods, and lastly a link to download the source code. As you can see, there are some nice features, and the class is easy to use and extend. Read the rest of this entry »
Using PHPass password hasher with Zend Framework
Oct 7th
In this tutorial, we will learn how to use PHPass, a portable PHP password hashing component, with the “glue”-based Zend Framework. The popular PHP-based blogging platform WordPress utilizes PHPass to hash user passwords. Using this library adds an extra level of security over a normal MD5-protected password. Read the rest of this entry »
Turning off Instant Search enable dialog in Outlook 2007
Sep 28th
About two months ago, I began using Microsoft Office Outlook 2007, which I absolutely love. Microsoft has really done great things with this program over the years, although I must admit there are a few things I would change if I could. I also use Google Desktop, which enables me to index and search my entire computer, including e-mails, PDF files, and many other previously search-obscure file types. This is not unlike Microsoft’s solution which is called Instant Search. Microsoft Instant Search indexes files in a similar way, but I find that it hogs more resources and is generally not as good as Google Desktop.
Setting up virtual hosts with Apache on Windows XP
Sep 13th
In this tutorial, we will discuss how to setup virtual hosts for your development environment (or production, if you wish) on Windows XP. This will allow you to use URLs such as http://mywebsite/ instead of http://localhost/mywebsite/, which is much more realistic. Read the rest of this entry »
Adding default database table prefixes in Zend Framework 1.9.x
Sep 8th
Recently, I began working with Zend Framework 1.9.2 to restructure one of my web sites. I learned how to create an extension of the Zend_Db_Table_Abstract from a great “Getting Started” tutorial, but I found myself rewriting the table prefix with each and every new table. Below I explain one solution to this problem, but I am new to Zend Framework, so please feel free to recommend a better, more integrated way of doing this, if you know of anything.
Step 1: application.ini
Place the following code in your /application/configs/application.ini file:
[production] table_prefix = "webjawns_"
Step 2: TPC_DB_Table_Abstract class
Create a new class in the library directory. For this example, we’ll use TPC_DB_Table_Abstract as the name, which will be stored in /library/TPC/DB/Table/Abstract.php.
<?php
class TPC_DB_Table_Abstract extends Zend_Db_Table_Abstract {
protected function _setupTableName() {
global $application;
parent::_setupTableName();
$prefix = $application->getOption('table_prefix');
$this->_name = $prefix . $this->_name;
}
}
Step 3: /application/Bootstrap.php
After that, you’ll want to make sure that the new Abstract.php file is referenced in your /application/Bootstrap.php file.
protected function _initAutoload() {
$moduleLoader = new Zend_Application_Module_Autoloader( array(
'namespace' => '',
'basePath' => APPLICATION_PATH ) );
$moduleLoader->addResourceType('', '../library/TPC', 'TPC');
return $moduleLoader;
}
Step 4: /application/models/DbTable/NewTable.php
To use the table prefix, we will basically be substituting Zend_Db_Table_Abstract with TPC_DB_Table_Abstract. See the example below:
class Model_DbTable_NewTable extends TPC_DB_Table_Abstract {
// Database name will be $prefix + $_name
protected $_name = 'newtable';
}
This is just one way to create default table prefixes for each of your tables. I’m sure this isn’t the only way, and there may even be better, easier ways to do this. As an added bonus, we use the TPC_DB_Table_Abstract class to extend the Zend database functionality even further. If anyone else has any ideas about how to use default table prefixes (other than using a constant), please feel free to share them so we can all benefit.
