logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: How to Debug Unusual 403 Error
Author
jcobban



Joined: 10 May 2015
Posts: 17
Location: canada, ottawa

PostPosted: Fri 29 Sep '17 21:23    Post subject: How to Debug Unusual 403 Error Reply with quote

If I enter the following URL into my browser:

https://www.jamescobban.net/FamilyTree/editEvent.php?idir=49121&givenname=Sarah%20Jane&surname=Blackstock&rownum=4&date=7%20Dec%201883&location=Enniskillen%2C%20Lambton%2C%20ON%2C%20CA&ider=46960&type=30

A 403 access denied error is generated. I have defined an error handler page for this error to dump out all of the information provided by Apache, but I cannot see an explanation of why the 403 error is generated with the above parameters when it is not generated if the parameters are omitted. That is https://www.jamescobban.net/FamilyTree/editEvent.php does not generate a 403 error. When I make the same request to my personal copy of the web-site, which is file for file identical to the production site, the script works as intended.

How do I figure out why Apache is generating the 403 error when those parameters are provided, but not when they are omitted? Since the 403 error is not on the access to the main script, it must be on access to something requested by the script, but the error information does not provide access to that. You can reproduce this error yourself but the site will then block your IP address. The output of the 403 error page is:

$_ENV['CONTEXT_DOCUMENT_ROOT']='/home/jcobban/public_html'

$_ENV['CONTEXT_PREFIX']=''

$_ENV['DOCUMENT_ROOT']='/home/jcobban/public_html'

$_ENV['GATEWAY_INTERFACE']='CGI/1.1'

$_ENV['HTTPS']='on'

$_ENV['HTTP_ACCEPT']='text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'

$_ENV['HTTP_ACCEPT_ENCODING']='gzip, deflate, br'

$_ENV['HTTP_ACCEPT_LANGUAGE']='en-ZA,en-GB;q=0.8,en-US;q=0.5,en;q=0.3'

$_ENV['HTTP_CACHE_CONTROL']='max-age=0'

$_ENV['HTTP_CONNECTION']='keep-alive'

$_ENV['HTTP_HOST']='www.jamescobban.net'

$_ENV['HTTP_UPGRADE_INSECURE_REQUESTS']='1'

$_ENV['HTTP_USER_AGENT']='Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0'

$_ENV['HTTP_X_HTTPS']='1'

$_ENV['PATH']='/bin:/usr/bin'

$_ENV['PHPRC']='/home/jcobban/public_html'

$_ENV['QUERY_STRING']=''

$_ENV['REDIRECT_QUERY_STRING']='idir=49121&givenname=Sarah%20Jane&surname=Blackstock&rownum=4&date=7%20Dec%201883&location=Enniskillen%2C%20Lambton%2C%20ON%2C%20CA&ider=46960&type=30'

$_ENV['REDIRECT_REQUEST_METHOD']='GET'

$_ENV['REDIRECT_SCRIPT_URI']='https://www.jamescobban.net/FamilyTree/editEvent.php'

$_ENV['REDIRECT_SCRIPT_URL']='/FamilyTree/editEvent.php'

$_ENV['REDIRECT_STATUS']='403'

$_ENV['REDIRECT_UNIQUE_ID']='Wc6WiV1aASr64hxcPC7tKQAAAAE'

$_ENV['REDIRECT_URL']='/FamilyTree/editEvent.php'

$_ENV['REMOTE_ADDR']='70.51.85.190'

$_ENV['REMOTE_PORT']='45128'

$_ENV['REQUEST_METHOD']='GET'

$_ENV['REQUEST_SCHEME']='https'

$_ENV['REQUEST_URI']='/FamilyTree/editEvent.php?idir=49121&givenname=Sarah%20Jane&surname=Blackstock&rownum=4&date=7%20Dec%201883&location=Enniskillen%2C%20Lambton%2C%20ON%2C%20CA&ider=46960&type=30'

$_ENV['SCRIPT_FILENAME']='/home/jcobban/public_html/errors/403page.php'

$_ENV['SCRIPT_NAME']='/errors/403page.php'

$_ENV['SCRIPT_URI']='https://www.jamescobban.net/FamilyTree/editEvent.php'

$_ENV['SCRIPT_URL']='/FamilyTree/editEvent.php'

$_ENV['SERVER_ADDR']='67.231.25.52'

$_ENV['SERVER_ADMIN']='webmaster@jamescobban.net'

$_ENV['SERVER_NAME']='www.jamescobban.net'

$_ENV['SERVER_PORT']='443'

$_ENV['SERVER_PROTOCOL']='HTTP/1.1'

$_ENV['SERVER_SIGNATURE']=''

$_ENV['SERVER_SOFTWARE']='Apache'

$_ENV['SSL_TLS_SNI']='www.jamescobban.net'

$_ENV['TZ']='America/Toronto'

$_ENV['UNIQUE_ID']='Wc6WiV1aASr64hxcPC7tKQAAAAE'
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7288
Location: Germany, Next to Hamburg

PostPosted: Tue 31 Oct '17 19:10    Post subject: Reply with quote

At the moment is seems to work. Did you solve your problem?
Back to top


Reply to topic   Topic: How to Debug Unusual 403 Error View previous topic :: View next topic
Post new topic   Forum Index -> Apache