Sinan Polat


PHP: Fatal error: Allowed memory size of xx bytes exhausted (tried to allocate xx bytes)

When you see the following error message it means that the PHP script is exceeding the memory limit which is set for PHP. Fatal error: Allowed memory size of xx bytes exhausted (tried to allocate xx bytes) in /path/to/script.php To change the memory limit for one specific script, add the following line at the top […]

Monitoring server load on Linux

I wrote a simple bash script to monitor the server load, once the server load reaches the threshold it will send out an e-mail. Once you have received an e-mail from this monitoring script, you have to reset the $fileCHECK file to ‘0’: # echo ‘0’ >¬† $fileCHECK # In this example script it should […]

WARNING: mismatch_cnt is not 0 on /dev/md1

Since a couple of days I have seen the following message on (CentOS) servers: WARNING: mismatch_cnt is not 0 on /dev/md1 I have Googled some around, posted on forums, but couldn’t find the cause of this. Anyways, I managed to fix it with a workaround: #¬†echo repair >/sys/block/md1/md/sync_action # wait a bit …. # echo […]

Difficulties with setting up your network in Ubuntu

Today I had some problems with setting up the network in Ubuntu. Restarting the network resulted in the following error message: # /etc/init.d/networking restart * Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces * Reconfiguring network interfaces… /etc/network/if-up.d/upstart: 43: cannot create /run/network/ifup.eth0: Directory nonexistent run-parts: /etc/network/if-up.d/upstart exited with return code […]

MegaCli for Debian / Ubuntu

Unfortunately LSI and Dell doesn’t provide the MegaCli tool as source or .deb package, therefor it is not possible (by default) to install MegaCli on Debian servers. I managed to get MegaCli working on a Debian server. Download MegaCli from LSI: # cd ~ # wget “” Unpack the downloaded file: # unzip if […]

hdparm: HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device

I just wanted to benchmark the read speed of the hard drives in my server using hdparm, but got the following warning message: HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device I have fixed this by updating hdparm to its newest version: Download, untar and install hdparm: # wget “” -O hdparm.tgz # […]

cPanel: Service status showing down while it is up and running

I just worked on a CentOS server with cPanel/WHM. The problem was that Service Status was showing the status for some services (httpd, ftpd, exim, imap) as down while they were up and running. It took me some hours to find the cause of this, but at the end I found the cause. The problem […]

Howto: RAID status on HP servers

Here is how you can view the status of your RAID configuration and the status of your physical drives. First we have to download and install the hpacucli tool. CentOS: # wget # rpm -ivh hpacucli-8.60-8.0.noarch.rpm Debian: # wget # dpkg -i hpacucli_8.60-8.0_i386.deb Once the tool is installed, start it: # hpacucli HP […]

Plesk: After upgrade to Plesk 10, www prefix is not working anymore

Since Plesk 10.x the domain-handling is changed, if your Apache configuration is not configured correctly the default plesk page will be shown when you browse to your domain with the www prefix. The resolution for this problem is that you have to add a CNAME record and reconfigure the Apache configuration for your domain(s). I […]

Plesk: How to switch from Qmail to Postfix and vice versa

There are two MTA that are supported by Plesk since version 9: – Qmail – Postfix You can change the MTA using the autoinstaller script of Plesk: # /usr/local/psa/bin/autoinstaller On the 4th page select the currently installed Plesk version. Disable all other applications. On the Main components list page select the MTA you want to […]