Monday, November 28, 2011

PHP SERVER or ENV Variables Vary Between CentOS and Ubuntu

These two systems running on the same version of Apache will have differences in there server variables. One particular example is the SCRIPT_URI which is only available in CentOS/RHEL. For this, you should make sure that when you use any of it, it is in both the systems. So for SCRIPT_URI, try using a fallback like REQUEST_URI which is available in both.

To check the server variables, in PHP do the following which prints the contents of the array stack of server variables,

print_r($_SERVER);


  • Related Links Widget for Blogspot

No comments: