Tips Blog

Welcome to our technical tips blog – solutions and answers for numerous Joomla, Wordpress, Magento, Linux, MySQL and other problems.
 

Mysql Database and table sizes in Mb

Actual database size: SELECT table_schema “Data Base Name”, SUM( data_length + index_length) / 1024 / 1024 “Data Base Size in MB” FROM information_schema.TABLES GROUP BY table_schema ; +——————–+———————-+| information_schema |           0.00390625 | | startnetdb         |          38.96961117 | +——————–+———————-+ Table sizes:

read more

Migrate a Magento installation to another server

Copy all the files. Copy the database. Restore .htaccess file. Edit app/etc/local.xml Change the database details UPDATE the core_config_data table – Fix the base directory select * from core_config_data where path like “%base%”; update core_config_data set value=”http://www.domain.com/” where config_id=X or

read more

Truncate and clear logs in Magento

Run the following in MYSQL to reduce your Magento database, by possibly hundreds of megabytes. It clears the logs. truncate log_customer; truncate log_quote; truncate log_summary; truncate log_summary_type; truncate log_url; truncate log_url_info; truncate log_visitor; truncate log_visitor_info; truncate report_event; truncate report_viewed_product_index; truncate

read more

Fixing openbasedir PHP error in Plesk 10

Kept getting log errors : error_log:[Tue Mar 20 13:42:39 2012] [warn] [client 217.40.150.250] mod_fcgid: stderr: PHP Warning:  file_exists() [<a href=’function.file-exists’>function.file-exists</a>]: open_basedir restriction in effect. File(XXX) is not within the allowed path(s): (VHOST DIRECTORY:/tmp/) in FILEXXX on line 334…. To fix

read more

Restore a magento database

To restore a .sql file backup without constraint checking, simply add the following statements at the beginning of your .sql file: SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT; SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS; SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION; SET NAMES utf8; SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE=’NO_AUTO_VALUE_ON_ZERO’; SET

read more

Joomla password reset MD5’s

password = “MD5 hash of password” —————————————————— admin = 21232f297a57a5a743894a0e4a801fc3 secret = 5ebe2294ecd0e0f08eab7690d2a6ee69 OU812 = 7441de5382cf4fecbaa9a8c538e76783Use in the jos_users table.