PHP session handling with memcache

Wojtek on memcache, PHP, session · · Comments · 1 min read

In last two posts I described how to install memcached daemon and memcache extension for PHP. Today I'll show you how to configure your PHP to use memcache to handle sessions. One thing I should mention is that when installing memcache you should answer yes when asked 1. Enable memcache session handler support? : yes First of all, lets start two... Read more »

How to run memcache in PHP

Wojtek on CentOS, Linux, memcache, PHP · · Comments · 1 min read

After installing memcached daemon, we have to install memcache PHP extension. yum install php-pecl-memcache or apt-get install php5-memcache If above is not an option try below method. pecl install memcache After successful installation add memcache.so extension to your php.ini file. vim /etc/php.ini Add this line: extension=memcache.so Restart web server service httpd restart Test out... Read more »

How to install memcached on CentOS

Wojtek on bash, CentOS, libevent, Linux, memcached · · Comments · 1 min read

Install dependancy Before we install memcached we need a dependency library libevent. Check for latest stable version at https://monkey.org/~provos/libevent/ cd /usr/local/src wget http://monkey.org/~provos/libevent-1.4.13-stable.tar.gz tar -xzvf libevent-1.4.13-stable.tar.gz cd libevent-1.4.13-stable ./configure --prefix=/usr/local make make install cd .. Install memcached Check for... Read more »

yum Missing Dependency

Wojtek on CentOS · · Comments · 1 min read

Problem Sometimes after running yum update or yum install something you’re getting missing dependency error messages. Like this: --> Missing Dependency: /usr/lib64/python2.4 is needed by package gamin-python-0.1.7-8.el5.x86_64 (installed) --> Missing Dependency: /usr/lib64/python2.4 is needed by package libxml2-python-2.6.26-2.1.2.8.x86_64 (installed) This... Read more »

PHP summer time off

Wojtek on PHP · · Comments · 1 min read

Problem PHP has a bug with applying summertime in some timezones. If you’ve set correct timezone in your php.ini file and running still gives you wrong time its quite possible that you’ve just stumbled upon this bug. Solution To correct this you need to install new timezone file. Run below command on your server: pecl install timezonedb... Read more »

MySQL PHP PDO error in xampp

Wojtek on MySQL, PDO, PHP, xampp, Windows · · Comments · 1 min read

If your PDO scripts are crashing Apache after installing xampp 1.7 for windows all you need to do is: download this package http://windows.php.net/downloads/releases/php-5.2.11-nts-Win32-VC6-x86.zip" unzip copy libmysql.dll into xampp\apache\bin and xampp\php restart apache All should be good now.... Read more »

Install xmpppy on CentOS

Wojtek on bash, jabber, Linux, xmpppy · · Comments · 1 min read

xmpppy is a Python library allowing you to send messages from your server to any Jabber enabled communicator. Firstly download and unpack xmpppy to a local directory. Next go into the unpacked directory and run: python setup.py install Next you need a script that will do the sending. Use your favourite text editor to create file i.e.: vim... Read more »

Remove service in Windows

Wojtek on registry, Windows · · Comments · 1 min read

Usually when you uninstall something, associated service is removed with the software, but sometimes it lingers on. In order to remove service manually you need to: Click Start -> Run… -> type in "regedit" Find the registry entry HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services Find the service you need to remove and delete the entry. Note:... Read more »

Use apache mod_deflate to compress your files

Wojtek on Apache, compress · · Comments · 2 min read

Compressing CSS and JavaScript files will put a bit more load on the server but its worth doing as it will save you some bandwidth and your site will be delivered faster to your users/visitors. Load mod_deflate First you need to make sure you have mod_deflate module loaded. Check you have this line in your httpd.conf... Read more »