Archive for August, 2009

XPM not being found on php configure

Saturday, August 29th, 2009

Just spent the better portion of my day fixing a buggered PHP installation…

The magic line:
–with-mysql –enable-shmop –enable-track-vars –enable-sockets –enable-sysvsem –enable-sysvshm –enable-magic-quotes –enable-mbstring –with-curl –with-mcrypt –with-freetype-dir=/usr –with-exec-dir=/usr/bin –with-mhash=shared –with-pear=/usr/share/pear –with-zlib –with-openssl –with-xml –enable-gd-native-ttf –with-png –with-zlib –with-zlib-dir=/usr –with-jpeg-dir=/usr –with-png-dir=/usr –with-gd=/usr

^^ MAKE SURE –with-gd=/usr is at THE END

Lighttpd + mod_magnet on CentOS (64 bit)

Tuesday, August 18th, 2009

After about an hour of tinkering around on google and in the terminal here is what you need to do:

wget http://www.lua.org/ftp/lua-5.1.2.tar.gz
tar xfz lua-5.1.2.tar.gz
cd lua-5.1.2
nano src/Makefile

Replace:

 CFLAGS= -O2 -Wall $(MYCFLAGS) 

With:

 CFLAGS= -O2 -Wall -fPIC $(MYCFLAGS) 
make linux install

wget http://luaforge.net/frs/download.php/2384/md5-1.0.2.tar.gz
tar xfz md5-1.0.2.tar.gz
cd md5-1.0.2
make
make install
cd ..
wget http://luaforge.net/frs/download.php/1678/luazlib-0.0.1.rar

wget wget http://www.rarlab.com/rar/unrar-3.7.7-centos.gz
gunzip unrar-3.7.7-centos.gz
chmod +x unrar-3.7.7-centos
./unrar-3.7.7-centos x luazlib-0.0.1.rar
cd luazlib-0.0.1
make
make install

export LUA_CFLAGS="-I/usr/local/include"
export LUA_LIBS="-L/usr/local/lib -llua"

cd LIGHTTPD_DIRECTORY
./configure -with-lua
make
make install

All done!

Thanks to:
http://gadelkareem.com/2007/09/17/dynamic-content-caching-using-lighty-mod_magnet-lua/ && http://www.verlihub-project.org/doku.phpid=howto_install_lua_library_on_64_bit

Quote of the Day Tweeter

Saturday, August 15th, 2009

I wrote this to pull from QuotationsPage.com and post the quote of the day to twitter in Python. Download it, edit the username/password line and set it up in cron to run once a day.

Download Here

View source: http://bluescripts.net/quote-of-the-day-tweeter/

Interesting Loopback Device issue on CentOS

Monday, August 3rd, 2009

Was playing around with using the loopback devices to mount some OS images on CentOS and following the losetup followed by a mount command would indeed mount the image, but umount wouldn’t unmount it and would leave it stagnant, leaving me with this error:

ioctl: LOOP_CLR_FD: Device or resource busy

Interestingly enough though the lomount command

lomount -diskimage OS.img -partition 1  /MOUNTFOLDER

and then using umount to unmount the mountfolder would unmount the loopback device properly and free it for re-use.

Hope this helps someone!

© 2008 Josh Rendek.