Monday, February 25, 2013

Access Forbidden XAMPP Error while try to chnage the security

Access forbidden!
You don't have permission to access the requested object. It is either read-protected or not readable by the server.
If you think this is a server error, please contact the webmaster.
Error 403
localhost
Apache/2.2.11 (Win32) DAV/2 mod_ssl/2.2.11 OpenSSL/0.9.8i mod_autoindex_color PHP/5.2.8

How to get access to the XAMPP Security Page

  1. Navigate to your xampp\apache\conf\extra folder
  2. Using a text editor, open httpd-xampp.conf
  3. Find the following line:
    Allow from localhost
  4. Change the line to:
    Allow from 127.0.0.1
  5. Save the file and restart your XAMPP server
  6. Try to access http://localhost/security/lang.php?en
You should now have no problems accessing the XAMPP Security Page via localhost or 127.0.0.1

paypal integration

Paypal test transaction (Paypal Sandbox)

1.We need to create a sand box account. https://developer.paypal.com/ . If you want to create u can sign up
2.Otherwise login with this account
email: email@gmail.com
pass:12345678

3.Click on Test Accounts link on the right side .Here I have created 2 test accounts one is business(Merchant account) and other is personal.

4. Here selecting any of the radio button and clicking on “Enter Sandbox Test Site” will take you to their accounts



Password for both is: 12345678

Encripted Website payment:

Now for implementing encrypted Payment service we need a private key ,our public certificate and paypal public certificate.

Plz read this article .It will give you an idea how to create keys.
https://www.paypal.com/IntegrationCenter/ic_button-encryption.html - step4

from the above url you can get the command for creating private and public key

Here u need openSSl software .(I hav already installed this s/w in my system . Installation is therein my desktop in openssl folder).
Running Openssl:
Use command prompt . and run c://openssl/bin/openssl
Here you can type commands.


Now you can download your certificate from your test business account.
For sandbox test you have to download from sandbox business account

(see above link. section. Step 3. Downloading the PayPal Public Certificate)

Your certificate will be PEM encoded file.

Now u have three files. Private key ,your public certificate and paypal public certificate.

Campaign your private key and public key in to a .p12 ecoded file.(You can you openssl )

Openssl command:

openssl pkcs12 -export -out bundle.p12 -inkey my-prvkey.pem -in my-pubcert.pem (Remember These password)

--In paypal.properties file

api.paypalcertificate=downloaded paypal public certificate
api.certificate=bundle.p12
api.privatekeypassword=(when you create bundle.p12 it will ask you to enter a password.That password you have to mention here)


You should install bouncycastle as security provider.
Plz follow the instructions in this site
http://docs.safehaus.org/display/PENROSE/Installing+Security+Provider


Notes:

You should login in https://developer.paypal.com/ site before you do any transaction with Paypal sandbox .







email@gmail.com
1234567