Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix rc_sms_notification.php #11

Open
tywrenn opened this issue Feb 27, 2020 · 6 comments
Open

Fix rc_sms_notification.php #11

tywrenn opened this issue Feb 27, 2020 · 6 comments

Comments

@tywrenn
Copy link

tywrenn commented Feb 27, 2020

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
Copy link
Member

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

@bradymiller
Copy link
Member

bradymiller commented Feb 28, 2020

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
Copy link
Author

tywrenn commented Jun 18, 2020

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

@sjpadgett
Copy link
Member

$_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
Copy link
Author

tywrenn commented Jun 18, 2020

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

@sjpadgett
Copy link
Member

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));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants