Archive for the ‘PHP’

Dumping The MySQL database using PHP

If your web hosting provider does not keep the daily backups of your MySQL databases, then you need to think of taking the daily backups to avoid the risk of data loss. Backing up the database is very simple process if your do that using PhpMyAdmin or MYSQL administrator. However, this manual process sometimes may make you feel bored doing the same task daily. Hence, it is better to create the web page that takes the backups automatically. You just need to visit the backup generation page once a day. And it will dump the mysql backup for you. Here is the sample script that dumps the MYSQL database.

<?php
//~ Must edited values

//~ MySQL
$SQL_USER=’username’;
$SQL_PASS=’password’;
$SQL_DB=’database’;

//~ * Back up mail
$MAIL=’your@email.com’;
$SUBJECT=’backup’;
$MESSAGE=’backup’;

//~ * MySQL dump, then zip.
shell_exec(“mysqldump -u $SQL_USER -p$SQL_PASS $SQL_DB $SQL_DB.sql”);
shell_exec(“zip $SQL_DB $SQLDB.sql”);

//~ * Send mail with attachment.
$OB=’—-=_OuterBoundary_000?;
$IB=’—-=_InnerBoundery_001?;
$headers=”From: $MAIL\r\n”
.”MIME-Version: 1.0\r\n”
.”Content-Type: multipart/mixed;\n\tboundary=\”$OB\”\n”;
$Msg=”This is a multi-part message in MIME format.\n”
.”\n–$OB\n”
.”Content-Type: multipart/alternative;\n\tboundary=\”$IB\”\n\n”
.”\n–$IB\n”
.”Content-Type: text/plain;\n\tcharset=\”iso-8859-1\”\n”
.”Content-Transfer-Encoding: quoted-printable\n\n”
.$MESSAGE
.”\n–$IB–\n”
. “\n–$OB\n”
.”Content-Type: application/octet-stream;\n\tname=www.zip\n”
.”Content-Transfer-Encoding: base64\n”
.”Content-Disposition: attachment;\n\tfilename=www.zip\n\n”
.chunk_split(base64_encode(file_get_contents($SQL_DB.’.zip’)))
.”\n\n”
.”\n–$OB–\n”;
mail($MAIL, $SUBJECT, $Msg, $headers);
//~ * Completed message
echo ‘done’;
?>

Oracle Enterprise Linux and Zend Server For High Reliability and Performance

Oracle and Zend have a long-standing commitment to the PHP community, with a history of collaboration that has ensured integration between Oracle and Zend’s PHP solutions. Oracle Database, Application Server and JDeveloper tool, with a PHP extension, all support PHP development. A sizeable percent of Zend customers use Oracle Database infrastructure to develop and deploy enterprise PHP applications.

Oracle and Zend deliver a reliable, high performance Linux and PHP environment for running business-critical Web applications.

  • Oracle customers can easily install and update Zend Server from Oracle Unbreakable Linux Network (ULN) through standard, native RPM package delivery (http://linux.oracle.com)
  • Zend Server includes out-of-the-box connectivity to Oracle Database, minimizing the time required for set up
  • Full support for applications and production environments running on Oracle Enterprise Linux and Zend Server is available via Oracle (for Oracle Enterprise Linux) and Zend (for Zend Server)

Sources:
http://www.zend.com/products/server/
https://linux.oracle.com/pls/apex/f?p=101:3

Web Service Automates WordPress Password Cracking – Blog Hacking As A Service !!

Hackers have developed a distributed Wordpress admin account cracking scheme that poses a severe risk for the security of blogs whose owners select insecure passwords.

PHP scripts located on a virtual server run bruteforce (password guessing) attacks on targeted sites. Many sites can be attacked at the same time by the system, with results written into an associated database.

The SANS Institute’s Internet Storm Centre notes that brute force attacks against Wordpress are commonplace. The distributed nature of the latest attack marks an evolution towards blog hacking as a web service, however, thus marking it out from the crowd.

“While this particular version is relatively simple, the power behind the script and the MySQL database allows the attacker to distribute the attacks not only by sites, but also by passwords tried as well,” ISC security watcher Bojan Zdrnja writes.

Blog administrators are advised to use strong (hard to guess) passwords and to limiting access by IP address as a security precaution to prevent getting pwned.