This document describes how to install and use sshfs, a FUSE based filesystem that uses SSH to mount remote folders. Since it is based on FUSE (userspace filesystem framework for Linux) your kernel will need to have the fuse module available. FUSE is included in kernel newer than 2.6.14, so I will assume that you will have it already included in your kernel.
Read the rest of this entry »
Tags: fuse, ssh, sshfs, tips
“The Debian project is pleased to announce the third update of its stable distribution Debian GNU/Linux 4.0 (codename etch). This update mainly adds corrections for security problems to the stable release, along with a few adjustment to serious problems.
Those who frequently install updates from security.debian.org won’t have to update many packages and most updates from security.debian.org are included in this update.”
Note: this is true
. I’ve not even noticed this and seen it as a minor apt upgrade
Release Announcement: http://www.debian.org/News/2008/20080217
A complete list of all accepted and rejected packages together with rationale is on the preparation page for this revision: http://release.debian.org/stable/4.0/4.0r3/
Tags: Debian, etch
If you have seen an error like “Fatal Error: PHP Allowed Memory Size Exhausted” in apache logs or in your browser, this means that PHP has exhausted the maximum memory limit. This post will show 3 different ways on how you can increase the php memory limit and also explain when you should use them.
First, let’s see where is this limit coming from. Normally you will see from the error message what is the actual limit, as this will look like:
PHP Fatal error: Allowed memory size of X bytes exhausted (tried to allocate Y) in whatever.php
The default value might differ depending on what php version and linux distribution you are running, but normally this will be set to either 8M or 16M. For example on my debian etch, running on php 5.2 this is set by default at 16M.
In order to identify the current value on your system, look inside your php.ini and search for memory_limit:
memory_limit = 16M ; Maximum amount of memory a script may consume (16MB)
There are three ways to change this value, the obvious way - changing the global value from php.ini, but also an individual method to change it just for a script, or folder. Read the rest of this entry »
Tags: php, php5
Normally MySQL replication will stop whenever there is an error running a query on the slave. This happens in order for us to be able to identify the problem and fix it, and keep the data consistent with the mater that has sent the query. You can skip such errors, even if this is not recommended, as long as you know really well what are those queries and why they are failing, etc.
For example you can skip just one query that is hanging the slave using:
mysql>SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; START SLAVE;
There might be cases where you will want to skip more queries. For example you might want to skip all duplicate errors you might be getting (output from show slave status;):
"1062 | Error 'Duplicate entry 'xyz' for key 1' on query. Default database: 'db'. Query: 'INSERT INTO ..."
Read the rest of this entry »
Tags: mysql, tips
The Unix find command is a very powerful tool, and this short post is intended to show how easy you can achieve something that might look complicate: to find all the files of a particular size. Let’s assume you are searching for all the files of exactly 6579 bytes size inside the home directory. You will just have to run something like:
find /home/ -type f -size 6579c -exec ls {} \;
As units you can use:
- b - for 512-byte blocks (this is the default if no suffix is used)
- c - for bytes
- w - for two-byte words
- k - for Kilobytes (units of 1024 bytes)
- M - for Megabytes (units of 1048576 bytes)
- G - for Gigabytes (units of 1073741824 bytes)
Read the rest of this entry »
Tags: tips
Here is an interesting article: “The seven largest Open Source deals ever” that summarizes the top open source deals. On top we have of course MySQL, with the $1 billion deal from earlier last month. From the top deals, 2 were finalized this year (and we are just in the first days of February), 2 in 2007, and 1 in 2006 with the other 2 in 2003 and 1999.
Looks like 2008 is a good year for open source ;-).
Apache is one complex piece of software, that contains many features most people are normally not using. You can do so many things with apache outside of the default configurations, and I am not going to discuss today about an external module, but about the plain old mod_log_config.
Normally most people will use for apache logging the combined LogFormat, and will not even think there will be other possible additions to that. This normally looks like:
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
and it contains most of the information we would like to see in the logs. Still there are many other information we can include here… just see below for the full list. Read the rest of this entry »
Tags: apache-tips-and-tricks, apache2
WordPress 2.3.3 was released today, and it is an urgent security release. If you have registration enabled a flaw was found in the XML-RPC implementation such that a specially crafted request would allow a user to edit posts of other users on that blog.
Anyone running the 2.3 branch is recommended to upgrade immediately to 2.3.3. Official wp announcement:
http://wordpress.org/development/2008/02/wordpress-233/
Read the rest of this entry »
Tags: WordPress
Elance is an online workplace where businesses find and hire people “on demand” to get work done quickly and cost effectively.
I have been using elance during the past 3 years, effectively helping me to build my freelancing career. Even now, since I am no longer actively looking for new projects, I am still rated as one of the overall top 10 individual providers (from a total of 34,121) - username net-force. I still have a few projects I am working on, and normally I am looking at elance’s new projects to see if there is something interesting and challenging to bid on
. Read the rest of this entry »
Tags: elance
MySQL offers for download several precompiled types of packages for installation (rpm’s for various distros, tar.gz, etc.). This post will show how you can install the latest version of mysql5.0 available at this time 5.0.51a from the binary tar.gz distribution.
Fist you need to download somewhere on your system the tar.gz package from mysql (I will assume you have done this inside /usr/local/src/), mysql-5.0.51a-linux-i686-glibc23.tar.gz from the closest mysql mirror to your location. If you are running a different architecture, please download the appropriate file.
Read the rest of this entry »
Tags: mysql