You must secure your tmp files after installing virtualmin

Centos tmp folder is dangerous specially if you using webmin with it. To secure I followed this example. Please make copy of files before you edit it.

nano -w /etc/fstab

Now we need to create a new line, so navigate to the bottom of the file using your arrow key’s and append the following line, I recommend copying & pasting to ensure you don’t get it wrong.

none /tmp tmpfs nodev,nosuid,noexec,size=2GB 0 0

Views strips all styles on views

Dangerous work around is this:

views/handlers/views_handler_field.inc

function render_altered($alter, $tokens) {
// Filter this right away as our substitutions are already sanitized.
$value = filter_xss_admin($alter['text']);
$value = strtr($value, $tokens);

return $value;
}
to

function render_altered($alter, $tokens) {
$value = strtr($alter['text'], $tokens);

return $value;
}

How to migrate your drupal site with drush

How to migrate your drupal site with drush?

I have recently tried to move a large database to another host and I have encountered problems regarding this.

I have decided to document this so that other Drupal users may benefit from it.

There are many ways to restoring a database to different host but this has worked for me.

First, you need to have a working drush system in your both drupal installations.

Start with clearing all of your database cache

$cd /home/home/public_html or wherever is your root Drupal installation
$drush cc all

How to run cron with drush within Virtualmin Control Panel

Navigate to => system => Scheduled Cron jobs tab and paste the below command in the command input box. Run it as root and schedule the minutes as required.
Move it up the list to give it more priority. Please note replace with the xxx to your environment.

/usr/bin/env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin COLUMNS=72 /usr/local/bin/drush --root=/home/xxx/public_html --uri=http://yoursite.com/cron.php?cron_key=xxxxxxxxxx --quiet cron

How to run deep freeze command on macs

It has been hit and miss for me every time I try to run deep freeze command on a number a lab machines that I managed. Therefore, this is what worked for me.

First all, you need to have a Remote desktop properly setup on your admin machines and on the other machines that you're tying to manage.
First step to wake up all the machines even if you can see them.
Second run this command:

Just copy and paste this command

How to install drush with composer on linux box

I had trouble installing Drush on my newly created Centos box. Therefore, I have documented my steps.

First, you need install Composer ( PHP Dependency Manager) cd into the
$ cd /tmp

Download Composer.phar here

$ curl -sS https://getcomposer.org/installer | php

Then move it to /usr/local/bin so that it can be used globaly.
$ mv composer.phar /usr/local/bin/composer

Now type $composer

If you done everything right you should get something that look like this:

How install Aegir octopus High performance Hostmaster for Drupal

I have tried install BOA-3.0.2 to host my many Drupal sites and I have struggled a lot install it. I am hopping this write up may help someone to have better experience.

This is the description from the smart people who developed this software/script.

BOA is an acronym of high performance Barracuda, Octopus and Aegir LEMP stack.

Includes all-in-one bash scripts (see docs/INSTALL.txt for details) to install
and upgrade high performance Aegir Hosting Systems for Drupal, with Nginx, PHP-FPM, Zend OPcache, MariaDB and Redis.

What is Octopus?

Change Proxmox port number from 8006 to 443

First off this is not secure and it is not recommended on a production environment. There are two ways of doing this. First is by editing /usr/bin/pveproxy.
Somewhere in
my $socket = $self->create_reusable_socket(8006);
Change the port value, 8006 to your desired number, save the modification, and restart pveproxy:

sudo service pveproxy restart

This is may not available on the newer proxmox servers. Therefore, and easy way to do it by using iptables command like this:

Directory /proc/vz not found, assuming non-OpenVZ kernel Container init failed: Cgroup is not mounted TASK ERROR: command 'vzctl destroy 100' failed: exit code 5

Directory /proc/vz not found, assuming non-OpenVZ kernel
Container init failed: Cgroup is not mounted
TASK ERROR: command 'vzctl destroy 100' failed: exit code 5

TO delete just navigate to /etc/pve/nodes/xxxx/openvz/ and delete the file which has the vm number. Mine was 100.conf
$ rm 100.conf
This will completely delete the node.

PDOException: SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction: DELETE FROM {cache_bootstrap} WHERE (cid = :db_condition_placeholder_0) ; Array ( [:db_condition_placeholder_0] => variables

If you see the below error. It is your database telling you restart me
$ service mysqld stop
$ service mysqld start
PDOException: SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction: DELETE FROM {cache_bootstrap}
WHERE (cid = :db_condition_placeholder_0) ; Array
(
[:db_condition_placeholder_0] => variables

Apache Yahoo News Feed

Drupal Yahoo News

Linux Yahoo News Feed

Mysql Yahoo News Feed