{"action":"created","issue":{"url":"https://api.github.com/repos/piersharding/php-sapnwrfc/issues/1","labels_url":"https://api.github.com/repos/piersharding/php-sapnwrfc/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/piersharding/php-sapnwrfc/issues/1/comments","events_url":"https://api.github.com/repos/piersharding/php-sapnwrfc/issues/1/events","html_url":"https://github.com/piersharding/php-sapnwrfc/issues/1","id":8170044,"number":1,"title":"Invalid parameter 'SAP_UC*' was passed to the API call","user":{"login":"rmyhren","id":2743108,"avatar_url":"https://avatars.githubusercontent.com/u/2743108?v=3","gravatar_id":"","url":"https://api.github.com/users/rmyhren","html_url":"https://github.com/rmyhren","followers_url":"https://api.github.com/users/rmyhren/followers","following_url":"https://api.github.com/users/rmyhren/following{/other_user}","gists_url":"https://api.github.com/users/rmyhren/gists{/gist_id}","starred_url":"https://api.github.com/users/rmyhren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmyhren/subscriptions","organizations_url":"https://api.github.com/users/rmyhren/orgs","repos_url":"https://api.github.com/users/rmyhren/repos","events_url":"https://api.github.com/users/rmyhren/events{/privacy}","received_events_url":"https://api.github.com/users/rmyhren/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2012-11-07T13:10:05Z","updated_at":"2015-07-02T13:14:22Z","closed_at":null,"body":"When calling get_sso_ticket(), it fails with reference to SAP_UC*.\r\ntry {\r\n        $conn = new sapnwrfc($config);\r\n        $ticket = $conn->get_sso_ticket();\r\n        echo \"ticket: $ticket \\n\";\r\n\r\nThe system is a Ubuntu 12.04 with UTF-8."},"comment":{"url":"https://api.github.com/repos/piersharding/php-sapnwrfc/issues/comments/118028398","html_url":"https://github.com/piersharding/php-sapnwrfc/issues/1#issuecomment-118028398","issue_url":"https://api.github.com/repos/piersharding/php-sapnwrfc/issues/1","id":118028398,"user":{"login":"themasch","id":170171,"avatar_url":"https://avatars.githubusercontent.com/u/170171?v=3","gravatar_id":"","url":"https://api.github.com/users/themasch","html_url":"https://github.com/themasch","followers_url":"https://api.github.com/users/themasch/followers","following_url":"https://api.github.com/users/themasch/following{/other_user}","gists_url":"https://api.github.com/users/themasch/gists{/gist_id}","starred_url":"https://api.github.com/users/themasch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/themasch/subscriptions","organizations_url":"https://api.github.com/users/themasch/orgs","repos_url":"https://api.github.com/users/themasch/repos","events_url":"https://api.github.com/users/themasch/events{/privacy}","received_events_url":"https://api.github.com/users/themasch/received_events","type":"User","site_admin":false},"created_at":"2015-07-02T13:14:22Z","updated_at":"2015-07-02T13:14:22Z","body":"From the SS02 Sample file: \r\n\r\n```\r\n/* Currently the only way to obtain an SSO2 (or assertion) ticket is, if the\r\n\tSAP backend gives you one... Therefore this program works as follows:\r\n\t1. The program starts an RFC server on the given RFC destination. Make sure that in\r\n\t   SM59 in the \"Security/Logon\" tab you activate the check box \"Send SAP Logon Ticket\".\r\n\t2. The program starts to listen for a call from the backend. Go to SE37, enter the\r\n\t   function module STFC_CONNECTION, enter the correct RFC destination and execute the\r\n\t   function module.\r\n\t3. In the implementing server function for STFC_CONNECTION, the program reads the SSO2\r\n\t   or assertion ticket from the backend system and uses it to log into that system.\r\n\tIf everything works correctly, you get a success message.\r\n\tThis program handles only one single function call and then exits.*/\r\n```\r\n\r\nAnd from the sample sapnwrfc.ini: \r\n```\r\n# GETSSO2   : Set this to 1, if the backend should generate an SSO2 ticket for your user.\r\n\t\t\tIf RfcOpenConnection() succeeds, you can retrieve the ticket with\r\n\t\t\tRfcGetPartnerSSOTicket() and use it for further logons to systems supporting\r\n\t\t\tthe same user base.\r\n\t\t!!! Note: No longer supported! SAP systems shall no longer issue tickets during user logon!!!\r\n```\r\n\r\n**TL;DR:** Getting a SSO2 token isn't easy anymore and I'd vote against implementing the hard war in php-sapnwrfc since it seems to involve a giant overhead (your client becomes a rfc server). \r\n\r\nOh, and the fix for the bug above is this: \r\n```\r\n\tunsigned length = 2048;\r\n\tSAP_UC * ssoTicket = (SAP_UC*)emalloc(2048);\r\n```"}}