server

Backup all MySQL databases automagicly with the PHP admin script

Server administration software like Cpanel, Plesl, Webmin etc have already their backup solutions. But they are runned mostly once a week or max a day because of performance reasons. Let say we just want to backup all of our mysql-databases every 2 hours.

To do this:

  • Create a directory like /backup/mysql
  • Save code below under something like backup_mysql.php
  • Chmod it to 755
  • Run it manually or with cronjobs /root/scripts/backup_mysql.php
#!/usr/bin/php
<?php
// use this if your php.ini does not allow shell etc #!/usr/bin/php -n

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

[warn] [client 1.2.3.4] mod_fcgid: HTTP request length 137744 (so far) exceeds MaxRequestLen (131072), referer

As I want to add a forum entry I got Apache's 500 server internel error. i tried to change .htaccess, php-conf etec but no success.

Error was: [warn] [client 1.2.3.4] mod_fcgid: HTTP request length 137744 (so far) exceeds MaxRequestLen (131072), referer: http://example.com/node/add/forum/1

After a research check error-logs of virtual host I found that /etc/apache2/mods-available/fcgid.conf must be changed.

I added following directive:

MaxRequestLen 157286400

Failed to modify server : AWstats reporting is already enabled for this domain

I have a problem: I have a website which is older than 10 years. I was using a cpanel-whm server till 4 years ago. Than I changed to a Debian Lamp server with webmin. And upgraded the server last month. I had migrated cpanel-backups to webmin and after upgrade migrated webmin-backups to new webmin on new server. Awstats is not checked and not to see under logs tab. But when I try to check and activate Awstats under "edit virtual server" tab, I get this error: Failed to modify server : AWstats reporting is already enabled for this domain.

How can I pass this error? Thanks

E: Sub-process /usr/bin/dpkg returned an error code (1)

I have a debian 64 bit lenny4 server and wanted to updatebind 9. Update is failed while I was trying with this commands:

 apt-get -y install bind9
 apt-get -y -f install bind9

I get this error at the end of shell window:
E: Sub-process /usr/bin/dpkg returned an error code (1)

This is the full output:

apt-get -y -f install bind9
Reading package lists... Done
Building dependency tree
Reading state information... Done
bind9 is already the newest version.
bind9 set to manually installed.

apache2ctl fullstatus /usr/sbin/apache2ctl: line 119: www-browser: command not found

When I execute following command to see apache's full-status I get just an error message:

apache2ctl fullstatus 
/usr/sbin/apache2ctl: line 119: www-browser: command not found

Any idea how to monitore Apache on debian Lenny?

Thanks a lot!

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?

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.