Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We are setting up an online payment facility using a payment gateway. After the payment gateway finishes processing the credit card details for a payment, the user is redirected to a "403 Forbidden" page. The logs show:

[MY_IP_ADDRESS_HERE] - - [SOME_DATE_HERE] "GET /POSTBACK_URL.php?txnid=1338434567&result=failure&reason=The+remote+server+returned+an+error%3a+(404)+Not+Found.&digest=7a115270c56df5945c43ad86e56b2e930a3cfd50 HTTP/1.1" 404 - "PAYMENT_GATEWAY_URL_HERE" "BROWSER_DETAILS_HERE"

It means that when the PAYMENT_GATEWAY_URL attempts to open our POSTBACK_URL, it gets a 404 error, is that correct? But why does the page say "403 Forbidden"?

Anyway, we tried to copy-paste that same URL into the browser window, and the page is opened successfully, with our programmed error notification message.

So, why couldn't it be opened when the payment gateway tried to redirect to it, but we could? Is this some sort of permissions issue? If so, the postback URL's file permissions are already 755.

What am I missing?

share|improve this question
If Apache says the file doesn't exist in its error log, then it's Apache's problem. If not (and that file seems to exist), then the error codes are completely in the realm of your PHP code; it's setting the return codes, Apache is not. Since your query parameters say it's a "remote server" error, is your PHP making a call to another web service or something? If anything in Apache is throwing the 403, then it's in the configuration; please provide what you've configured for the site (virtual host files and relevant htaccess files). –  Shane Madden May 31 '12 at 4:35
We're actually on a shared hosting plan, and the htaccess is empty. I don't really understand the other stuff that you said. But here's some info: POSTBACK_URL.php contains our payment form that user fills out, on submit, calls itself, checks for any POST's and redirects to payment gateway. User gives credit card details, submits, payment gateway, calls our POSTBACK_URL.php. Here the error occurs. Supposedly, our postback checks for any GET's and presence of txnid, if satisfied, it displays properly-formatted result message to user. –  Obay Ouano May 31 '12 at 4:53
Can you check Apache's error log at all, or is that hidden since it's a shared hosting environment? –  Shane Madden May 31 '12 at 4:54
The log snippet I posted above in the question comes from /home/OUR_ACCOUNT/access-logs. That snippets seems to be the only useful thing we could find in relation to the problem. Or is there anything else I should look for? –  Obay Ouano May 31 '12 at 4:56
Apache has an error log that should provide relevant information any time it generates a 403 or 404 response - but, that's less likely to be accessible in a shared hosting environment. Any way you can get your provider to give you relevant log entries? –  Shane Madden May 31 '12 at 5:54
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.