Wordpress Permalink error?

So after moving files and db data from an old ubuntu 10 server to my new ubuntu 12 server, I started testing my websites. As expected, certain things stopped working. I quickly installed the missing packages using apt-get, all looking good except my wordpress permalink feature was still not working. I checked the AllowOverride in all my setting files under /etc/apache2/sites-available/ . All good. Why??? I also checked my .htaccess in my blog directory, also looking good. My wordpress is working. But as soon as I click on any post or page links, I get a page not found 404 error. I verified this from /var/log/apache2/error.log. Yea, of course, coz the permalink is not working. ...

April 1, 2013 · 1 min · birdchan

storing blob into mysql through apache and php

This idea sounds easy and stuff. I agree. I assume you already got it working fine. But perhaps one day you may notice something is not working well, especially when you are dealing with bigger files. Below are a few things you want to look out for. Change your /etc/php.ini upload_max_filesize = 2M post_max_size = 8M memory_limit = 128M The default upload file size is 2M, which could be too small. If your upload file is larger than this, you will receive an empty upload file at your server side. So, increase this. While if you are using ajax to post-send, increase the post_max_size limit. Another thing to watch out for is memory_limit. If you somehow make copies of big blobs in your code, increasing PHP’s memory limit is also a good idea. ...

September 2, 2011 · 3 min · birdchan

PHP read from a mounted drive

Recently, I needed to read from a mounted drive on osx using Apache and PHP. I need to grab some file names in a certain directory using opendir or scandir, then dynamically populate a select dropdown box. The issue is, the default apache user is _www being in the _www group, while the mounted drive allows only the “staff” group to enter. In my case, I cannot change the mounted drive access permissions. ...

August 31, 2011 · 2 min · birdchan