These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE Technology Lab

 
  • Topic is locked indefinitely.
 

EVE IGB - Cannot see HTTP headers to see Trusted / Character / etc

First post
Author
Mandrid Mandragoran
Invictus LLC
#1 - 2015-01-12 07:22:45 UTC  |  Edited by: Mandrid Mandragoran
Hi guys, newbro here, I thought I might try my hand at some dev for EVE. However, I'm having a bit of a problem.

I cannot see any of the HTTP_EVE_XXXXX header variables.

I can't check for HTTP_EVE_TRUSTED, or character names, IDs, nothing. Even if I manually add the website to my trusted list, it doesn't show any more.

I'm using the apache_request_headers() function to try to dump the header, but that isn't working. I've also tried getallheaders(), but that doesn't seem to work either.

I am using PHP and MySQL via a basic GoDaddy webhost plan.

Anyone have any tips? :-s
Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#2 - 2015-01-12 13:07:33 UTC
I /suspect/ you'll be running under apache 2.4, with php running as a seperate process.

If that's true, you can't get the headers, without messing with your .htaccess file (I /think/ it can be done there). it's because underscores are, technically, against the spec for HTTP headers. so apache 2.4 strips them. (nginx does the same thing, though it's a little easier to reactivate them)
https://httpd.apache.org/docs/trunk/env.html

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter

Snitch Ashor
Republic Military School
Minmatar Republic
#3 - 2015-01-22 15:59:43 UTC  |  Edited by: Snitch Ashor
Hi,

I had to work around the same issue when movin to a newer apache version. To get invalid headers like the IGB ones you can use the getallheaders() function.

e.g.

$pilot = $_SERVER['HTTP_EVE_CHARNAME']; which works only in older versions becomes

$pilot = getallheaders()['EVE_CHARNAME'];

That should do the trick, at least it did for me.
Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#4 - 2015-01-22 16:06:47 UTC
Snitch Ashor wrote:
Hi,

I had to work around the same issue when movin to a newer apache version. To get invalid headers like the IGB ones you can use the getallheaders() function.

e.g.

$pilot = $_SERVER['HTTP_EVE_CHARNAME']; which works only in older versions becomes

$pilot = getallheaders()['EVE_CHARNAME'];

That should do the trick, at least it did for me.



getallheaders requires php to be running as a built in module. (mod_php). if you're running as cgi (ugg) or php-fpm, then it doesn't work.

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter

Snitch Ashor
Republic Military School
Minmatar Republic
#5 - 2015-01-26 11:40:13 UTC
For php >= 5.4 getallheaders should work even in CGi mode, however the non compliant headers might get stripped anyway in CGI mode, not sure about that.
Leona Konstein
Science and Trade Institute
Caldari State
#6 - 2015-02-12 22:01:30 UTC
im using getallheaders() but i dont see any EVE header, only my server ones, any suggestion??

also

Quote:

$pilot = getallheaders()['EVE_CHARNAME'];


isnt working it gives me an error on the sintax. thanks.