server

Server Benchmark with PHP 5 : ThePlanet, Hosteurope, Hetzner

This is a small benchmark test / performance comparison with PHP 5 between ThePlanet, Hosteurope and Hetzner Servers. Servers are not same, and there are RAM difference but in this test RAM plays no big role, but CPU plays. The server from Hosteurope is a virtual server with min. 2GB ram guarantie. The other two are dedicated root servers. ThePlanet's OS is Redhat enterprise, The other two are using Debian.

Hetzner : Intel® Core™ i7-920 Quad-Core with 8GB Ram
Hosteurope: 8 Cores Intel® Xeon® with min 2GB or more
ThePlanet: 2x DualCore Intel(R) Xeon(TM) CPU 3.40GHz with 2GB

Configure phpMyAdmin to login automagicly without prompted for username and password

Do you need to configure phpMyAdmin to login automagicly without prompted for username and password? I needed two hours to get it works, do not spend so much time and just follow steps below:

1. Download PhpMyAdmin

2. unzip phpmyadmin

3. create a file named "config.inc.php" with following content and replace login information with yours

<?php
/*
 * Generated configuration file
 * Generated by: phpMyAdmin 3.3.2 setup script by Piotr Przybylski 
 * Date: Thu, 29 Apr 2010 11:20:23 +0200
 */

/* Servers configuration */
$i = 0;

What is 131 kKib in phpMyAdmin?

I am similar to byte, mb, mbit, kb, kbit, gb, tb etc but I saw a new thing today: kKib! What is this and how2 convert MB ? Pma's max filesize limit 131 kkib...

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.