NoCatSplash With Authentication

DD-WRT is an open-source Wi-Fi firmware that you can install on select consumer-based wireless routers. I’ve been using the DD-WRT firmware on several Linksys and Buffalo wireless access points for a number of years. In addition, I have also implemented a feature called NoCatSplash.

NoCatSplash is a feature that allows wireless users to be redirected to a special splash page, whether to notify users of a disclaimer, or to make users agree to certain terms and agreement, or simply to advertise a web page. The NoCatSplash feature will prevent users with access to the Internet until they click on the submit button, thereby agreeing to the terms and agreement.

What was lacking with NoCatSplash was authentication. So, with a little bit of research, I found someone’s code at Github that allows simple authentication with NoCatSplash. It’s written in PHP and doesn’t require a database. It’s quite simple, but works flawlessly. The login credentials are kept on a file and can be changed anytime you’ll need to change passwords.

I’ve modified his code to fit my needs. Suffice to say, the code works great as advertised.

Fixing CodeIgniter Email Setup

I have been using an application I wrote in CodeIgniter that sends email notifications when an advertising link is activated or when it has expired. Several weeks ago, it suddenly stopped working. It was no longer sending email notifications as intended. I was using GMail’s SMTP server to send out the email notifications. GMail’s SMTP does require authentication. Typically, the CodeIgniter’s email preferences are located in the “config/email.php” file. It dawned on me that changing my GMail password broke my script. Here’s my email preferences found in the config/email.php file.

$config['protocol']='smtp';
$config['smtp_host']='ssl://smtp.gmail.com';
$config['smtp_port']='465';
$config['smtp_timeout']='30';
$config['smtp_user']='yourusername@gmail.com';
$config['smtp_pass']='your password';
$config['charset']='utf-8';
$config['newline']="\r\n";

So, updating the password fixed my problem.

Simple Invoices 500 Internal Server Error

Simple Invoices is a free, open source, web based invoicing system that you can install on your server, desktop, or at a service provider. I installed Simple Invoices on a webhost company I rather not mention. The application was working fine, until they tweak their PHP settings several months back. As a result, the PDF export in Simple Invoices no longer worked. I was bummed. So, I was forced to run Simple Invoices from my home server, which was fun, but the issue was, I can’t access it outside of the house.

So, I decided to install Simple Invoices on my new account at Linode. Now, the funny thing was, the application won’t even come up. Not even a login page. So, I searched online for a possible solution to my dilemma. Some suggested to increase the php memory settings to 128M, but that didn’t work out for me. At one time, I thought I had a missing pdo_mysql module, but that wasn’t the case. Then, I stumbled into something that led me to the ultimate discovery.

Simple Invoices has this configuration file called config.ini located inside the config folder. One thing this application doesn’t like are extra characters inside the config file. I happen to like funky passwords with interesting characters like +-)!@#. My MySQL password happens to have a close parenthesis in it. Essentially, this extra character caused the entire application to not start. So, I change my password, and sure enough, the application worked.

So, if you ever get a 500 internal server error with the Simple Invoices application, make sure you don’t have any of those extra characters inside your config.ini file. I wasted two hours trying to fix this issue, only to be surprised by such an idiotic requirement. That means I can’t use difficult passwords for this application. I think this is either a design issue or a funny requirement of the Zend Framework, which by the way, Simple Invoices is written on. It was somewhat funny, but I wasn’t amused.

WordPress Blank Dashboard

I recently moved one of my blogs to Linode, a VPS hosting company. I noticed right away, when I logged in as admin, that the WordPress Dashboard, displayed a blank page. That’s not good. So, I started removing plugins by renaming the plugin directories until I found the offending plugin. Sure enough, it was a custom plugin I wrote myself.

Nothing has changed. The plugin hasn’t been touch. WordPress is the same latest version. The only thing that changed was the host server. So, I started looking into my PHP installation. What could possibly be missing? When I looked into my plugin code, I noticed some references to curl. I realized my server was missing a php5-curl module on the new host server.

A simple command to install php5-curl on the new server does the trick.

sudo apt-get install php5-curl

In this particular case, a missing module in PHP, caused the plugin to die unexpectedly, resulting in a blank Dashboard page within WordPress. Removing offending plugins temporarily fixes the issue, but it doesn’t get to the root of the problem. In my case, I was able to narrow it down to the missing PHP curl module that my plugin desperately needs.

In any case, everything is back to normal as expected, except for the blog, which is serving pages exceptionally fast, since I’m now running at Linode.

PHPVirtualBox

PHPVirtualBox is a web-based program that allows you to control a remote Virtualbox GUI. PHPVirtualBox is ideal for systems that don’t have remote GUI access. Access is done via a browser. Remote virtual machines can be started and stopped, shutdown, and rebooted. In addition, snapshots can be taken, deleted and restored remotely via the browser. Howtoforge.com goes over the installation of PHPVirtualbox in this short article.