Failed to Create Portal User

[b]Hello

Just getting around to installing the portal functionality. I am now recieving the Failed to Create Portal User message. I am using Ubuntu 12.04 PHP5.3 Joomla 3.2.2. Apache error below on the CRM server. Any help would be awesome!
[/b]

[Tue Feb 11 10:16:14 2014] [error] [client IP] PHP Warning: file_get_contents(http://JOOMLAURL/index.php?option=com_advancedopenportal&task=create&sug=c090b4ab-c9f2-d6c0-426b-4f96cef3776a): failed to open stream: HTTP request failed! HTTP/1.0 500 Internal Server Error\r\n in /var/www/CRMURL/custom/modules/Contacts/createPortalUser.php on line 35, referer: http://CRMURL/index.php?module=Contacts&action=DetailView&record=c090b4ab-c9f2-d6c0-426b-4f96cef3776a

[b]I have tried using both http and https on the CRM server using

createPortalUser.php unchanged below. Is there something wrong with line 35???[/b]

if(!defined(‘sugarEntry’))define(‘sugarEntry’, true);

global $sugar_config, $mod_strings;

require_once(‘modules/Contacts/Contact.php’);

$bean = new Contact();
$bean->retrieve($_REQUEST[‘record’]);

if(array_key_exists(“aop”,$sugar_config) && array_key_exists(“joomla_url”,$sugar_config[‘aop’])){
$portalURL = $sugar_config[‘aop’][‘joomla_url’];
$wbsv = file_get_contents($portalURL.’/index.php?option=com_advancedopenportal&task=create&sug=’.$_REQUEST['re$
$res = json_decode($wbsv);
if(!$res->success){
$msg = $res->error ? $res->error : $mod_strings[‘LBL_CREATE_PORTAL_USER_FAILED’];
SugarApplication::appendErrorMessage($msg);
}else{
SugarApplication::appendErrorMessage($mod_strings[‘LBL_CREATE_PORTAL_USER_SUCCESS’]);
}
}else{
SugarApplication::appendErrorMessage($mod_strings[‘LBL_NO_JOOMLA_URL’]);
}

SugarApplication::redirect(“index.php?module=Contacts&action=DetailView&record=”.$_REQUEST[‘record’]);

Hi nbouwsma,

Have you configured the AOP settings correctly in SugarCRM? Did the Joomla plugin install without error?

Thanks,

Will.

Everything looks okay on the Portal config (tried IP and HostA) in CRM and the Joomla plugin installed perfectly. Configured Joomla as instructed and set the entire webroot on both platforms to 777 for testing.

Joomla Server PHP Fatal Error

[Tue Feb 11 11:13:49 2014] [error] [client IP] PHP Fatal error: Call to undefined function curl_init() in /var/www/JOOMLAURL/components/com_advancedopenportal/sugarRestClient.php on line 82

sugarRestClient.php snippet

79 private function rest_request($call_name, $call_arguments) {
80
81 ob_start();
82 $ch = curl_init();

Yeah, I’m an idiot, Will… Didn’t have php5-curl installed on the joomla server…

Everything checks out good with the portal now except when a portal user responds. The system throws a bunch of code rather than refreshing back to the case. See below URL in address bar and code in the body of the page. Using Chrome as by browser.

http://JOOMLAURL/index.php/list-cases?option=com_advancedopenportal&task=addupdate&format=raw

{“id”:“cb1ebacb-6c36-4d40-5bc0-52fa51f2912a”,“name”:“Testing”,“date_entered_display”:“11/02/2014 16:36”,“date_entered”:“2014-02-11 16:36:04”,“date_modified_display”:“11/02/2014 16:36”,“date_modified”:“2014-02-11 16:36:04”,“description”:“Testing”,“contact_id”:“2e6657bb-202b-319d-0526-52fa4aa54680”,“internal”:"",“assigned_user_id”:"",“contact”:[{“id”:“2e6657bb-202b-319d-0526-52fa4aa54680”,“first_name”:“Nate”,“last_name”:“Test”,“date_entered”:“2014-02-11 16:06:05”,“date_modified”:“2014-02-11 16:23:04”,“description”:"",“type”:“contact”}],“poster”:{“id”:“2e6657bb-202b-319d-0526-52fa4aa54680”,“first_name”:“Nate”,“last_name”:“Test”,“date_entered”:“2014-02-11 16:06:05”,“date_modified”:“2014-02-11 16:23:04”,“description”:"",“type”:“contact”}}

Found this and will try it out.

http://suitecrm.com/forum/suitecrm-7-0-discussion/415-replying-to-a-case-through-portal-shows-raw-data#1682

That article sorted me out.