Posts from the ‘Code and Servers’ Category

  • article_php

    MySQL Class for PHP

    August 5th, 2010 | Code and Servers | Tomi Lehto | No Comments

    This should get you started if you’re looking to connect to MySQL database.

    Read More

  • article_php

    Show Errors in PHP

    July 15th, 2010 | Code and Servers | Tomi Lehto | No Comments

    In the good “old” days when 99% of all websites looked horrible, PHP would by default spit out all errors. If you made a mistake in your code, you’d get gracefully “notified”. With PHP 5 we arrived to a new era of hidden rebukes – page just loads totally blank by default. If you like [...]

    Read More

  • article_ssh

    Bad SSH Logins

    July 10th, 2010 | Code and Servers | Kenneth | 1 Comment

    On a linux machine all the failed ssh logins go to a log file in /var/log/btmp. So the question being, How do we see this information in a nice understandable format. We could just use the cat utility like so cat /var/log/btmp. After 10 minutes

    Read More

  • article_flash

    Sanitizing Input in Flash

    June 1st, 2010 | Code and Servers | Kenneth | No Comments

    Let’s say for example you are creating a bulletin board system or some post system from within flash and you would like to restrict the use of any html or special characters.

    Read More

  • Flash Socket Policy Server

    Flash Socket Policy Server

    March 19th, 2010 | Code and Servers | Kenneth | 3 Comments

    We have a custom built communication server that can handle video/audio and text. Well a while back we wrote a flash client for this server. Well Adobe had just updated their flash player to include some new security enhancements one of which involved not allowing cross domain policy files to be served up via HTTP. [...]

    Read More

  • Multi-language support in T-SQL

    Multi-language support in T-SQL

    March 19th, 2010 | Code and Servers | Tomi Lehto | 2 Comments

    This is brilliant, a little scary, but brilliant. (note added July 2010: OK, A LOT SCARY!) While back we built a website supporting unlimited languages and articles. For a reason unknown I decided to keep all my content in one table, index it and link my other tables to it.

    Read More

  • Updates and Joins in MySQL

    Updates and Joins in MySQL

    March 18th, 2010 | Code and Servers | Tomi Lehto | No Comments

    Now this is supremely hot. You can update a whole set of information from one table to another without passing any data from your PHP. Not sure if this works with MS SQL, I’ll check next time I’m around those machines.

    Read More

  • Increasing max upload limit in WordPress

    Increasing max upload limit in WordPress

    March 16th, 2010 | Code and Servers | Tomi Lehto | 1 Comment

    I was working on adding some fancy media content  for one of my customers, and WordPress gave me this error: EPIC FAIL. This file is too big. The maximum upload size for your server is 2M.

    Read More