When compiling PHP from source (in my case version 5.3.2) on CentOS 5.4 I kept getting the following error when trying to compile with mcrypt: "/usr/bin/ld: cannot find -lltdl" This seems to be due to a missing development library with the obscure name of libtool-ltdl-devel to fix this simply use: y[...]
Archive for the ‘Notes’ Category
PHP Search and Replace Directory Recursively
On a message forum I regularily visit a member was having issues with code being placed in multiple files that he wanted to remove or change without having to edit each and every file manually. For this I created a search and replace function which will recursively search the directory and every fil[...]
GoDaddy mod_rewrite Hell
Whilst trying to install a piece of software on a GoDaddy hosted account I noticed that mod_rewrite variables were simply not being passed to the correct pages. When digging a bit deeper I found that it was effectively ignoring extensions in URLs and just displaying the file with the extension. i.e.[...]
Case of the missing/hidden IE8 Developer Tools window
Whilst working on a current project I was trying to get cross-browser compatability working nicely. However when I came to load up IE’s Developer Tools I found it was loading up the window but nothing was there! I’m running Windows 7 and this seems to be the only[...]
[PHP] Get current time in milliseconds
I recently needed to get the current time in milliseconds, of course this can easily be retrieved using microtime() however I needed the entire number in digits, not in decimals with seconds seperately etc. Heres how: ?View Code PHP1 2 3 $timeparts = explode(" ",microtime())[...]
Bash, Bad Interpreter
I recently came across: /bin/bash^M: bad interpreter: No such file or directory When trying to run a bash script that someone else had edited. This most commonly happens on UNIX systems if the file has been edited on MS-DOS or Mac. The cure for this is to run a simple perl script: ?View Code BASH1 [[...]