AWS with downgraded PHP5.2
So, we have some old server running on obsolete PHP version which happens to be PHP5.2. There's some issue with application running and we need to fix it. I just recently upgraded my PHP to 5.4 since 5.3 also marked as archived by PHP.net.
Since I'm using AWS AMI, so google has point me to this site (http://forums.fedoraforum.org/showthread.php?t=240556) on how to downgrade my PHP5 installed.
Everything when ok when suddenly my configure command issue me "cannot find libmysqlclient" error.Β It turns out that, you need to specify the libdir variable, so by doing "ldconfig -v | grep mysql". So I will add "--with-libdir=lib64". Remember to remove "/usr" from the given path and if you are using 32bit, it should be in "lib" directory (if not mistaken).
./configure --with-apxs2=/usr/sbin/apxs --with-mysql=/usr/local --with-libdir=lib64
So, configure action when well until it give me another error. This one is related to PHP need to be patched. Since, Im using 5.2.17, this site (http://www.litespeedtech.com/support/forum/showpost.php?p=74000&postcount=8)
wget https://mail.gnome.org/archives/xml/2012-August/txtbgxGXAvz4N.txt patch -p0 -b < txtbgxGXAvz4N.txt make make install
So, by patching the PHP, it helps me finished the installation. Finally, you need to chown /var/www/html so that you can upload files here and you're DONE!
sudo chown -R ec2-user /var/www/html













