Hosting: Enabling Redis class on MediaTemple’s gridserver (gs)

Here's how I enabled access to a Redis server from my (GS) gridserver: 1. Store your SITEID in a variable: export SITEID=`pwd | awk -F\/ '{ print $3 }'`   2. Create a folder to store the redis.so module mkdir /home/$SITEID/data/lib mkdir /home/$SITEID/data/lib/php/   3. Get the Redis PECL package… Continue reading

Raspberry Pi: installing a LAMP server

Let's put the Raspberry Pi to good use:   1. Install Mysql sudo pacman -S mysql 2. Start your server # systemctl start mysqld 3. Secure your mysql installation # /usr/bin/mysql_secure_installation ——————- NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL       SERVERS IN PRODUCTION USE!  PLEASE… Continue reading

Facebook: Creating your first APP in PHP

So you finally decided you want to create a Facebook app to make your million dollar idea pay off a million dollars! Great!   Cutting to the chase:   1. Install the Developers App so you can get started creating apps on Facebook. https://developers.facebook.com/ and click Allow 2. Create and… Continue reading

PHP 5: Mass Virtual Hosting points $_SERVER[‘DOCUMENT_ROOT’] to wrong folder

When I set up mass virtual hosting for my servers, it seems PHP won’t get the right $_SERVER[‘DOCUMENT_ROOT’] Here’s the solution I found: 1.Edit your php.ini (the file location depends on  how you have PHP setup) 2. Edit this section ; Automatically add files before PHP document. ; http://php.net/auto-prepend-file auto_prepend_file… Continue reading

Great way to integrate SwiftMailer and Kohana 3

Just found this post: http://www.flynsarmy.com/2010/06/integrating-swift-mailer-into-kohana-3/ by Flynsarmy showing the simplest way to integrate SwiftMailer and Kohana 3 Create the following files/folders: /modules/swiftmailer /modules/swiftmailer/init.php /modules/swiftmailer/classes Inside /modules/swiftmailer/classes/ drop the official latest build of Swift Mailer. Enter the following into init.php. <?php require Kohana::find_file(‘classes’, ‘Swift-4.0.6/lib/swift_required’); There. Wasn’t that easy? Remember to enable… Continue reading

My current methods while using Kohana 3.0.8 – part 1

I’ve finally decided to get started on documenting how I’ve been using this wonderful framework. So if you’re patient enough to deal with my crazy schedule (meaning this series may take a while to be finish), fasten your seatbelt: First of all: Know your environment (your public html folder, a… Continue reading

Weird: FCK loses first line of formatted text when submitting

Last night (Oct, 28th), I was fixing a very weird problem where text edited using FCK, submitted via jQuery was losing the very first line when it was formatted (color, style) but not every single time… randomly it seemed. At first, I thought it would be something wrong with FCK… Continue reading

Working with Kohana PHP Framework v2.3.4

Let’s start working with Kohana (I’ve actually been working with it for a while and thought would be nice to share my experiences)! First thing you want to do is download it and extract it to a folder on your webserver. You can read about it and download it at:… Continue reading