Skip to content

When running on 32 bit versions of PHP, intval does not correctly convert micros for start and end time. #55

Description

@BackTrak

Because the library does not check the return result from the LightStep report API, it does not give any indication that LightStep is rejecting messages from 32 bit PHP with a "can't decode value" error due to the timestamps for the micros values being negative numbers because 32 bit PHP cannot correctly convert the long micros values using only 4 bytes. It would be nice if the module would throw an exception at initialization if it is not being used on a 64 bit platform to give users a clue on why their tracing is not arriving at the server. Detecting 64 bit-ness is easily done with this check:

function is64bitPHP() {
    return PHP_INT_SIZE == 8;
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions