Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Frank Bueltge

    (@bueltge)

    I mean the server os, right. But maybe the check is not fine enough for Centos. I will check this, create a issue.
    https://github.com/bueltge/Debug-Objects/issues/45

    Plugin Author Frank Bueltge

    (@bueltge)

    Can you debug for the value $_SERVER[ 'HTTP_USER_AGENT' ].
    I check currently this variable and check then '=WIN=', '=NT= and so on.

    Thread Starter violacase

    (@violacase)

    I just updated the plugin.
    $_SERVER[‘HTTP_USER_AGENT’] gives:
    Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.99 Safari/537.36

    So the problem is this global: it returns wrong info.
    I don’t mind btw, because I KNOW what server I’m using ??

    Plugin Author Frank Bueltge

    (@bueltge)

    But your return values is the point, it is a Windows system –> Windows NT 6.3

    Thread Starter violacase

    (@violacase)

    Not really…
    I’m working on a VPS holding many websites.
    I know the difference between WIN and Linux when I’m working with e.g. the terminal.
    This is the REAL configuration:

    Hostname keesdehaan.info
    OS CentOS 6.5 (Final)
    Plesk version 12.0.18 Update #32, last updated at Jan 23, 2015 03:31 AM

    Plugin Author Frank Bueltge

    (@bueltge)

    But how is it possible to get this data, the global $_SERVERhave other data?

    Thread Starter violacase

    (@violacase)

    I found that the global HTTP_USER_AGENT holds the OS info of the client, not the server.
    To get the server OS you can use the global PHP_OS or the function php_uname()
    Getting more detailed info on server OS is rather difficult because the version information is vendor specific.
    For your purpose I think just the common strings WIN, Linux, BSD, etc given by PHP_OS is good enough.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘OS version: ?’ is closed to new replies.