openemr / oe-module-faxsms

Fax and SMS feature for OpenEMR
3 stars 6 forks source link

Fix rc_sms_notification.php #11

Open tywrenn opened 4 years ago

tywrenn commented 4 years ago

This file can't be run through cron at the moment. To fix I added the following lines: $ignoreAuth = 1; $_SERVER[‘HTTP_HOST’] = ‘localhost’;

bradymiller commented 4 years ago

Just ensure that the $ignoreAuth flag is placed within the cli if code block (so that non-cli use still requires authentication)

bradymiller commented 4 years ago

Just took a look at that code. Should wrap the entire cli specific code block that is near top within the following if block:

if (php_sapi_name() === 'cli') {
...
}
tywrenn commented 4 years ago

This is still broken -- specifically this line: $_SERVER[‘HTTP_HOST’] = ‘localhost’; needs to be changed to: $_SERVER['HTTP_HOST'] = 'localhost';

sjpadgett commented 4 years ago

$_SERVER[‘HTTP_HOST’] = ‘localhost’; needs to be changed to: $_SERVER['HTTP_HOST'] = 'localhost';

lol. i've looked at this a hundred times, umm what's the difference. I added this how you asked after testing in your clinic.

tywrenn commented 4 years ago

@sjpadgett quotation marks -- php errored on my end with those -- woops

sjpadgett commented 4 years ago

Okay make ya a deal. You fix in 6.0 and i'll do 5.0.2 for patch 4. I'm in the middle of 5.0.2 fixes now. Also while doing this fix, could you go ahead and fix the portal button hide fix I did for 5.0.2 in main.php? L-118 or near should be let enable = ((1 * mail) + (1 * audits));