perl errors, apt-get, proxmox

If you get errors like:

BEGIN failed–compilation aborted at /usr/share/perl5/PVE/Tools.pm line 6.

And then with apt-get you are also getting perl errors, check the perl paths. Grab the list of not found dirs:

ls -la /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.20.2 /usr/local/share/perl/5.20.2 /usr/lib/x86_64-linux-gnu/perl5/5.20 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.20 /usr/share/perl/5.20 /usr/local/lib/site_perl | grep ‘no file’

-> fix that list, make them point to where you think they should, like:

/usr/local/lib/site_perl -> /usr/lib/perl5/

In my case 3 directory did not exist, and one was empty.

I just made symbolic links for them, and perl started working again.

And if you were doing the same thing as me, then continue installing proxmox with these great advices:
https://pve.proxmox.com/wiki/Upgrade_from_3.x_to_4.0

Posted in Uncategorized | Leave a comment

tar gz – exclude directory

You want to backup some files recursively except one directory within:

tar cvfz live_20151207.tgz --exclude='public_html/sites/all/files' public_html

it is important that the exclude is like that: –exclude=’public_html/sites/all/files’
This would FAIL:
–exclude=’./public_html/sites/all/files’

Not sure but to remember I think of it as a “text pattern”, instead of an actual path.

Posted in Uncategorized | Leave a comment

DTC GPLHost Wheezy – SSH login issue

There is a problem with SSH/SFTP login for users in Wheezy update of DTC installation.

This is because the 64 libraries have changed location:
/lib64 -> /lib/x86_64-linux-gnu

Replace all references to the wrong dir from:
/usr/share/dtc/admin/install/functions

You should update the line setting this var: CPY_LIBS (line 4977 currently for me)

CPY_LIBS="ld-linux.so.2 libbsd.so.0 libutil.so.1 libresolv.so.2 libpthread.so.0 ld-linux.so.2 libdl.so.2 libc.so.6 libedit.so.2 libm.so.6 libbsd.so.1 libcrypt.so.1 libnss_compat.so.2 libnsl.so.1 libnss_files.so.2 libpam.so.0 libpam_misc.so.0 libncurses.so.5 libacl.so.1 libattr.so.1 libcap.so.1 libbz2.so.1.0 libz.so.1 libtinfo.so.5 libselinux.so.1 librt.so.1"

Then run install script

/usr/share/dtc/admin/install/install

Sources:
http://www.gplhost.sg/lists/dtcdev/msg03980.html
http://forums.gplhost.com/fudforum/t/322219/-ssh-login-failure-
http://forums.gplhost.com/fudforum/t/320531/-errors-in-new-wheezy-install-

Posted in Uncategorized | Leave a comment

npm node nodejs: Cannot GET /

If you are root user, make sure you do:

npm install --unsafe-perm
Posted in Uncategorized | Leave a comment

javascript click touchstart iphone 5 6, tap tap tap

Lets say you got a site with big slider containing dynamically generated buttons. These buttons work just fine everywhere except on our new friends iphone 5 and 6… even on the iphone 4 it works fine.

You are most probably using something like this to bind the click event:

$link.bind("click touchstart",{

Try this:

$link.bind("click touchstart tap",{
Posted in Uncategorized | Leave a comment

Find recursively the files modified after specific date

find . -newermt “yyyy-mm-dd”

Posted in Uncategorized | Leave a comment

find and delete – Linux

Classic.
Lets say you like to delete all the “.DS_Store” files recursively….:
find . -name ‘.DS_Store’ -exec rm -rf {} \;

Posted in Uncategorized | Leave a comment

Drupal 7 sessions

https://api.drupal.org/api/drupal/includes!session.inc/7

yeah, do not forget to define the base url, something like:
$base_url = ‘http://’.$_SERVER[‘HTTP_HOST’];

I’d start php script like:

<?php

define('DRUPAL_ROOT', '../');
 $base_url = 'http://'.$_SERVER['HTTP_HOST'];

require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
 drupal_bootstrap(DRUPAL_BOOTSTRAP_SESSION);
 drupal_add_http_header('Content-Type', 'text/html; charset=UTF-8');

drupal_session_initialize();
 drupal_session_regenerate();
 //print_r($_SESSION);
Posted in Uncategorized | Leave a comment

Disable Bluetooth at start – Linux Debian Mint

Should work with most decent Linux distro (I love that expression, I know exactly what I mean here).

Why, oh why, enabling a networking connection channel by default… Definitely some decisions are not in the hands of the right people… Like if the mass would know what’s best, crazy.

Just put the following line at the end of your /etc/rc.local before the “exit 0”:

echo disable > /proc/acpi/ibm/bluetooth

if you have such file /proc/acpi/ibm/bluetooth

otherwise put this line:

rfkill block bluetooth

voilĂ , another part of sanity rightfully claimed back.

Posted in Uncategorized | Leave a comment

Roundcube – No default folders: Sent Drafts Junk Trash

Edit the file

/etc/roundcube/main.inc.php

change FALSE -> TRUE

$rcmail_config[‘create_default_folders’] = TRUE;

Posted in Uncategorized | Leave a comment