The PHP code was not modified. Apparently, the server throws the 502 error because of the header even before the PHP script begins execution.
I am currently trying to manually recreate the activation process and am having some difficulty in using the RegisterPub script. For example, if I get the following from the activation server:
Which of these should be passed on to RegisterPub? Also, is the first parameter of RegisterPub the name of the certificate I am trying to register? I am trying with RegisterPub(“Registered”, “Name Surname”, “Company”, “8036024463”); but it does not seem to work.
EDIT: I have figured it out - RegisterPub does not take information about which certificate you are trying to register. Proper use seems to be: RegisterPub(“Name Surname”, “Company”, “”, “8036024463”);