nano : friendly editor for shell newbie

Posted by admin on December 25, 2008 under Tips | Be the First to Comment

I’m familiar with ee (easy editor) that not available in hosting account, they provide vi and nano.

First time I use it I think nano is very good to help newbie user like me for editing little file such wp-config.php

Here’s how :

mv wp-config-sample.php wp-config.php

nano wp-config.php

edit things as I use notepad, when I need to save I type :

CTRL + o , this will save permanently

CTRL + x , exit from editor

use CTRL + e to go to end of line.

Simple and neat, those command available at the bottom :

^G Get Help ^O WriteOut ^R Read File ^Y Prev Page ^K Cut Text ^C Cur Pos
^X Exit ^J Justify ^W Where Is ^V Next Page ^U UnCut Txt ^T To Spell

Yes, ^ is equal to CTRL button in my keyboard.

Add to Del.cio.us RSS Feed Add to Technorati Favorites Stumble It! Digg It!
    www.sajithmr.com

Server Error 500

Posted by admin on December 22, 2008 under Tips | Be the First to Comment

This error related to permission problem, to overcome this error you should try to use chmod operation :

chmod -r 755 filename/foldername

if you don’t have access to shell, you might use cpanel file manager facility or ftp client chmod tool.

Add to Del.cio.us RSS Feed Add to Technorati Favorites Stumble It! Digg It!
    www.sajithmr.com

Activate wpmu user while email server not working

Posted by admin on December 12, 2008 under Tips | Be the First to Comment

My email server seem not working to send activation email to student for their new blog . I need quick solution that able to activate the blog and able to reset the password for temporary solution so I can investigate problem in my email server.

To overcome the problem I make this script :

activate.php

mysql_connect("localhost","alam","doyanmakan");
mysql_select_db("wpmu");

if($_GET['ac']=='reset'){

$user2=base64_decode($_GET['us']);

//update db
$ubah=mysql_query("update wp_users set user_pass=md5('123456') where user_login='$user2'");

if($ubah){

echo "Success reset the password into : <b>123456</b>";

}

}

?>

<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Instant Blog Activation</title>
</head>

<body>

<p>Instant Blog Activation
</p>
<table border="1" width="79%">
<tr>
<td width="39" align="center">No</td>
<td width="122" align="center">Name</td>
<td width="121" align="center">Blog</td>
<td width="219" align="center">Email</td>
<td align="center">Action</td>
</tr>
<?php
$query=mysql_query("select domain,user_login,activation_key,user_email  from wp_signups where active=0");
$no=1;
while(list($domain,$login,$key,$email)=mysql_fetch_row($query)){

?>
<tr>
<td width="39"><?php echo $no;?></td>
<td width="122"><?php echo $login;?></td>
<td width="121" align="center"><?php echo $domain;?></td>
<td width="219"><?php echo $email;?></td>
<td><a href="http://blog.yourdomain.com/wp-activate.php?key=<?php echo $key;?>">Activate</a> | <a href="activate.php?ac=reset&amp;amp;us=<?php echo base64_encode($login);?>">Reset Password</a></td>
</tr>
<?php
$no++;
}
?>

</table>

</body>

</html>

I hope I can fix email server as fast as I can :-)

Add to Del.cio.us RSS Feed Add to Technorati Favorites Stumble It! Digg It!
    www.sajithmr.com