| Pages: 1 :: [one page] |
| Author |
Thread Statistics | Show CCP posts - 0 post(s) |

Coryigon
Mom 'n' Pop Ammo Shoppe R.E.P.O.
0
|
Posted - 2013.06.18 23:12:00 -
[1] - Quote
So, I run maintain a website for my corp for the last 5 years or so, and today, all header info is no longer being passed to the browser, I have put up a test page on a different server ( same host ) with no luck. Not getting any information even while the site is trusted. Has anyone else had an issue like this or know anything that might help me? |

Steve Ronuken
Fuzzwork Enterprises
1531
|
Posted - 2013.06.18 23:23:00 -
[2] - Quote
You're probably using nginx or apache 2.4, which are sanitizing the headers,.
If you're using PHP, take a look at using http://php.net/manual/en/function.apache-request-headers.php Steve Ronuken for CSM 9!-á I'm starting early :) Handy tools and an SDE conversion Twitter: @fuzzysteve on Twitter |

Draugo Rana
Masuat'aa Matari Ushra'Khan
3
|
Posted - 2013.06.19 11:52:00 -
[3] - Quote
Which headers? Request headers or response headers? Where do you look for these headers and how?
Also, providing more information about the server OS, web server, server side scripting framework (PHP?), browser, etc will help you get more relevant answers.
Masuat'aa Matari is recruiting Minmatar freedom fighters: https://forums.eveonline.com/default.aspx?g=posts&m=3216938 |

Coryigon
Mom 'n' Pop Ammo Shoppe R.E.P.O.
0
|
Posted - 2013.06.19 15:32:00 -
[4] - Quote
It is GoDaddy hosting, on a linux box with php 5.3, the code has been working up until yesterday. Yesterday it just decided to stop working I am trying to find out why here is an example of what returns blank headers.
echo $_SERVER['HTTP_USER_AGENT']; echo $_SERVER['HTTP_EVE_TRUSTED']; echo $_SERVER['HTTP_EVE_SOLARSYSTEMNAME']; echo $_SERVER['HTTP_EVE_CHARNAME']; echo $_SERVER['HTTP_EVE_ALLIANCENAME']; echo $_SERVER['HTTP_EVE_SHIPTYPENAME']; echo $_SERVER['HTTP_EVE_CHARID']; echo $_SERVER['HTTP_EVE_CORPNAME']; echo $_SERVER['HTTP_EVE_CORPID']; echo $_SERVER['HTTP_EVE_REGIONNAME']; echo $_SERVER['HTTP_EVE_STATIONNAME'];
The only one returning any data is the user agent, but yesterday even that was returning blank. |

Steve Ronuken
Fuzzwork Enterprises
1535
|
Posted - 2013.06.19 15:41:00 -
[5] - Quote
GoDaddy have probably updated the webserver.
try:
$headers = apache_request_headers(); echo $headers['HTTP_EVE_CHARID'];
Steve Ronuken for CSM 9!-á I'm starting early :) Handy tools and an SDE conversion Twitter: @fuzzysteve on Twitter |

Coryigon
Mom 'n' Pop Ammo Shoppe R.E.P.O.
0
|
Posted - 2013.06.19 15:54:00 -
[6] - Quote
Fatal error: Call to undefined function apache_request_headers() |

Manhim
Cyan Ventures
2
|
Posted - 2013.06.19 16:17:00 -
[7] - Quote
Try with http_get_request_headers()
From the comments on the PHP page: "Keep in mind that this function replaces all "_" characters by "-" in headers names". |

Coryigon
Mom 'n' Pop Ammo Shoppe R.E.P.O.
0
|
Posted - 2013.06.19 16:23:00 -
[8] - Quote
Fatal error: Call to undefined function http_get_request_headers() |

Manhim
Cyan Ventures
2
|
Posted - 2013.06.19 16:35:00 -
[9] - Quote
Well, all I can say is that GoDaddy offers crap hosting. I would've proposed to host you on my server, but I usually host enterprise-level and not really small customers. |

Coryigon
Mom 'n' Pop Ammo Shoppe R.E.P.O.
0
|
Posted - 2013.06.19 17:03:00 -
[10] - Quote
Well like I said its always worked until yesterday, they changed something I am trying to find out what with their support. |

Coryigon
Mom 'n' Pop Ammo Shoppe R.E.P.O.
0
|
Posted - 2013.06.19 20:05:00 -
[11] - Quote
Ok, they have upgraded to apache 2.4 aparently, now what can I do to get these headers back?
|

Draugo Rana
Masuat'aa Matari Ushra'Khan
3
|
Posted - 2013.06.19 21:29:00 -
[12] - Quote
Coryigon wrote:Ok, they have upgraded to apache 2.4 aparently, now what can I do to get these headers back?
Take a look at the link that was provided earlier: http://php.net/manual/en/function.apache-request-headers.php
According to the docs this function exists if PHP is running as an Apache module or if it's PHP 5.4.0 or above. It is probably neither in your case (output phpinfo() to make sure)
Another solution could be to change Apache config to allow these headers (they are not allowed by default in Apache 2.4 because of the underscores in them, blame CCP for using not supported header characters). But you probably don't have access to Apache config in shared hosting.
Best solution overall - ditch GoDaddy, nobody should voluntarily use them anyway.
Masuat'aa Matari is recruiting Minmatar freedom fighters: https://forums.eveonline.com/default.aspx?g=posts&m=3216938 |

Ultran
Sideways 8 Collective
0
|
Posted - 2013.08.01 20:14:00 -
[13] - Quote
That makes me sad. I'm running into the same challenges today on shared Linux GoDaddy hosting while building a new web tool.
It's definitely not GoDaddy's fault for keeping their servers up-to-date.
Now to see if there's a work-around somewhere...
 |

Steve Ronuken
Fuzzwork Enterprises
1768
|
Posted - 2013.08.01 20:27:00 -
[14] - Quote
Ultran wrote:That makes me sad. I'm running into the same challenges today on shared Linux GoDaddy hosting while building a new web tool. It's definitely not GoDaddy's fault for keeping their servers up-to-date. Now to see if there's a work-around somewhere... 
As long as it's an embedded php, then apache_request_headers() is your friend here.
http://pastebin.com/Tmd3i4V3 is an example of how to use it. First printing all the headers, then just the EVE_TRUSTED header Steve Ronuken for CSM 9!-á I'm starting early :) Handy tools and an SDE conversion Twitter: @fuzzysteve on Twitter |

Ultran
Sideways 8 Collective
0
|
Posted - 2013.08.01 20:34:00 -
[15] - Quote
Here's the challenge:
Quote:Fatal error: Call to undefined function apache_request_headers()
It works great in my local test environment. If I call any of the apache related functions in my shared hosting, it gets mad. :(
If I print all my headers, all the EVE ones are missing:
|

Steve Ronuken
Fuzzwork Enterprises
1768
|
Posted - 2013.08.01 20:43:00 -
[16] - Quote
Ultran wrote:Here's the challenge: Quote:Fatal error: Call to undefined function apache_request_headers() It works great in my local test environment. If I call any of the apache related functions in my shared hosting, it gets mad. :( If I print all my headers, all the EVE ones are missing:
apache_request_headers depends on php being built into apache. If it's being managed through something like like fastcgi, through PHP FPM, it's not available, and you'll get that kind of error. Which means, unfortunately, you're out of luck. They're not available to you.
If you have access to .htaccess, you may be able to use https://httpd.apache.org/docs/trunk/env.html#fixheader Steve Ronuken for CSM 9!-á I'm starting early :) Handy tools and an SDE conversion Twitter: @fuzzysteve on Twitter |

Ultran
Sideways 8 Collective
0
|
Posted - 2013.08.01 21:03:00 -
[17] - Quote
Steve, Thanks for the feedback. I haven't had success with the .htaccess option yet, but I gave you a "like" anyway as it opened a new door of clues to look into. I'll post if I can get something working. :) |

Ultran
Sideways 8 Collective
0
|
Posted - 2013.08.01 22:17:00 -
[18] - Quote
========== SOLUTION!! ==========
If you are on GoDaddy shared hosting with Apache 2.4+ (or maybe some other shared solution with .htaccess support and mod_setenvif enabled and Apache 2.4+ and apache_request_headers() useless), here's how to make things normal* again so that you can access in-game variables with $_SERVER['HTTP_EVE_CHARNAME'], etc.:
Create a .htaccess file or add this to the top of your existing .htaccess file, placed in the root directory or same folder where all the EVE action happens on your site:
Quote:SetEnvIfNoCase EVE_TRUSTED "(.*)" HTTP_EVE_TRUSTED=$1 SetEnvIfNoCase EVE_SERVERIP "(.*)" HTTP_EVE_SERVERIP=$1 SetEnvIfNoCase EVE_CHARNAME "(.*)" HTTP_EVE_CHARNAME=$1 SetEnvIfNoCase EVE_CHARID "(.*)" HTTP_EVE_CHARID=$1 SetEnvIfNoCase EVE_CORPNAME "(.*)" HTTP_EVE_CORPNAME=$1 SetEnvIfNoCase EVE_CORPID "(.*)" HTTP_EVE_CORPID=$1 SetEnvIfNoCase EVE_ALLIANCENAME "(.*)" HTTP_EVE_ALLIANCENAME=$1 SetEnvIfNoCase EVE_ALLIANCEID "(.*)" HTTP_EVE_ALLIANCEID=$1 SetEnvIfNoCase EVE_REGIONNAME "(.*)" HTTP_EVE_REGIONNAME=$1 SetEnvIfNoCase EVE_CONSTELLATIONNAME "(.*)" HTTP_EVE_CONSTELLATIONNAME=$1 SetEnvIfNoCase EVE_SOLARSYSTEMNAME "(.*)" HTTP_EVE_SOLARSYSTEMNAME=$1 SetEnvIfNoCase EVE_STATIONNAME "(.*)" HTTP_EVE_STATIONNAME=$1 SetEnvIfNoCase EVE_STATIONID "(.*)" HTTP_EVE_STATIONID=$1 SetEnvIfNoCase EVE_CORPROLE "(.*)" HTTP_EVE_CORPROLE=$1 SetEnvIfNoCase EVE_SOLARSYSTEMID "(.*)" HTTP_EVE_SOLARSYSTEMID=$1 SetEnvIfNoCase EVE_WARFACTIONID "(.*)" HTTP_EVE_WARFACTIONID=$1 SetEnvIfNoCase EVE_SHIPID "(.*)" HTTP_EVE_SHIPID=$1 SetEnvIfNoCase EVE_SHIPNAME "(.*)" HTTP_EVE_SHIPNAME=$1 SetEnvIfNoCase EVE_SHIPTYPEID "(.*)" HTTP_EVE_SHIPTYPEID=$1 SetEnvIfNoCase EVE_SHIPTYPENAME "(.*)" HTTP_EVE_SHIPTYPENAME=$1 Those headers exist, but get stripped by Apache 2.4+ for security reasons because Eve Online in-game headers are invalid with the underscores (Bad CCP! Bad! Use "-" instead of "_"). 
*normal: With this .htaccess in place, all server variables like $_SERVER['HTTP_EVE_CHARNAME'] will always exist, but will always be blank or null if not trusted.
I feel kind of left out with 0 likes. Can I get a like if that helps?  |
| |
|
| Pages: 1 :: [one page] |