Category: Web Development

Running Nginx and PHP5 on Ubuntu

Posted: July 8th, 2011     Reminders to myself   Web Development

Very simple to set up Nginx, PHP5 and MySQL on Ubuntu. Hats off to the Ubuntu guys for making it so simple.

  1. sudo apt-get install nginx
  2. sudo apt-get install php5-cgi  (you might need to also need to install php5)

Test that nginx works by opening your browser and going to http://localhost/

Edit /etc/nginx/sites-available/default

Search for the bits that say “# pass the PHP scripts to FastCGI server….” uncomment those configuration bits.

Create index.php in /usr/share/nginx/www/

In it, put:

 <?php  phpinfo();

In a web browser go to http://localhost/index.php     It should give you a “bad gateway error”. This is because php fastCGI isn’t running. Go back to your terminal and type “php5-cgi -b 127.0.0.1:9000 &”  This should start php fastCGI in the background. Now visit http://localhost/index.php again and you should see the php info screen.

Architectural 3D Awards Site

Posted: April 4th, 2011     Web Development

I recently delivered the Architectural 3D Awards website for CGarchitect.com. The new awards website is a custom built site that enables users to upload image and video entries to the contest for judging. The system takes care of large file uploads, video compression, image handling, judging, etc. making the whole process of doing a call for entries, managing the entries, sorting and judging them much simpler. CGarchitect was able to secure more sponsors than ever before, making this the largest architectural 3D Awards contest to ever have been run.

Architectural 3D Awards Home Page

Entry submission page with large file uploader

Entry Validation Page

Entry Management Backend

Autodesk Virtual GDC Booth

Posted: March 1st, 2011     Computer Graphics   Web Development

I’m happy to post that my latest 3D project went live today. I built the virtual Autodesk GDC 2011 booth which is an interactive marketing experience showcasing on the Autodesk Media and Entertainment community site, The Area. In this simple interactive application, users can walk around a 3D model of the Autodesk booth at the Game Developers Conference this year.

Game-resolution booth in Maya

Game authoring in Unity.

Virtual GDC Booth

Running Linux Processes in the Background

Posted: January 12th, 2011     Tip   Web Development

To run a Linux process in the background, be able to log-off, execute this:

nohup {command} &

‘nohup’ will make sure that the process you’re running won’t hangup when it can no longer output to terminal. The ‘&’ at the end of the command puts the process in the background.

Check that the process is running by typing ‘jobs’. You should see the process running.

You should now be safe to logout and the process will continue running.

50 UNIX / Linux Sysadmin Tutorials

Posted: December 27th, 2010     Web Development

Really useful tutorials for Linux sys admin stuff. Check it out.

50 UNIX / Linux Sysadmin Tutorials

WordPress HTTP Error on uploading anything

Posted: December 26th, 2010     Web Development

I have a love/hate relationship with WordPress. This weekend it went mostly to hatred. :)  I started getting HTTP errors on uploading anything, totally randomly with no explanation.

Here’s the solution. Open your .htaccess file and stick this in:

<IfModule mod_security.c>
<Files async-upload.php>
SecFilterEngine Off
SecFilterScanPOST Off
</Files>
</IfModule>

New Gnomon Courses Site

Posted: December 22nd, 2010     Web Development

We just delivered the new Gnomon School of Visual Effects courses section, which enables users to easily browse and find courses offered by the school. I got to work with the super talented Eric Carl, who did all the design work and HTML implementation. The courses section is now powered by the Expression Engine content management system. I wrote a module that imports data from the school’s database and automatically updates information on the public website, as well as the online shopping cart system. Previously, registration periods were tedious for the web team as they had to update all this data by hand whenever it changed (which was on a daily basis). Now, the process is automated and updated with a few clicks. :)

The new Gnomon School of Visual Effects course section.

The new Gnomon School of Visual Effects course pages. Information such as instructors, availability, pre-requisites and more are automatically updated.

All courses can even be listed in a convenient table now.

Linux: Changing user shell

Posted: December 17th, 2010     Web Development

Display a list of shells:

less  /etc/shells
cat  /etc/shells
more /etc/shells

Change the user login shell to /bin/ksh for foo user

chsh -s /bin/ksh foo
chsh -s /bin/bash username

Setting up Passive FTP on ProFTPD

Posted: December 17th, 2010     Web Development

This is posted as a reminder to myself…

Edit /etc/proftpd/proftpd.conf

Look for PassivePorts.

Uncomment PassivePorts and put in a suitable range, e.g.

PassivePorts                  1024 1048

Then uncomment MasqueradeAddress and put in the IP address of the server.

MasqueradeAddress               <SERVER IP>

On Amazon EC2, open the ports for FTP and Passive FTP:

ec2-authorize <your security group> -p 20-21
ec2-authorize <your security group> -p 1024-1048
Voila.

CGarchitect/Autodesk/NVIDIA GPU Rendering Revolution Competition

Posted: October 8th, 2010     Web Development

CGarchitect.com recently ran a GPU Rendering Revolution Competition in conjunction with Autodesk and NVIDIA. The Rendering Revolution contest is a global still image architectural visualization competition in celebration of the Autodesk 3ds Max 20th Anniversary and advancements in GPU-accelerated rendering solutions.

I developed the submission system that enables participants to upload large image files in a slick way. I implemented a chunked file uploader system, which breaks up a file into small chunks, sends them to the server and reconstructs the file on the other end. Also developed a judging system that enables judges to log in a private area to score entries. Overall, the contest went smoothly and the system worked wonderfully.

CGarchitect Rendering Revolution Competition

 
Leonard Teo
CEO, Ballistiq
Montreal, Canada