Skip to content
Advertisement

How can I access Unique ID in apache?

How can I access the unique_id that apache tracks for each request? I’d like to track it in any php scripts it calls as well as have it logged for each request.

I remove comment on the following line from http.conf file:

JavaScript

and I am trying to reference the ID in this simple php script:

JavaScript

Yet this script returns only Hello World.

Is this possible to do? I’m running macos if that makes any difference.

A var_dump of $_SERVER is as follows:

JavaScript

Another problem I am having in the same area may point to the problem at hand: https://apple.stackexchange.com/questions/127801/where-are-the-apache-config-files-stored?noredirect=1#comment149749_127801

Advertisement

Answer

I had to do a /usr/sbin/httpd -k stop and then a /usr/sbin/httpd -k start to get the config to take. Unsure why sudo apachectl restart LOOKED like it was restarting, but it wasn’t….

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement