Plesk remove chroot for domain

December 9th, 2011 Comments off

I haven’t found the way how to disable creating chroot-folders on webspace with new domain creation.

So, on Parallels forum support offered me to create Event manager handler.

Open Plesk -> Tools & Settings -> Event Manager -> Add New Event Handler

Fill the form:

Event:

Default domain (the first domain added to a subscription/webspace) created
Priority:

highest (100)
User:

root
Command:

/usr/local/psa/admin/sbin/chrootmng –remove –source=/var/www/vhosts/chroot –target=/var/www/vhosts/${NEW_DOMAIN_NAME}

This handler will remove chroot from newly created domain immediately.

Categories: Plesk Tags: , ,

Plesk disable quotas check during upgrade

November 24th, 2011 Comments off

You can disable it by setting the following environment variable prior to the installation
or upgrade:

export PLESK_QUOTACHECK_OFF=1

Of course this will work only if you run the process in the same shell, thus, it can’t be
set for GUI upgrader.

KB Parallels: During an installation/upgrade file system quotas check takes way too much time, can I disable it?.

Categories: Plesk Tags: ,

How to automatically post your Facebook status to Twitter

October 20th, 2011 Comments off

Twitterfeed.com rules!

It allows to Twitt any RSS-feed. You need only to register on this site and give it your RSS-feed URL. That’s all!

How to automatically post your Facebook status to Twitter | Brad Grier – Lifestyle and Emerging Technology – Writer – Consultant – Speaker bradgrier.com.

Categories: Uncategorized Tags:

d(this).data(“draggable”) is undefined. Bug on destroying jQuery UI’s draggable/selectable.

September 30th, 2011 Comments off

Only one right silution: to add timeout for 1ms before destroying the jQuery UI’s draggable/selectable

Source: Bug on destroying jQuery UI’s selectable. | Lost in IT world.

 

Categories: JavaScript Tags: ,

How to use CSS3 and jQuery to create images that can be smoothly rotated using the mouse.

September 29th, 2011 Comments off
Categories: JavaScript Tags:

PHP based torrent file creator, tracker and seed server – PHPTracker

September 16th, 2011 Comments off

Great software!

Why PHPTracker? Because it’s not “just a tracker”, it contains a seeder server too so the distribution of your files is automatic. This is a big step for the content providers to adapt this amazing technology and change the stereotype that “torrent = warez”.

PHP based torrent file creator, tracker and seed server – PHPTracker.

Categories: Linux, MySQL, PHP Tags: , , ,

Plesk: Real memory usage reported by ‘Server Health’ does not match actual RAM

August 29th, 2011 Comments off

Symptoms
Real memory usage reported by Plesk Health Monitoring Service (Home > Server Health > Memory) does not match RAM reported by utility ‘free‘.

Cause
RAM was updated after Parallels Plesk Panel was installed.
Plesk Health Monitor does not detect if the system configuration was changed after the initial installation.

Resolution
The problem will be fixed in future update of Parallels Plesk Panel that will be released after version 10.2.

To workaround:

# /usr/local/psa/bin/sw-engine-pleskrun /usr/local/psa/admin/plib/scripts/setup-health-monitor.php
Categories: Linux, Plesk Tags: , ,

ffmpeg-php – error: ‘PIX_FMT_RGBA32’ undeclared (first use in this function)

August 24th, 2011 Comments off

ffmpeg-php – error: ‘PIX_FMT_RGBA32’ undeclared (first use in this function) | HOW GEEK!.

/root/install/ffmpeg-php-0.6.0/ffmpeg_frame.c: In function 'zim_ffmpeg_frame_toGDImage':
/root/install/ffmpeg-php-0.6.0/ffmpeg_frame.c:336: error: 'PIX_FMT_RGBA32' undeclared (first use in this function)
/root/install/ffmpeg-php-0.6.0/ffmpeg_frame.c:336: error: (Each undeclared identifier is reported only once
/root/install/ffmpeg-php-0.6.0/ffmpeg_frame.c:336: error: for each function it appears in.)
/root/install/ffmpeg-php-0.6.0/ffmpeg_frame.c: In function 'zim_ffmpeg_frame_ffmpeg_frame':
/root/install/ffmpeg-php-0.6.0/ffmpeg_frame.c:421: error: 'PIX_FMT_RGBA32' undeclared (first use in this function)
make: *** [ffmpeg_frame.lo] Error 1

To fix this, replace PIX_FMT_RGBA32 with PIX_FMT_RGB32 .

You can use “rpl” to replace files recursively:

cd to the ffmpeg-php folder and run this command (beware!):

rpl -R PIX_FMT_RGBA32 PIX_FMT_RGB32 *

If rpl not installed on your system, install it, for example:

yum install rpl
Categories: Linux, PHP Tags: , ,

Autocomplete callbacks in Drupal 7 OR fun with db_query_range() and LIKE | Broken in the Next Release

August 18th, 2011 Comments off
Categories: PHP Tags:

jQuery filter user input

June 20th, 2011 Comments off

I’ve coded small function that allows filter user input to <input> fields.
It allows to press 0-9 keys (incl. NumPad keys), “,” and “.”, Backspace.
It’s enought to write float value.

$(':input.onlynum').keypress(function(event) {
    if (
        // numbers
        (event.which < 48 || event.which > 57) && 

        // .,
        event.which != 44 && event.which != 46 && 

        // backspace
        event.which != 8                      
    ) {
        event.preventDefault();
        return;
    }
})

HTML:

Try to input non-numeric symbols:
<input class="onlynum">
Categories: JavaScript Tags: ,