Tuesday, May 25th, 2010
When we try to repair a MySQL database we can stop the service. If you are using the MyISAM engine I recommend using myisamchk. A basic repair sentence could be like this:
myisamchk -r -q -p -v –sort_buffer_size=2000M /var/lib/mysql/database/table.MYI
The used parameters are the following:
* -r recovery mode
* -q quick recovery, the most common one. If this mode does not work you will have to make some research on your own.
* -p creates the keys to be repared in parallel threads.
* -v verbose mode
* –sort_buffer_size= use this to indicate the size of the buffer to sort the keys. If you do not specify this value, or the value you specify is too small, then you will see something like this myisamchk: error: myisam_sort_buffer_size is too small. To solve this just increment the size of the buffer to be used, if the error always appear then you have a extremely big table.
Tags: mysql, repair
Posted in Tips & Tricks | No Comments »
Sunday, October 4th, 2009
Login to mysql and :
use psa;
SELECT accounts.id, mail.mail_name, accounts.password, domains.name FROM domains LEFT JOIN mail ON domains.id = mail.dom_id LEFT JOIN accounts ON mail.account_id = accounts.id
It should print all emails that are created and their passwords.
Tags: account, email, password, plesk
Posted in Tips & Tricks | No Comments »
Thursday, October 1st, 2009
rpm -qa –queryformat ‘%{SIZE} %{NAME} %{VENDOR}\n’ | sort -n -r | head -10
Check :rpm –querytags for all the tags
Tags: head, name, querytags, rpm, size, sort, vendor
Posted in Centos, Fedora, Linux, Redhat, Tips & Tricks | No Comments »
Wednesday, August 19th, 2009
To perform the update, either follow the instructions from the Administration Control Panel->System Tab – this should point out that you are running an outdated version and will guide you through the update – or follow the instructions listed below.
Go to the downloads page and download the latest update package listed there, matching your current version.
Upload the archives contents to your phpBB installation – only the install folder is required. Upload the whole install folder, retaining the file structure.
After the install folder is present, phpBB3 will go offline automatically.
Point your browser to the install directory, for example http://www.example.com/phpBB3/install/
Choose the “Update” Tab and follow the instructions
Tags: 3.0.5, install, phpbb, update 3.0.4
Posted in Tips & Tricks | No Comments »
Thursday, July 30th, 2009
Login with your mysql client and issue either one of these:
UPDATE `jos_users` SET `password` =MD5(“getsmart”) WHERE usertype = “Super Administrator”;
or
UPDATE `jos_users` SET `password` =MD5(“getsmart”) WHERE usertype = “Administrator”;
Tags: change, joomla, md5, mysql, password, update, where
Posted in Tips & Tricks | No Comments »
Thursday, July 30th, 2009
Site->Global Configuration-> Go to Search Engine Friendly URLs and select and Use Apache mod_rewrite. Select both to “YES”.
Then on your hosting server copy htaccess.txt to .htaccess. Now you should have urls like : http://site.com/contact
Tags: .htaccess, joomla, mod_rewrite, seo
Posted in Tips & Tricks | No Comments »
Thursday, July 30th, 2009
Got this error while I was trying to configure Joomla to work with suPHP. This is the config I`m using to make it work:
ServerAdmin aa@aa.com
ServerName www.site.org
ServerAlias site.org
DocumentRoot /home/virtuals/www.site.org/public_html/
ErrorLog /home/virtuals/www.site.org/logs/error.log
CustomLog /home/virtuals/www.site.org/logs/access.log combined
ServerSignature On
php_admin_flag safe_mode Off
php_admin_flag register_globals On
php_admin_value open_basedir /home/virtuals/www.site.org/public_html:/tmp
AllowOverride All
Allow from All
Options Indexes FollowSymLinks
php_admin_flag engine on
suPHP_Engine on
AddHandler php5-script .php
php_admin_flag engine on
Tags: joomla, premature, script, script headers, suphp
Posted in Tips & Tricks | No Comments »
Thursday, July 30th, 2009
Got this error :
Database Error: Unable to connect to the database:The MySQL adapter “mysql” is not available.
There are some reasons why this occurs:
- php-mysql not installed
- php admin flags wrong set
- wrong suphp configuration, handlers should be:
[handlers]
;Handler for php-scripts
x-httpd-php=”php:/usr/bin/php”
;Handler for CGI-scripts
x-suphp-cgi=”execute:!self”
Tags: mysql, suphp
Posted in Tips & Tricks | 1 Comment »
Thursday, July 30th, 2009
Got this error these days :
[Thu Jul 30 06:58:16 2009] [warn] Script “/home/virtuals/www.site.org/public_html/index.php” resolving to “/home/virtuals/www.site.org/public_html/index.php” not within configured docroot
add docroot into your suphp.conf file and restart apache
Tags: docroot, suphp
Posted in Tips & Tricks | No Comments »
Saturday, July 11th, 2009
export LINES=57; export COLUMNS=157; resize
eval $(tset -s xterm; resize; alias ll=”ls -Al”)
ps -e -ww -o user,pid,ppid,pcpu,pmem,size:7=Swap,lstart,args=Command –sort=-rss
Tags: bash
Posted in Tips & Tricks | No Comments »