Monday, 19 December 2011

FIXING SSL FOR WAMP

ERROR:
There was a problem opening a secure connection to Google. This is what went wrong:


Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (1)


Recently I had to fix a bug/oversight in the WAMP install that prevented ssl from being a registered stream socket transport, it turns out there are quite a lot of requests for help on this subject out there but few or no answers. I stumbled into this problem when I tried to setup SSL encrypted email by way of google’s SMTP servers and if by putting my solution here I help just one person then it is worth it.


The common error message that you will get when trying to do an SSL transport on a default WAMP install is: “Unable to find the socket transport “ssl” – did you forget to enable it when you configured PHP?”


The solution it turns out is quite obvious, but maybe not so much when you are sleep deprived and multitasking, what you need to do is:


    1. Stop the Server
    3. Edit the C:\wamp\bin\apache\apache2.2.8\bin\php.ini and uncomment “;extension=php_openssl.dll” (remove the semicolon at the start of the line)
    4.Start the Apache service


If you now check your phpinfo() page you will see Registered Stream Socket Transports: tcp, udp, ssl, sslv3, sslv2, tls and everything will now be working.
After updating to the latest version of xampp (1.7.7) it appears the problem still exists, the php.ini file to edit now exists in the ../xampp/php directory, you need to add “extension=php_openssl.dll” in there. No other steps are required (apart from the obvious restart of apache).

Saturday, 3 December 2011

Android Plug In For Eclipse IDE

For starting with android on your MyEclipse IDE  you have to follow Small Steps:-

Step 1- Download android sdk from the link "http://developer.android.com/sdk/index.html" and extract it   into the path your want prefer to "C:\" or "C:\Program Files\Android" .


Step 2- Now Open your eclipse IDE and go to "Help -> Install new software" then give the site "https://dl-ssl.google.com/android/eclipse/" to download plug in from the site download from site and then give the archive "http://dl.google.com/android/ADT-15.0.1.zip" to install it and mark on install updates.

Step 3- Now open sdk from eclipse or directly and install the API and Virtual devices .

Step 4- Now keep updating your sdk and plugins

Step 5- Make your android project or you can also check for sample programs.

Useful Links :-
http://developer.android.com  
http://code.google.com/android/


Wednesday, 31 August 2011

java.lang.NullPointerException

java.lang.NullPointerException


In java many times you face a "java.lang.NullPointerException" exception in running a program. The reason is variable at which the error occurred  does not contain any value or object.


1. If u define any reference variable and don't create any object for that variable 
2. If u define any reference variable  globally but when u create the object then again define it

ex.  JButton btn; /* defined globally */

     JButton btn=new JButton(); /* on the time of creating the object */

This  will give an "java.lang.NullPointerException" when u run the program or pass any event on this button.

solution :- 
1.  btn= new JButton  /* on the time of creating the object */
2. When u don't know then check that for your "object==null" if this is true then initialize object with some value

Monday, 1 August 2011

Use wamp and MySql in win 7 simultaneously

In win7 there is a problem in using wamp and MySql at the same time due to using the same port no. 3306 by the both  wamp and MySql. So for resolving this problem change the port no. of MySql during installation (ex. 3307). Now you can use both at same time. If u want to use Mysql as DB in php then change the port no. in file "config.inc.php" .
For windows the directory of this file is "C:\wamp\apps\phpmyadmin2.11.5"








 In the image in second row give the new port no. of your DB.
I hope it can help u.!!