Tip: Testing Your PHP/MySQL Connection

How to test if PHP connects to MySQL database?

There are numerous times when I have to setup Apache and PHP on a freshly installed Linux server. Considering that not only that Apache service should work, I also have to make sure that PHP and MySQL are working properly together.

Forgetful that I am, I always tend to forget what components should I have to make PHP and MySQL talk to each other. You need something like a ’special glue’ to connect the two together and I will discuss here how to make PHP and MySQL work together for both RPM and source installation.
Read the rest of this entry »

Popularity: 14% [?]

Tip: Remove Long List of Files

How to delete long list of files in Linux?

Let’s say you have a long list of files that you want to delete and simply running rm -fv * just won’t work and Linux will let you know by giving you this error:

Argument list too long.

When you get this error, it means that the number of files is too many for the kernel to process.

There is a simple workaround for this.
Read the rest of this entry »

Popularity: 17% [?]