The Linux Page

Help other users realize that everything is possible, especially avoiding Windows for their own personal use.

Welcome to The Linux Page


Fox Trot by Bill Amend. Click to enlarge.
Click to enlarge

This site is a collection of my own work with Linux. Certain things are easy, others take time to decipher and if I ever need to repeat the work (which usually happens!), then I need to remember everything by memory or... have a site with all the steps taken and to take again.

The following are my most recent posts:

Description

I wrote a small shell script (bash) to make a backup of one of my hard drive to another. Really, a very very simple script. It has one rsync command per partition. So I have one variable to define all the options and one rsync call per partition:

I have been wondering, for a while, why is it that I get errors about DEFLATE no being known.

  [Sun Apr 11 22:41:23 2010] [error] an unknown filter was not added: DEFLATE
  [Sun Apr 11 22:48:54 2010] [error] an unknown filter was not added: DEFLATE
  [Sun Apr 11 22:50:23 2010] [error] an unknown filter was not added: DEFLATE

I should have thought of it, the deflate module was not installed. That was it, but oh well... 8-)

To tweak your Apache setup, use the following two lines:

  sudo a2enmod deflate
  sudo /etc/init.d/apache2 force-reload

And you'll get rid of those ...

Today I learned that not defining a variable in PHP would generate a notice error.

I had been wondering, why it is that so many people in Drupal define their variable or check them with isset()? That's why. In a way it is terrible that you can use a variable that does not exist and just get NULL, on the other hand, quite often that's because you intended to use another variable... (i.e. $create instead of $created, you declare $bool in one function and use it again in another, etc.)

This applies to objects, array indexes, and just plain variables. If you write:

Perl protected mode

Today, I was trying to run psql from a program when I got this error:

Insecure $ENV{PATH} while running setuid at ...

At first, I thought that psql would be testing something about the user, but in fact, psql is a perl script that runs in secure mode. In other words, this applies to any tool written in perl when they use the -T command line option and potentially tainted variables are considered insecure.

The perl interpreter makes sure that the current user identifier is the same as the effective user identifier. When there is a mismatch, the interpreter breaks with that error.

In ...

A long time ago, I got http://www.m2osw.com ... and I created a website (you know a 1.0 kind of a website.) It look like an abomination, and I would have prefered to lose it...

Well... there are time machines that are not perfect but will show you some of the pages of my company's website from way back (it started in 2001).

http://web.archive.org/web/*/m2osw.com

And, please, don't laff! Okay... whatever... Hey! Stop it! Or write a comment below, I'd like your input...

Pretty much every day I learn something... Today it will be the fact that you can enter variables in front of a key that will request the SSH deamon to verify a certain number of facts in regard to the connection being made.

For instance, it can automatically test that the IP address of the person connecting is a specific IP (if you have a static IP address, very practical!)

Internationalization

Trying to create a PostgreSQL Database with UNICODE does not always work. I ran in a problem with a RedHat installation...

There can be two problems:

  1. The default database setup is ASCII (more or less considered ISO-8859-1)
  2. The database cluster was compiled without UNICODE support

Now a day, the second case is quite unlikely and it means that you won't  be able to use a UNICODE encoding unless you recompile the database system. Make sure you use the ./configure --multi-byte encoding for that purpose.

In the first case, however, it could be that your cluster ...

Somehow, whenever I tried PHP CLI, it would crash because of PostgreSQL. (i.e. if I use the database in PHP through Apache, no problem, but the same script run via the command line, and it crashes on exit, no matter what I do with the resource handle.)

I was puzzled and did not really know what to do, but some people have found the solution. Now, what is really surprising is the fact that it has been around for ages and not yet fixed in the system.

The fact is, it does not matter too much as long as there is a work around, but you need to apply it yourself...

I created a website and handed it to a customer... without realizing that the customer could not edit the pages of his site.

He reported the problem and I was rather surprised since I had not installed any module that would protect the editing of pages based on a role... what could it be? I checked the Drupal permissions a couple times... he had the right to edit all the nodes, his own and anyone else's, hmmm...

I looked at the code to try to figure it out, and there is a call to the filter module: filter_access($node->format).

Yes! Of course! I had forgotten to add his role to the ...

Unfreeze your Mouse when it Froze

Thank you for visiting my website.