session_open() works, but the SID is null

Discussion in 'Troubleshooting' started by Sapha, Feb 5, 2015.

  1. Sapha

    Sapha Bit Poster

    Messages:
    5
    Hi all,
    I use the PBAs API to get informations about hosting plans and prices.

    My PHP script always worked fine, but now I've got this result when calling the session_open() method:

    var_dump($result);
    //prints this:

    array(2) {
    ["session_id"]=>
    NULL
    ["account_id"]=>
    int(1)
    }​

    I don't get a login error, but the session_id is missing... Why?

    Please help! :)

    Thanks
    Sapha
     
  2. FedorK

    FedorK Mega Poster

    Messages:
    224
    It is recomend that you use authorization by authkey and not use email and password authorization.

    But if you still need password authorization:
    This action only for 4.5.3-30 version. If you have other version please contact support.
    Please do following:
    REdownload PBAS distributive from parallels site and run following:
    tar -xf pbas-4.5.3-30.PLATFORM.tar
    cd pbas-4.5.3-30/packages
    rpm -Uhv perllib-4.5.3-30.swsoft.PLATFORM.rpm --force
    service hspcd restart
    This action only for 4.5.3-30 version. If you have other version please contact support.
     
  3. Sapha

    Sapha Bit Poster

    Messages:
    5
    Thanks Fedor,
    yes, my version is 4.5.3-30.

    I only need to call the APIs from a remote machine and according to the API manual, this can be done only by providing email and password.

    I can't find any auth key in the manual, are you talking about the https authentication?
    This means that I don't have to pass email and pw to the session_open() method?

    Thanks
     
  4. FedorK

    FedorK Mega Poster

    Messages:
    224
    You need create secure key in Commerce Director > Store Manager >
    [​IMG]Configure Store > Security Settings

    and then call session_open with server_name and secure_key parameters.
     
  5. Sapha

    Sapha Bit Poster

    Messages:
    5
    Thanks, now it's working!

    I can't find the secure_key parameter in the SDK manual (Release 4.5. Revision 1.17, page 16)... It's not updated?
     
  6. FedorK

    FedorK Mega Poster

    Messages:
    224
    Yes it is not updated. We update it soon.
     

Share This Page