PHP Performance.
I’ve noticed the performance of my PHP is dog slow. I’ve since put in some debugging code and performance measuring code. My code might not be as modular or pretty looking but at least it will work in a reasonable amount of time. Object oriented PHP is causing me many performance headaches. It was disgustingly slow.
Here’s a link to probably the best guide/page on the net on PHP optimisation.
http://www.wardontheweb.com/10-performance-tips-to-speed-up-php/
Another decent site/page with citations/references:
http://www.hm2k.com/posts/50-php-optimisation-tips-revisited
Problem Solved
It turns out much of my class headaches came from an extremely slow classloader function.
So if you are having issues with PHP class loading look into what your class loader is doing.
Mine was searching everywhere for the class and this was wasting gobs of time.
Meanwhiles all classes were in 2 directories.
Yum and Git on Centros 4/4.5
Trying to install software on linux sometimes can be a real pain.
Sure yum is great but some hosts such as MediaTemple don’t have that installed.
So here’s a list of the commands I had to run in order to get Yum installed
on a Centros 4.* box in an attempt to install another program:
Everything for centros 4.* is located here now => http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/
rpm -Uvh http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/rpm-libs-4.3.3-32_nonptl.i386.rpm http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/rpm-4.3.3-32_nonptl.i386.rpm
rpm -Uvh http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/popt-1.9.1-32_nonptl.i386.rpm
rpm -Uvh http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/rpm-python-4.3.3-32_nonptl.i386.rpm
rpm -Uvh http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/libxml2-2.6.16-12.6.i386.rpm
rpm -Uvh http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/libxml2-python-2.6.16-12.6.i386.rpm
rpm -Uvh http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/python-elementtree-1.2.6-5.el4.centos.i386.rpm
rpm -Uvh http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/sqlite-3.3.6-2.i386.rpm
rpm -Uvh http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/python-sqlite-1.1.7-1.2.1.i386.rpm
rpm -Uvh http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/rpm-python-4.3.3-32_nonptl.i386.rpm
rpm -Uvh http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/python-urlgrabber-2.9.8-2.noarch.rpm
rpm -Uvh http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/yum-metadata-parser-1.0-8.el4.centos.i386.rpm
rpm -Uvh http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/yum-2.4.3-4.el4.centos.noarch.rpm
After installing that amazing number of packages for yum. It turns out the program I wanted wasn’t even available from yum. So I looked elsewhere.
To install “Git” you can do the following:
rpm -Uvh http://download.fedora.redhat.com/pub/epel/4/i386/git-core-1.5.4.7-3.el4.i386.rpm http://download.fedora.redhat.com/pub/epel/4/i386/perl-Git-1.5.4.7-3.el4.i386.rpm
Everything is downloaded from Fedora Redhat.
It runs ~/git woo. Now to see if I can use git to fetch my source/respository.
Comment on Yum and Git on Centros 4/4.5