All posts in PHP

CakePHP 2.0 501 Not implemented error on form submission – Fix

Yesterday I was found strange issue with my new cake project. It was running great in local machine windows as well Linux machine. Developer has moved them to live sever with CentOs 5.8. After a few minutes I got call from Client representative that “Nothing is working”. Then I go through it and finally realized that there is an issues in add action of a major module. I was checking submitting by form many times. Issues are keeping on coming and are very strange too. Because form was just one input (select) and submit button. I was checked the security module, even after disabling it, we are getting same issues.

Continue reading →

How to create background image Ads using pure HTML and CSS? A better, quick and smart way

Now a days “background image Ads” are becoming one of the common revenue making concepts in internet industry. But most of us, still unaware, how can make can we implement it. Technically there are too many ways to do it, including few jQuery solutions. But after experiencing with most of this I realized that HTML/CSS version is better and efficient in many aspects.

Some of the advantages are

  • CSS/HTML version is much quicker and easier.
  • Easy to understand.
  • As we are calling image as background image it won’t hurt the page loading time, even though image size is bigger for low band width users.
  • No script loading delay.

Continue reading →

Worpress Permalink Update – Error 400 Issue

This is One of the biggest issues/idiotic issue I have recently faced. I have wasted such long time to find solution. This issues was totally confusing as the issues occurs only when we edit the permalinks to seo based/ only custom permalinks.

Then you may leads to totally new issue error

Error 400: Bad Request
Your browser sent a request that this server could not understand.

I was trying fix this using various ways , but it was a total disaster. Finally after R&D I found the issue generated at the sever end. Then I found the issue came from mod_security firewall.

This is One of the biggest issues/idiotic issue I have recently faced. I have wasted such long time to find solution. This issues was totally confusing as the issues occurs only when we edit the permalinks to seo based/ only custom permalinks.

Then you may leads to totally new issue error

Error 400: Bad Request
Your browser sent a request that this server could not understand.

I was trying fix this using various ways , but it was a total disaster. Finally after R&D I found the issue generated at the sever end. Then I found the issue came from mod_security firewall.

Continue reading →

How to avoid SSH session timeout in PuTTY?

Its quite interesting question and very simple too. We used to work with PuTTY, sometimes  we may get irritated with quick timeouts.

But for normal users its fare to get timeout after the predefined time. Most of the time , the server which connects  will have more sensitive data. I recommend to NOT TO use the if its highly required.

Scenarios where we need long execution timeout are

  • Some process with requires more than an hour to finish
  • You are force to work on multiple work together with ssh, like New sever  setup , sever migration etc. Continue reading →

Cake PHP Optimal Payment Component with ccPurchase, ccAuthorize, ccVerification, ccSettlement, ccStoredDataPurchase and ccStoredDataAuthorize

After few days days of testing in live of this the component, I have decided to publish this component to open source  to community. I have implemented because, I found the lack of  proper PHP codes for O ptimal Payment. Even though the implementation is too power full it lacks proper documentation and PHP codes. I have implemented same for cake php 2.0 . But I will release the Core PHP version in the next  post.

we have implemented optimal payment web services API for this Payment implementation. This truly power full as it have all facilities which PayPal and Authorize.net provides in a bit complex way are done here much easily. The main features are

  1. Purchase with credit card info .
  2. Purchase Authorization with credit card info  : [for those who not aware about Auth:, This is process of getting a permission to get a money(Called Capture) in future based on users permission gained in Approval(Authorization) part. ]
  3. Verify/Validate the credit card Information.
  4. Ability to purchase new item/product based on  users  previous purchase data(Doesn’t means  we are saving an credit card info).

Continue reading →

Challenges in Payment gateway integration

A few months after I left Agriya, I got an opportunity to work the Payment Gateway Integration.  You may wonder why I have mentioned Agriya here. Yes, that’s truly important as I have done more than 25 different payment gateways for various countries in Agriya in a short duration of 3months.  This is because, that was peak time for Agriya’s Groupon and Fiverr  clone scripts. I sware, still Agriya’s groupon and fiverr clones are the best in industry. This is because, they are equipped with perfect implementation, security, efficiency and  features. I appreciate the hands and brains behind it. So I thought of sharing some sharing a common points I come across in these

 

Continue reading →

Cake PHP 2.0 matured to beta

Cake PHP, just released its released 2.0 beta version. Main features in the releases

  • Microsoft SqlServer 2008 and 2011 is now a first class citizen
  • FormHelper is now able to guess model metadata again, it is now advisable to hint the helper with the controller $uses property of what models is the controller using. This contrasts with 1.3 applications where $uses supposed a performance hit. This is not true anymore for 2.0 Continue reading →