reset wordpress admin password using phpMyAdmin

First, log into phpMyAdmin and select the database associated with your WordPress installation. You can find it from the wp-config.php file. Once in your database, select the wp_users table.

Once the table is loaded, look for the username you had chosen while installing WordPress. Assuming the user name is admin in this scenario. Click on the edit icon, the little yellow pencil icon located next to the admin entry.

Look for the row named user_pass and make the following changes:

Change the Function field to MD5. Under the Value field, enter your new password and click on Save Changes.

Now you have successfully changed your WordPress password and reset the WordPress admin password. 🙂

FastInclude: Userdirname: (null) error after recompiling php and apache

I encountered the following error after recompiling using easyapache in cPanel server.

These were the errors that appeared in apache logs:

[notice] FastInclude: Userdirname: (null)
[Tue Jan 28 02:39:00 2013] [notice] FastInclude: Userdirname: (null)
[Tue Jan 28 02:39:00 2013] [notice] FastInclude: Userdirname: (null)
[Tue Jan 28 02:39:01 2013] [notice] FastInclude: Userdirname: (null)

The fix I was able to find was to remove the attracta plugin installed in the cPanel server.

Your Internet Address has changed since the beginning of your Mail session. To protect your security, you must login again

If you are unable to login into Webmail , and you are getting an Error: “Your Internet Address has changed since the beginning of your Mail session. To protect your security, you must login again.”

To fix this problem, you may do the following:

1)You can turn off ‘checkip’ feature in Horde server-wide.

2)Edit the /usr/share/psa-horde/config/conf.php file in the Plesk server and the change the following lines.

$conf[‘auth’][‘checkip’] = true;
to
$conf[‘auth’][‘checkip’] = false;

Please note that this modification cannot be configured per user basis and will affect all the webmail users in the server.

Spamd / Spamassassin error : argument isn’t numeric in addition / unparseable IPv6 address

I encountered the following error while restarting spamassassin.

Starting spamd: Feb 21 20:29:26.275 [8814] warn: Argument “” isn’t numeric in addition (+) at /usr/local/lib/perl5/site_perl/5.8.8/Mail/SpamAssassin/NetSet.pm line 122.
Feb 21 20:29:26.276 [8814] warn: oops! unparseable IPv6 address for 127/8: 168355856 at /usr/local/lib/perl5/site_perl/5.8.8/Mail/SpamAssassin/NetSet.pm line 128.
Feb 21 20:29:26.276 [8814] warn: oops! unparseable IPv6 address for 127/8: 168356228 at /usr/local/lib/perl5/site_perl/5.8.8/Mail/SpamAssassin/NetSet.pm line 128.
child process [8816] exited or timed out without signaling production of a PID file: exit 255 at /usr/bin/spamd line 2582.

The work around I found is to change cpanel to stable version and run upcp.

then do this,

sa-learn -D –force-expire
sa-update -D
/usr/local/cpanel/scripts/spamassassin_dbm_cleaner
/usr/local/cpanel/scripts/fixspamassassinfailedupdate
/scripts/restartsrv_spamd

This should fix the issue.

How To Find Large Files and Directories in Unix

Sometimes we need to find larger files in a file system when theres is a disk space issue.

This example finds all the files under /etc directory which are larger than 1000k:

geobaby@ubuntu:~$ find /etc -size +1000k
/etc/brltty/zh-tw.ctb

If you look at the file, the size if above 1000k:

geobaby@ubuntu:~$ ls -l /etc/brltty/zh-tw.ctb
-rw-r–r– 1 root root 1368836 2010-08-12 05:20 /etc/brltty/zh-tw.ctb

The following example will be helpful in cPanel or web servers.

find / -size +1000M : will list all the files above 1GB size.

find / -size +1000M > list

for i in `cat list`; do du -sch $i;done : will list all the files and their resoective size.

how to remove an IP from the cphulkd blacklist

cPHulk Brute Force Protection prevents malicious forces from trying to access your server’s services by guessing the login password for that
service.

By the following steps you can remove the IP from the cphulkd blacklist. Issue the commands from mysql prompt.

mysql> use cphulkd;

mysql> select * from brutes;
+————–+————————————————————————-+———————+———————+
| IP | NOTES | BRUTETIME | EXPTIME |
+————–+————————————————————————-+———————+———————+
| 4.9.23.6 | 5 login failures attempts to account geo@geo.com (ftp) | 2011-01-07 14:54:02 | 2011-01-07 14:59:02 |
+————–+————————————————————————-+———————+———————+
1 row in set (0.00 sec)

mysql> delete from brutes where IP=’4.9.23.6′;
Query OK, 1 row affected (0.00 sec)

mysql>quit

You are done.

Install APC in cPanel server

You can install APC (Alternative PHP Cache) in your cpanel server using the following steps:

# pecl install apc

Then add the extension in the php.ini file.

You can get the php.ini file by

# php –ini

Add the following line to it.

extension=”apc.so”

Then, retart apache service and you are good to go.

I encountered the following error while installation.

“checking whether the C compiler works… configure: error: cannot run C compiled programs.”

I made it working by the following:

# mount -o remount,exec,suid /tmp

Complete the installation and don’t forget to remount the tmp directory with noexec, nosuid options after the installation.

cPanel upcp error : Undefined subroutine

I have seen recent cPanel upgrade throwing errors shown below:

root@server [~]# /scripts/upcp
/scripts/upcp syntax OK
Running Futex Check/Fix……Done
Undefined subroutine &Cpanel::Update::automatic_updates_enabled called at /scripts/upcp line 273.

This can be fixed using below steps.

wget -O /root/updatenow.static http://httpupdate.cpanel.net/cpanels…datenow.static && perl /root/updatenow.static –manual

Now you will be able to upgrade the cPanel using upcp script.

/scripts/upcp –force

It worked for me.