Hopefully tomorrow I will be converting this blog over to tumblr. I am just so sick of updating WP and its plugins. Once it gets converted I will have rewrites so no ones links are broken (only for the top posts).
Author Archives: Frank
Installing Nginx from source Ubuntu Server 9.10
Distro: Ubuntu 9.10 Server
First install the build-essential package
sudo apt-get install build-essential
Then download the source code, v. 0.7.63 was the current stable version as of writing this post.
wget http://sysoev.ru/nginx/nginx-0.7.63.tar.gz
Extract the source code
tar zxvf nginx-0.7.63.tar.gz
Enter the directory
cd nginx-0.7.63
Configure the build, I enabled the flv streaming and zip modules.
./configure --prefix=/usr --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --pid-path=/var/run/nginx/nginx.pid --lock-path=/var/lock/nginx.lock --user=www-data --group=www-data --with-http_flv_module --with-http_gzip_static_module --http-log-path=/var/log/nginx/access.log --http-proxy-temp-path=/var/tmp/nginx/proxy/
If you find that there are errors with the pcre and openssl packages run the following command to install the deps.
sudo apt-get install libssl-dev libpcre3-dev
Now compile the source code
make
Install the binaries
sudo make install
You are finished! I plan on covering how to setup nginx to serve static content and proxy php requests to apache.
Feed URL Updated
I am now using FeedBurner so please update your feeds to point to
http://feeds.feedburner.com/FrankKumro
Thanks!
CodeIgniter URL Security
A friend of mine who is developing a site based on CI pointed out something interesting. If you do not remove the \ char from the $config['permitted_uri_chars'] variable in config.php a user can perform an sql injection. I have not tested this but due to the comments in the source code I don’t believe they meant to place a \ in the regex. There is no need to escape the – char.
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';
to
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_-';
** Update **
I have yet to confirm if the person who told me about the SQL Injection was using any of the following:
$this->db->escape(); $this->db->escape_str(); $this->db->escape_like_str();
Using those methods could make the difference if someone uses a \ to escape in a query.
Book: Just Enough Structured Analysis
Today I start my one chapter a week journey with Just Enough Structured Analysis by Ed Yourdon. I have chosen to only read one chapter a week due to the fact that it is hard for me to stay focused and I won’t get burned out. Hopefully at the end of the 600+ page monster I will have a greater understanding of structured analysis.
PHP MySQL DATETIME format
If you wanted to store the current time in a variable instead of calling NOW() inside a query use the PHP code below.
date ("Y-m-d H:i:s", time());
and wow look at all those caps in the title
Moved away from gist
Due to the slow loading cause by using the gist embed code I have switch to syntax highlighter. Some code goes beyond the content area but that will be dealt with later. It still displays nice and readable so I see no issues.
