CMS Portal Communication Problem

cravaus wrote on Monday, August 10, 2015:

All appears to be set up as per the demo on my side. I have filled out demographic and insurance forms and sent then. They post to the wordpress database. I have looked at the form data and see it has all been stored correctly. In OpenEMR the CMS Portal appears to be up with the credentials I have added to globals. I see the the menu

In Apache Log:
[Sun Aug 09 15:30:29 2015] [error] [client 96.251.123.138] PHP Warning: Variable passed to each() is not an array or object in /volume1/homes/[User]/www/openemr/interface/cmsportal/list_requests.php on line 254, referer: https://www.[MYWEBSITE].com/~[USER]/openemr/interface/cmsportal/list_requests.php
[Sun Aug 09 15:30:29 2015] [error] [client 96.251.123.138] PHP Warning: Variable passed to each() is not an array or object in /volume1/homes/[USER]/www/openemr/interface/cmsportal/list_requests.php on line 255, referer: https://www.[MYWEBSITE].com/~[USER]/openemr/interface/cmsportal/list_requests.php

items at list_requests.php lines 254 and 255 are:
$v1 = each($result[‘list’]);
$v2 = each($result[‘messages’]);

adding debug code
ini_set(‘display_errors’, ‘On’);
error_reporting(E_ALL | E_STRICT);
into interface/cmsportal/portal.inc.php
produces this in addition to the above errors:

Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /volume1/homes/[USER]/www/openemr/library/adodb/drivers/adodb-mysql.inc.php on line 383
Notice: unserialize(): Error at offset 0 of 485 bytes in /volume1/homes/[USER]/www/openemr/interface/cmsportal/portal.inc.php on line 45

Line 45 is (or 42-46) is:
}
curl_close($phandle);
// With JSON-over-HTTP we would use json_decode($presult,TRUE) here.
return unserialize($presult);
}

I am not sure what is happening here. Any ideas?

cravaus wrote on Tuesday, August 11, 2015:

What I am understanding is that for somereason, the string is not unserialized. I think that means something similar to the data not being parsed out. It appears that the string is comming to my server but apparently not delimmitted? I think serialization is different but am I on the right track?

sunsetsystems wrote on Tuesday, August 11, 2015:

If unserialize() is failing then something weird is happening. You might add some debug code to webserve.php that will unserialize() on the Wordpress side (just before transmitting) and see if it works there. Then add debug code in portal.inc.php to make sure the same serialized string is received as was transmitted.

Rod
http://www.sunsetsystems.com/

cravaus wrote on Wednesday, August 12, 2015:

Great, I will do that. The CMS Portal looks like a very nice solution. Thanks Rod for puttting it out there.

cravaus wrote on Thursday, August 13, 2015:

I think the problem is that I have moved my website to a proxy. I think the problem is in the apache config item in the instructions:

 <Directory "/var/www/wp-content/uploads/ninja-forms"> 
     AllowOverride None 
     Order deny,allow 
     Deny from all 
 </Directory> 

In my website the path to ninga forms is:

/var/services/web/MYWEBSITE/portal/wp-content/plugins/ninja-forms/

Mofifying the instructions with this path in Apache config is not suffficient and produces the “client denied by server configuration” error.

I am not sure how to handle this with a proxy server.

My proxy config is simple:

<VirtualHost *:443>
ServerName www.MYWEBSITE.com
DocumentRoot "/var/services/web/MYWEBSITE"
ErrorDocument 403 "/webdefault/error.html"
ErrorDocument 404 "/webdefault/error.html"
ErrorDocument 500 "/webdefault/error.html"
SSLEngine on
</VirtualHost>

I likely need to add lines here. Just adding the directory under SSL Engine on does not work. As I look on the web most tips I get are to change the “Deny from all” line which would defete the purpose (I think). Any tips?