server

Could not fetch uid or gid for : root (Cpanel / WHM)

I am using Cpanel / WHM for my dedicated server

I think my server banned me I am not sure if APF or BFD and why.

I tried to connect over my mobile phone. I tried as root with pwd and got following error:

	Internel Server Error
	
	Could not  fetch uid or gid for : root
	
	cpsrvd/11.25 Server at 1.2.3.4

Any idea how to unblock myself? I am using static IP.

Nagios killing server

I have installed Nagios on my webserver but than server load is very high sometimes. A missconfig is the reason or what is wroing?

Server load watch

High loads are horror for server admins. It is sometimes not easy to find which software or script killing the box. Top command shows some information but detailed enaugh. This code below shows more details of top 20 and sorts by cpu usage.

ps aux | head -1 ; ps aux | sort -rn +2 | head -20

How to setup auto_prepend_file with safe mode and open basedir restriction

You want to setup an auto_prepend_file or auto_append_file on a shared webhosting server. It is enaugh to change setting in php.ini file usually. But it does not work under safe_mode with open basedir restriction and suexec. To run it without turning off your security settings:

  • edit php.ini file : pico -w /usr/local/lib/php.ini
  • set safe_mode_include_dir = /path/to/your/safe_mode_inc_dir
  • add "/path/to/your/safe_mode_inc_dir" to include_path
  • set auto_prepend_file = /path/to/your/safe_mode_inc_dir/your_auto_prepend.php
  • restart your webserver : httpd restart

How to override php mail function to catch abuse / spammer

I think somebody sending spam mail from my account with using php-scripts. I can not watch all php files because there are too many. And when I look in exim mail_log, I see just mail header. The log file is too big because all incoming and outgoing mail is logged. I just need a override possibility for php mail function to log all details including mail-body and attachment to determine if it is a smap mail. I just tried to install php pecl apd but no luck.

pecl install apd
Syndicate content

CafeWebmaster.com(CW) is a free online community for webdevelopers and beginners. Anybody can share their code, articles, tips, tutorials, code-examples or other webdesign related material on the site. Newbies can submit their questions and reply to existing questions. CW does not guarantee or warrant reliability of code, data and information published on the site. Use the site on your own risk. The site takes no responsibility of direct or indirect loss or any kind of harm to its users. The site also doesn't take responsibility of infected files or source code with any kind of infection or viruses, worms, spywares, malwares, trojan horses. CW reserves the right to edit, move, or delete any of content for any reason.