Apache | Brain Goo https://www.popmartian.com/tipsntricks Carpe Crap 'em Wed, 21 Oct 2026 14:52:32 +0000 en-US hourly 1 https://wordpress.org/?v=6.9.10 HOW TO Install mcrypt for PHP on RedHat Linux 6 and Oracle Linux 6 https://www.popmartian.com/tipsntricks/2014/06/04/how-to-install-mcrypt-for-php-and-redhat-linux-6-or-oracle-linux-6/ https://www.popmartian.com/tipsntricks/2014/06/04/how-to-install-mcrypt-for-php-and-redhat-linux-6-or-oracle-linux-6/#comments Wed, 04 Jun 2014 15:05:42 +0000 http://www.popmartian.com/tipsntricks/?p=317 This tutorial shows you how to install libmcrypt and the companion PHP module under RedHat Linux 6 and Oracle Linux 6. By default, RHEL and OL do not provide mcrypt or libmcrypt packages for the 6.x release. Subsequently, they don’t … Continue reading →

The post HOW TO Install mcrypt for PHP on RedHat Linux 6 and Oracle Linux 6 first appeared on Brain Goo.

]]>
This tutorial shows you how to install libmcrypt and the companion PHP module under RedHat Linux 6 and Oracle Linux 6.

By default, RHEL and OL do not provide mcrypt or libmcrypt packages for the 6.x release. Subsequently, they don’t provide PHP5 mcrypt modules either. Many PHP apps including PHPMyAdmin and Magento make use of the better crypto support of libmcrypt.

So how do you install it? You have to build it.

Part 1: Building libmcrypt

Part 1, Step 1: Install your build environment
libmcrypt is written in C++ so you need a C++ compiler.
sudo yum install gcc-c++.x86_64
That will install the compiler and dependencies.

Part 1, Step 2: Get the software
Download it here: http://sourceforge.net/projects/mcrypt/files/
Remember, download libmcrypt, not mcrypt.

Part 1, Step 3: Pick a location and unpack it
Most people install software in to the default location, but I’m going to install in to somewhere that isn’t owned by root just to illustrate how to separate your custom app components from the OS.
mkdir /myappserver
cd /myappserver
cp /path/to/download/libmcrypt-2.5.8.tar.bz2 /myappserver/
bunzip2 libmcrypt-2.5.8.tar.bz2
tar xf libmcrypt-2.5.8.tar
mv libmcrypt-2.5.8 libmcrypt-install

Part 1, Step 4: Build it!
cd libmcrypt-install
./configure --prefix=/myappserver/libmcrypt-2.5.8 --exec-prefix=/myappserver/libmcrypt-2.5.8 --disable-posix-threads
make
make install

Part 1, Step 4: Make a Symlink
In order to make life easier for upgrades later, symlink libmcrypt to the version you built. This will let you compile a new version later and simply move the symlink. Anything else you build against this package will only need to know about the symlink.
ln -s /myappserver/libmcrypt-2.5.8/ /myappserver/libmcrypt

You have successfully installed libmcrypt. You can move it from server to server by simply copying /myappserver/libmcrypt-2.5.8/ to any other machine.

Part 2: Building the PHP Module
Building the PHP module can be done in one of two ways.

  1. Build your own PHP and copy the module to an existing PHP installation
  2. Build your own PHP and use it

I’m not going to do a full tutorial on building PHP here (Option 2). Just note that the steps are the same as Option 1, but instead of copying the extention in to your PHP installation, compile PHP with all the modules you need, then install and use the PHP you built.

Option 1: Build your own PHP and copy the module to an existing PHP installation

Part 2, Option 1, Step 1: Install your build environment
PHP is written in C so you need a C compiler.
sudo yum install gcc.x86_64
That should give you everything you need to compile PHP.

Part 2, Option 1, Step 2: Get the software
MAKE SURE YOU DOWNLOAD THE PHP VERSION THAT MATCHES YOUR INSTALLATION
Download it here: http://us3.php.net/downloads.php

For this tutorial, I used PHP 5.5.13

Part 2, Option 1, Step 3: Pick a location and unpack it
I’m going to use a non-standard location since I’m just building the software. I’m not going to use it from here.
mkdir /myappserver
cd /myappserver
cp /path/to/download/php-5.5.13.tar.bz2 /myappserver/
bunzip2 php-5.5.13.tar.bz2
tar xf php-5.5.13.tar
cd php-5.5.13

Part 2, Option 1, Step 4: Build it!
./configure --prefix=/myappserver/php-5.5.13 --exec-prefix=/myappserver/php-5.5.13 --with-mcrypt=/myappserver/libmcrypt
make

Note the --with-mcrypt=/myappserver/libmcrypt option. This points to the symlink above. If you need to upgrade libmcrypt later or rebuild the module for any reason, you don’t need to worry about what version of libmcrypt you have, just use the symlink!

You should now be able to find your module in /myappserver/php-5.5.13/ext/mcrypt

Part 2, Option 1, Step 5: Use it!

  • Copy the mcrypt directory above in to the ext directory in your PHP installation.
  • Restart your Apache server

Test it with a little PHP code:
<?php
extension_loaded('mcrypt') ? print 'Mcrypt is working' : print 'Mcrypt is not working';
?>

Did you find this post useful or have questions or comments? Please let me know!

The post HOW TO Install mcrypt for PHP on RedHat Linux 6 and Oracle Linux 6 first appeared on Brain Goo.

]]>
https://www.popmartian.com/tipsntricks/2014/06/04/how-to-install-mcrypt-for-php-and-redhat-linux-6-or-oracle-linux-6/feed/ 1
Word Press problem Unknown: Releasing SysV semaphore https://www.popmartian.com/tipsntricks/2008/07/14/word-press-releasing-sysv-semaphore/ https://www.popmartian.com/tipsntricks/2008/07/14/word-press-releasing-sysv-semaphore/#comments Mon, 14 Jul 2008 16:20:55 +0000 http://www.popmartian.com/tipsntricks/?p=21 If you have WordPress installed you may run in to an error that constantly prints something like this: Warning: Unknown: Releasing SysV semaphore id 58 key 0x152b in request cleanup in Unknown on line 0 This is not an error … Continue reading →

The post Word Press problem Unknown: Releasing SysV semaphore first appeared on Brain Goo.

]]>
If you have WordPress installed you may run in to an error that constantly prints something like this:

Warning: Unknown: Releasing SysV semaphore id 58 key 0x152b in request cleanup in Unknown on line 0

This is not an error from WordPress, but from the WP Super Cache Plugin you forgot you installed. The error comes when from the cache directory is not writable.

Change the permissions on the wp-content/cache directory to allow the web user to write and the error will disappear.

The solution is obvious if you check the source code on the page when the error appears. WP Super Cache spits out the error, but it is hidden in HTML comment tags. Your source code will look something like this:

<!-- Dynamic Page Served (once) in 0.297 seconds -->
<!-- File not cached! Super Cache Couldn't write to: wp-content/cache/wp-cache-2876abde8ce3a2aa817c8289ea85486e.html -->

87
<br />
<b>Warning</b>: Unknown: Releasing SysV semaphore id 58 key 0x152b in request cleanup in <b>Unknown</b> on line <b>0</b><br />

The post Word Press problem Unknown: Releasing SysV semaphore first appeared on Brain Goo.

]]>
https://www.popmartian.com/tipsntricks/2008/07/14/word-press-releasing-sysv-semaphore/feed/ 1
Poor man’s calendar server with iCal and Mozilla https://www.popmartian.com/tipsntricks/2007/07/25/poor-mans-calendar-server-with-ical-and-mozilla/ https://www.popmartian.com/tipsntricks/2007/07/25/poor-mans-calendar-server-with-ical-and-mozilla/#respond Wed, 25 Jul 2007 18:54:57 +0000 http://www.popmartian.com/tipsntricks/2007/07/25/poor-mans-calendar-server-with-ical-and-mozilla/ It’s easy to set up a shared calendar system with free software that scales well for a few users (great for a home network) and has tons of support from third parties. What you need: iCal client like Sunbird or … Continue reading →

The post Poor man’s calendar server with iCal and Mozilla first appeared on Brain Goo.

]]>
It’s easy to set up a shared calendar system with free software that scales well for a few users (great for a home network) and has tons of support from third parties.

What you need:

  • iCal client like Sunbird or Lightning from Mozilla
  • Apache web server with WebDav installed

How to do it:

  1. Install WebDav and password protect a public directory on your web server.
  2. Touch a .ics file for your calendar. I called mine matt.ics
  3. chmod the directory so the web user can create files and modify the .ics file
  4. Install and configure an iCal client that can publish via WebDav. Sunbird is excellent for this.
  5. Remove your local calendar from Sunbird
  6. Add a calendar to Sunbird using the URL to your empty .ics file
  7. Add an event to your calendar. Sunbird should modify the .ics file on your web server. You will probably be prompted for the username and password on the first try.
  8. Add that calendar to as many clients as you want. They can all share the calendar. Create more calendars! Party!

The post Poor man’s calendar server with iCal and Mozilla first appeared on Brain Goo.

]]>
https://www.popmartian.com/tipsntricks/2007/07/25/poor-mans-calendar-server-with-ical-and-mozilla/feed/ 0