Hotaru Docs tools: Log in / create account
This entry was contributed by mabujo in the forums. You can read the original on his blog at: http://www.mabujo.com/blog/getting-hotaru-running-on-centos-5-x/
I had hotaru working on my local test server (Ubuntu 9.10) but have been working on some themes and wanted to set them up on my server online for further testing and to create demo installs of each theme on subdomains on my site.
I’m running a dedicated server on CentOs 5.x and I had to make a few changes to get hotaru working. I ran a search on the hotaru forums and found some users facing similar problems who were unable to resolve them so I thought I’d post a guide for how I got it working.
Bear in mind this is my own server, so I have root access via ssh. You will need to be able to ssh to your box as root or sudo the commands to follow this guide.
Now, CentOs 5.x stable has packages for php 5.1.x installed, so first we will need to upgrade those packages.
rpm -qa |grep phpwill show you your currently installed version of php, this is what mine displayed :
rpm -qa |grep php wbm-php-pear-1.5-1 php-5.1.6-24.el5_4.5 php-imap-5.1.6-24.el5_4.5 php-xmlrpc-5.1.6-24.el5_4.5 php-pear-1.4.9-6.el5 php-common-5.1.6-24.el5_4.5 php-cli-5.1.6-24.el5_4.5 php-odbc-5.1.6-24.el5_4.5 php-mbstring-5.1.6-24.el5_4.5 php-devel-5.1.6-24.el5_4.5 php-gd-5.1.6-24.el5_4.5 php-mysql-5.1.6-24.el5_4.5 php-pdo-5.1.6-24.el5_4.5 php-snmp-5.1.6-24.el5_4.5 php-pgsql-5.1.6-24.el5_4.5
To upgrade to php 5.2.x we need to add the CentOs development repository to our local yum list. To this, create a new file in /etc/yum.repos.d/ I called mine /etc/yum.repos.d/CentOS-Testing.repo and put the following in the new file (use nano, vim or sftp/ftp to create and edit your file)
# CentOS-Testing: # Testing branch, procede with caution [c5-testing] name=CentOS-5 Testing baseurl=http://dev.centos.org/centos/$releasever/testing/$basearch/ enabled=1 gpgcheck=1 gpgkey=http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing includepkgs=php*
This tells yum to use the testing branch for packages starting with ‘php*’ only and leave other packages on the stable branch.
Now we can issue a yum command to upgrade php :
Yum will now look at dependencies and show you what files will be upgrade, compare the list to the output from your rpm -qa |grep php command. If there are files starting with php missing in the yum update then you may need to find newer versions of them. If that’s all good then enter y when yum prompts you to continue and the upgrade should complete.
Once php has been upgraded you just need to restart apache and you will be running the updated php packages.
So, restart httpd with :
service httpd restart
Now php -v shows me :
# php -v PHP 5.2.10 (cli) (built: Nov 13 2009 11:24:03) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
Fatal error: Call to undefined function bccomp()
I hadn’t seen this documented anywhere but it seems that hotaru has a dependency for the php-bcmath package, which was where I found the bccomp() function came from.
Luckily this was pretty easy to fix, I just did :
yum install php-bcmath
to install the package and then
service httpd restart
to restart apache again. I didn’t need to reconfigure php as the .ini file for bcmath was pulled in automatically in my configuration.
My installed php packages now look like this :
rpm -qa |grep php wbm-php-pear-1.5-1 php-5.2.10-1.el5.centos php-imap-5.2.10-1.el5.centos php-xmlrpc-5.2.10-1.el5.centos php-common-5.2.10-1.el5.centos php-bcmath-5.2.10-1.el5.centos php-cli-5.2.10-1.el5.centos php-pgsql-5.2.10-1.el5.centos php-odbc-5.2.10-1.el5.centos php-mbstring-5.2.10-1.el5.centos php-snmp-5.2.10-1.el5.centos php-devel-5.2.10-1.el5.centos php-pdo-5.2.10-1.el5.centos php-mysql-5.2.10-1.el5.centos php-gd-5.2.10-1.el5.centos php-pear-1.8.1-2.el5.centos
And everything seems to be working. So that’s it, I hope this can be of help to anyone who finds themself in a similar situation.