Systems

Adding pcntl_fork support on a cpanel server

February 1, 2012
By

A php application on a cpanel server kept throwing this: Fatal error: Call to undefined function pcntl_fork() in /path/blah.php on line 5 The fix requires recompiling php with –enable-pcntl Fortunately cpanel offers the Easy Apache script. The bad part is that it doesn’t have an option for pcntl. So you have to specify it...

Read more »

Got a packet bigger than ‘max_allowed_packet’ bytes

February 1, 2012
By

I got this on a newly installed server when I tried to import a database: View Code BASH1 2 3 [root@host ~]# mysql -u user -pPassword database < database.sql Enter password: ERROR 1153 (08S01) at line 53: Got a packet bigger than 'max_allowed_packet' bytes It’s easily fixable. The default is probably 16M, I added...

Read more »

Setting up master-slave replication for mysql

January 30, 2012
By

  So, I had to set-up master-slave replication. Here’s how you do it: Why would one want to set-up this? Easy. 1)Spread the read load across multiple servers:  you can use the MySQL master for writing (inserts, updates) and the slave(s) for reading (SELECT) This should speed up things nicely for your application. 2)Do...

Read more »

Make sensors report temperature on slacware64-current with an Intel I7 2600k

January 27, 2012
By

For some reasons the required modules don’t get loaded. Add the following to /etc/rc.d/rc.modules right above the line reading ### Mouse support: View Code BASH1 2 3 ### by SV for i2600k temperature /sbin/modprobe coretemp /sbin/modprobe pkgtemp Now sensors report the temperatures.

Read more »

Recursively remove digikam’s xmp embeded tags

January 25, 2012
By

Because digikam made a mess of the tags I started to add to my pictures I decided to start from scratch. Note that I tried to get the max and I had set to write tags both to .xmp sidecar files and inside the image files. I also use the mysql backend. One of...

Read more »

Unpacking a .deb file (including scripts)

January 23, 2012
By

While attempting to install a deb package on a slackware system I wanted to check the install script that the package runs. I tried the deb2tgz utility but unfortunately that only left me the files in the package in a ready to install .tgz file. Here’s how to unpack a .deb to obtain both...

Read more »

Log dropped packets using CentOS Firewall

January 23, 2012
By

Please take care modifying your firewall. If you don’t understand what’s being done here you may lock yourself out of your machine. You’ve been warned ! In order to log dropped packets on the INPUT chain I replaced this: View Code BASH1 -A INPUT -i eth0 -j REJECT --reject-with icmp-host-prohibited with this View Code...

Read more »

Enabling the MySQL slow query log

January 12, 2012
By
Logo-mysql

If you have a slow web app or website it might be because of unoptimized sql queries. You want to track and fix those and the mysql slow query log is very helpful here. Enabling the slow query log MySQL prior to 5.1.0 requires adding a setting to the MySQL my.cnf file and restart...

Read more »

Cadsoft Eagle on Slackware Current 64bit

January 11, 2012
By

I want to start building some new electronics projects and I wanted to use some tool to build my schematics. Even if not open source Cadsoft’s Eagle seems to be the de-facto standard between hobbyists. Unfortunately trying to run the setup on Slackware gives the errors regarding to /…/bin/eagle: error while loading shared libraries:...

Read more »

Search and replace text in many files

January 6, 2012
By

This is a handy one liner that searches and replaces text in multiple files. (You can use find for example to run it in multiple folders) View Code BASH1 perl -pi -e 's/old_text/new_text/g' *.conf This line replaces old_text with new_text in all the .conf files in the current folder. Of course you can use...

Read more »

Follow Me

Subscribe via RSS