Jump to content

Recommended Posts

Hi all,

 

I have a simple code that override some env vars but i need it to run before any other php code on every php execution.

I would like to avoid any change of all php code (even if its only to include the include command).

 

Any one knows of such way ?

 

I dont mind overriding this vars on php configuration file but i dont have any control of it as its should work on even the most strict web hosting (that still allow env vars manipulation)

 

Any alternatives ?

 

Thanks,

 

TL

OK, so i might have been misunderstood.

 

The problem that i faced with is as follow:

 

1.There is a hardware that manipulates some of HTTP core information such as the client's IP address.

  I know that this hardware is not unique and there are even cloud base services that do this.

2. the real information (the real IP of the client on my example) is stored on the HTTP header

3. i need to override some $ENVs (e.g. $_ENV["REMOTE_ADDR"] and $_SERVER["REMOTE_ADDR"])

4. because those vars are "re-generated" on each php execution i would like that my code that "fix" the information to be executed before any other code.

 

I hope that this clear my problem  and that someone will guide me of the right way to overcome it

 

Thanks

 

TL

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.