Before you lose your mobile…………..

Before you lose your mobile,

1. Dial

*#06# from your mobile.

2. Your mobile shows a unique 15 digit.

3. Note down this number anywhere but except your mobile as this is the number which will help trace your mobile in case of a theft.

4. Once stolen you just have to mail this 15 digit IMEI no. to cop@vsnl.net

5. No need to go to police.

6. Your Mobile will be traced within next 24 hrs via a complex system of GPRS and internet.

7. You will find where your hand set is being operated even in case your number is being changed. PASS ON THIS VERY IMPORTANT MESSAGE TO ALL YOUR FRIENDS AND RELATIVES.

If you lost your mobile, send an e-mail to cop@vsnl.net

With the following info

Your name:

Address:
Phone model:
Make:
Last used No.:
E-mail for communication:
Missed date:
IMEI No.:

Keep all these information stored for emergency use..

Incoming Email Problem: Remote host said: 550 #5.1.0 Address rejected

Recently I have faced a problem on a virtual dedicated godaddy server.

1. Email address created from the godaddy control panel e.g. test@test.com

2. Opened web-mail: http://webmail.test.com

3. Sent mail to: test@gmail.com and on gmail successfully received the mail from test@test.com address but,

4. While re-sent that mail to test@test.com from my gmail a/c – it bounces back with an error message

Delivery to the following recipient failed permanently:

test@test.com

Technical details of permanent failure:
Google tried to deliver your message, but it was rejected by the recipient domain. We recommend contacting the other email provider for further information about the cause of this error. The error that the other server returned was: 550 550 #5.1.0 Address rejected test@test.com (state 14).

The solution of the problem lies within my MX records – which was not set properly.

There are a variety of factors that can affect whether or not you can send and receive email. MX records are among them. You need to have the correct MX records to get your email.

You can verify that you have correct settings for your MX Records in the Godaddy Email Control Center.

If your current settings are incorrect godaddy can provide you with the correct settings for your POP or IMAP email account.

1. Log in to your godaddy Account Manager.

2. In the My Products section, click Email.

3. On the Manage Email page, click Manage Account next to the account you want to change. The Email Control Center displays.

4. Go to the Domains tab.

5. Select the email account you want to verify MX records for, and then click Server Addresses.

6. It will show you the Correct MX records and in case there is a discrepancy within your present MX records – it will ask you to correct your MX records

7. Once, you correct your MX records – your incoming mail problem will be solved.

Why .htaccess is not working on your server

Sometimes you will wonder why .htaccess is not working on your server.

.htaccess is Apache’s directory-level configuration file. It allows end user to configure authentication.

1. Make sure AccessFileName set to .htaccess

2. Search httpd.conf for AccessFileName directive. It defines name of the distributed configuration file:
# grep -i AccessFileName httpd.conf

3. Make sure users are allowed to use .htaccess file

4. AllowOverride directive – specifies, in categories, what directives will be honored if they are found in a .htaccess file. If this directive is set to None, then .htaccess files are completely ignored. In this case, the server will not even attempt to read .htaccess files in the filesystem:
# grep -i AllowOverride httpd.conf

5. When this directive is set to All, then any directive which has the .htaccess Context is allowed in .htaccess files: AllowOverride All

6. Save and close the file. Restart httpd:
# service httpd restart

7. Your .htaccess will work

Short open tags will be removed in PHP 6

Sometimes, you may encounter problem with old PHP code where short open tags are used.

To enable short tags enable the setting called short_open_tag in the php.ini file.

However, short open tags will be removed in PHP 6.

Therefore, I do not recommend you to use short tags.

You should use the full length tags.

The php.ini short_open_tag directive determines whether or not PHP will recognize code between tags as PHP source which should be processed as such.

It’s been recommended for several years that you not use the short tag “short cut” and instead use the full tag combination.

With the wide spread use of XML and use of these tags by other languages, the server can become easily confused and end up parsing the wrong code in the wrong context.

But because this short cut has been a feature for such a long time, it’s currently still supported for backwards compatibility, but I will recommend you don’t use them.

HOW TO: REMOVE TRAILING COMMAS IN PHP

During conversion of an array of information into a string using PHP we often face this problem.
Suppose, we are fetching data from a database and building a comma separated string value within
a loop. Then the loop will add an extra comma at the end of such string.

To remove the trailing comma use following PHP function:

1. function RemoveTrailingCommas($your_string) {
2. return trim(preg_replace(“/(.*?)((,|s)*)$/m”, “$1”, $your_string));
3. }

ERROR: PleskFatalException Unable to connect to database: saved admin password is incorrect.

In case you are unable to Log-in your Plesk Control Panel and you are getting following Error Message:

ERROR: PleskFatalException
Unable to connect to database: saved admin password is incorrect.

Follow these steps to recover MySQL admin password:-

–  Stop your MySQL server as                        ::      /etc/init.d/mysqld stop

–  Open your MySQL configuration file      ::      vi /etc/my.cnf

–  Add one line into the [mysqld] section  ::     skip_grant_tables=1

–  Start your MySQL server                              ::     /etc/init.d/mysqld start

–  Login to MySQL as an admin user              ::    mysql -u admin

–  Run query to update admin password     ::

update mysql.user set password=password(‘your_current_password’) where user=’admin’

–   Where [ your_current_password ] is the string from this file /etc/psa/.psa.shadow

–   Exit from the MySQL console

–  Stop your MySQL server as                              ::      /etc/init.d/mysqld stop

–  Open your MySQL configuration file            ::      vi /etc/my.cnf

–  Delete the line from the [mysqld] section  ::    # skip_grant_tables=1

–  Start your MySQL server                                   ::     /etc/init.d/mysqld start

In case everything goes well – you will be able to Log-in your Plesk Control Panel.

Brosix – IM Service

Today – I am experimenting with a great Internet communication application which has many features and the good part is that it is free for Personal use.

With Brosix Enterprise version, you can create your own private Instant Messenger in a minute.

It has all the features of a mature corporate IM service. In addition, you also get a full control over the Instant Messaging group you create. Enterprise version is suitable for companies, organizations, and teams that want enterprise-level communication through the Internet.

Brosix will run on Windows, Linux and Mac platforms and, you will have facilities for Text Chat, File Transfer, Co-Browse (an unique feature – whatever you run on your browser your connected party will be able to view), Whiteboard, Screenshot, Voice Calls, Video Calls etc.

To test Brosix, you can go to the download page URL   http://www.brosix.com/download/

As a first time user,

  • download the Brosix for Windows (portable)
  • No installation is required.

Just download the archive, and then extract it. Go to the Brosix folder and start “Brosix”. You are on.

Join me on Brosix. My username is: asoke

How to get your Mail Receipts in PHP

I accept that I am not a regular writer. However, very recently one of my friends requested me to supply a technique so that he will have one Delivery notification or Mail opening notification for each mail he sends to others. That was the reason – I am writing this article so that, other techie people may know the procedure.

The trick is very simple and used for quite a long time.

Normally, we use one HTML email reader which shows all the content that the HTML specifies. Therefore the HTML email reader might also show the external content if anything such embedded within the HTML mail.

Now the question is what will be the form of such external content.

In case we send an HTML email with an IMG tag within the body. Then, the IMG source will not point to an actual image, but instead it will point to a PHP page on sender’s web server as follows:

<code>

<img src=”http://senders.com/mailreceipt.php?who=recipient1&#8243; height = “1px” width=”1px” />

</code>

Save this HTML code to a file e.g. sample.html 
Then run this sample.html on your browser.
A blank page will be shown.
Press CTRL+A to select everything shown on the blank page.
Copy it with CTRL+C and paste on the body of your outgoing mail.

Now on the root directory of senders.com server – save or upload the file mailreceipt.php as follows:

<?php
       $from_address = 'none@none.com';
       $notify_to = 'you@yourdomain.com';
       $subject = "Mail opened by ".$_GET['who'];
       $body = $_SERVER['REMOTE_ADDR'].' '.$_SERVER['HTTP_USER_AGENT'];
       $headers = "From: ".$from_address."\r\nX-Mailer: php";
       mail($notify_to, $subject, $body, $headers);

?>

The $notify_to variable will be the email address where the return-receipt gets sent.

The $from_address variable is the address that the notification will appear to come from, and in most cases this can be a non-existing email address.

Now whenever you send any mail attached with the IMG tag as shown above it will call your remote PHP script when the recipient opens your email.

When you test my code,

  1. Do not forget to change your $notify_to variable – where you want the notification
  2. Change the domain server name senders.com – where you uploaded the mailreceipt.php
  3. who=recipient1 – will be who=<email address for whom the notification is required>