homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

PayPal IPN problem (on Joomla site)
script executes fine but returns 503 code

 7:38 pm on Aug 13, 2011 (gmt 0)

It seems to be a common problem (I see a lot of questions about this on the net). My IPN script works perfectly. it does everything it is supposed to, except that it returns a 503 to PayPal instead of a 200. So PayPal keeps resending the IPN.
I looked at my server logs and sure enough the page in question returns a 503 when called from PayPal (but when I call it manually by typing the address it doesn't.
Despite it being a common problem however I have yet to find the reason why it does this.
I know a 503 means "Service Unavailable" but why would a page throw this error while it still executes perfectly?
The only reason I can think of in my case is because I use Joomla and my IPN url is www.somedomain.com/index.php?option=x&view=y
So in effect I am not calling a physical page; but that shouldn't matter now should it?



 12:37 pm on Aug 18, 2011 (gmt 0)

Unless I am missing something here it looks as if you will have to trace back through that Joomla code to figure out where and when the 503 is being served.


 1:00 pm on Aug 18, 2011 (gmt 0)

I got it working by placing my handler code in a page that can be accessed directly by the IPN (so no use of a query-string). I did multiple tests with PayPals sandbox IPN-tool and found that any URI with a query-string (on a Joomla site at least, I didn't test non-joomla sites) gave me a 503.
I re-wrote my handler to work outside of the joomla install as a workaround. I'm not sure how I could backtrace to see where the 503 originates. But frankly I am happy I got it working now and I will see if I can revisit this in my own time once this project is done.


 1:05 pm on Aug 18, 2011 (gmt 0)

Backtrace by monitoring your network traffic (wireshark is a good graphical tool for this) and by running a debugger. You will find the exact script and line and you can work at it from there.


 1:13 pm on Aug 18, 2011 (gmt 0)

Thanks, I'll check it out.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved