I just did a test install of GoodNews (newsletter add-on) on a dev MODX Cloud but it seems there is no support for php exec commands. GoodNews uses multiprocessing for fast email sending so if one wants to use this feature, the provider needs to support exec. BTW, GoodNews has built in fallback for single processing, but email sending will be much slower…
Is it possible to activate/enable php exec for single clouds?
Yeah, I ran into the same thing. I sent a support request, and they basically said they wouldn’t turn it on for security reasons. I was using an exec-based line of code to create thumbnails from PDF files on other sites not in Cloud, which works great. I was forced to change that to use the glacially slow ImageMagick instead. Not exactly ideal.
Hi @gadgetto, @snowcreative is correct, MODX Cloud doesn’t have exec enabled. It is for security and integrity of sites. I am going to consult with my team to provide more detailed explanation.
Do you know if this would be the same if using an ESP via SMTP in MODX or if Good News doesn’t support ESPs via SMTP or API? The reason I ask is that bulk email from our public platform is something that is not considered acceptable use as it became a full-time job trying to maintain the IP reputation on our public platform—even from well-meaning users. And, if deliverability is of concern we strongly recommend a bulk Email ESP or one that can handle bulk email and other email types such as PostMark. Of course, you need to use an ESP that is in compliance with local privacy laws.
@gadgetto could you explain in a little more detail how you tested GoodNews? Did you set up a cron? We strongly recommend using cron to execute recurring PHP scripts and as far as I know GoodNews supports and is designed to use cron.
Could you share what the command is you would run to do the multi-process call?
@snowcreative. Have you tried this recently? Imagick is bound directly to
convert and should yield the same results provided you’re not trying to do it from the front end.
In terms of why no
exec(). On our legacy platforms, it was to workaround limitations of the machine’s operating system and the instance containers that were designed years ago. In order to prevent resource exhaustion on our public platforms we have kept it off for now. We do allow exec() on a case by case basis on our Private Platforms (among other custom configurations on those Private Platforms).
It could be possible for us to reconsider it, however, it’s not something that is quick to implement and we’d need to balance that with other projects and priorities. For most customers of MODX Cloud that have asked for
exec() we’ve been able to find a viable workaround in most cases.
Hey, you’re right! It’s really zippy now.
Yes, it uses cron. I have it set up that way on two of my sites, although neither is in MODX Cloud.
There’s a double advantage of using cron in that it run longer but it also doesn’t consume PHP web workers when it does run.
Exec is enabled in cron/CLI.
/home $ php
echo exec("echo hi");