How to make hard reset on Prestigio multipad 7.0 HD+ PMP3870C_DUO

Recently, I had to restore my Prestigio tablet to its factory settings. I could not find exact instructions specific for that model that work stright forward, so I had to make guesses based on the information found on the net.

So, to make a hard reset on Prestigio 3870C_DUO, follow the steps below:

1. Power off the tablet by holding the power button for a few seconds.

2. Press the power and volume+ buttons simultaneously and hold them until the boot screen comes up.

3. Then release the power button, but keep holding volume+ for another 2-3 seconds. After releasing the volume+ button, the screen will go black for a few seconds and the android system recovery menu will appear.

4. Use volume+/- buttons to go through the menu options and select “wipe data/factory reset” using the power button.

5. Optionally, after step 4, you may wipe the cache and media partitions in the same way if you do not have important data stored there.

How to install Typo3 in 6 steps

To install Typo3, you can follow the steps below:

1. Download the package (http://typo3.org/download/packages/)
2. Extract the content of the downloaded archive (unzip typo3_src+dummy-4.6.4.zip)
3. Step 2 will create a folder with name typo3_src+dummy-4.6.4. Move content one level up (mv typo3_src+dummy-4.6.4/* .)
4. Add handler for PHP 5.3
5. Enable install tool (touch typo3conf/ENABLE_INSTALL_TOOL)
6. Access the web installer

After the web installer is loaded, the installation is straight forward and can be accomplished in a few clicks.

How to fix the error “JAuthentication: :__construct: Could not load authentication libraries.” in Joomla 1.7

This again as in the previous Joomla branches is caused by the missing Joomla authentication plugin. The difference is that in Joomla 1.7 these plugins reside in the extensions table, rather than in the plugins table as in the previous versions.

To enable it, browse your Joomla 1.7 database via phpmyadmin, click on the extensions table and browse its content. Find the row with “plg_authentication_joomla” in the name column, change the value 0 to 1 in the column named “enabled” and hit the “Go” button to save the changes. After the plugin is enabled, the error message should be gone and you should be able to login with a valid login pair.

A direct SQL query for enabling this plugin is:

UPDATE `database_name`.`jos_extensions` SET `enabled` = ‘1’ WHERE `jos_extensions`.`name` = ‘plg_authentication_joomla’ limit 1;

How to bypass the error “Cannot add or update a child row: a foreign key constraint fails” when importing a MySQL dump file

If you encounter the error “Cannot add or update a child row: a foreign key constraint fails” when you import a MySQL dump file, you can bypass the foreign key checks by setting the following line at the top of your MySQL dump file:

SET foreign_key_checks = 0;

Note that the line should be put before any other SQL query in the dump. Save the file and try to import it once again. This time it should be imported silently.

If you are proficient in the SQL, you might try and suggest other alternative solutions.

A short update:

The above solution might be rough and not well working. If you experience troubles and errors after the import, you can try to replace the above line with:

SET SQL_MODE=”NO_AUTO_VALUE_ON_ZERO”;

The second solution worked better for me particularly.

Joomla 1.5 not working after enabling SSL

I had to enable the SSL functionality for a Joomla website. That is usually accomplished by setting the following variable in configuration.php:

var $force_ssl = ‘1’; if you want the admin area to be accessible through https

and

var $force_ssl = ‘2’; if you want the entire website to loaded via https

However, after that the website became inaccessible. After short investigation, it turned that the following variable must be also set in configuration.php, which is optional when no SSL is used:

$live_site = ‘http://yoursite.com’;

After the above variable was set, the site stared working as expected via https.

How to disable the cache usage in SugarCRM

SugarCRM is configured by default to use external cache and if the external cache storage is not available, it will produce a warning or error.

The specific cache handlers can be disabled with the following lines:

‘external_cache_disabled_apc’ => ‘true’, //if set to true will disable apc external cache.
‘external_cache_disabled_memcache’ => ‘true’, //if set to true will disable memcache external cache
‘external_cache_disabled_zend’ => true, //if set to true will disable zend external cache

To disable the caching completely, use the following line:

‘external_cache_disabled’ => ‘true’,

The lines should be placed in the beginning of the SugarCRM’s configuration file – config.php.

How to count the inodes for each directory

The easiest way is to execute the command:

du -ks ./* | sort -n

or

find -type d -print0 | xargs -0 ls -ld | grep -v 4096

The complicated way is with bash script:

#!/bin/bash
# count inodes for each directory
LIST=`ls`
for i in $LIST; do
echo $i
find $i -printf "%i\n" | sort -u | wc -l
done

Another bash script for the same with more pleasant result display:

#!/bin/bash

# CVETOVE
ESC="\x1b["
RED=$ESC"31;01m"
GREEN=$ESC"32;01m"
YELLOW=$ESC"33;01m"
DBLUE=$ESC"34;01m"
MAGENTA=$ESC"35;01m"
BLUE=$ESC"36;01m"
WHITE=$ESC"37;01m"
GREY=$ESC"30;01m"
RESET=$ESC"39;49;00m"

if [ $# != 1 ]; then
echo -e "\n"
echo -e "Usage: $0 path_to_folder\n"
echo -e "Example: $0 /home/sentry/public_html/\n"
exit 1
fi

if [ ! -d $1 ]; then
echo "The argument must be a folder!"
exit 1
fi

echo -e "\n$WHITE[+$RESET Checking Inodes for folder: $GREY$1$RESET $WHITE+]$RESET \n"

for i in $( /usr/local/cpanel/bin/cpuwatch 10 ionice -c2 -n7 find $1 -maxdepth 1 -not -path "$1" -type d )

do

#echo "$(/usr/local/cpanel/bin/cpuwatch 5 ionice -c2 -n7 find $i | sort -u | wc -l) $i"
echo -e "$(/usr/local/cpanel/bin/cpuwatch 10 ionice -c2 -n7 find $i -printf "%i,\n" | sort -u | wc -l) $GREEN Inodes $RESET - $MAGENTA$i$RESET"

done | sort -n

echo -e "$WHITE==========================================================$RESET\n"

How to define the proper content type for Microsoft document files in .htaccess

If you have Microsoft documents on your website and when try to access them you are prompted to open them as zip files, then you have probably not setup the correct content type for them in your Apache’s configuration. To fix the problem you have to add the following lines to your .htaccess or httpd.conf (if you have access to the global configuration):

AddType application/vnd.ms-word.document.macroEnabled.12 docm
AddType application/vnd.openxmlformats-officedocument.wordprocessingml.document docx
AddType application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx
AddType application/vnd.ms-powerpoint.template.macroEnabled.12 potm
AddType application/vnd.openxmlformats-officedocument.presentationml.template potx
AddType application/vnd.ms-powerpoint.addin.macroEnabled.12 ppam
AddType application/vnd.ms-powerpoint.slideshow.macroEnabled.12 ppsm
AddType application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx
AddType application/vnd.ms-powerpoint.presentation.macroEnabled.12 pptm
AddType application/vnd.openxmlformats-officedocument.presentationml.presentation pptx
AddType application/vnd.ms-excel.addin.macroEnabled.12 xlam
AddType application/vnd.ms-excel.sheet.binary.macroEnabled.12 xlsb
AddType application/vnd.ms-excel.sheet.macroEnabled.12 xlsm
AddType application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx
AddType application/vnd.ms-excel.template.macroEnabled.12 xltm
AddType application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx