# |
Sep 13th 2019, 08:38 |
conehead |
Well I might create an completely external script that uses exec |
# |
Sep 13th 2019, 08:37 |
admad |
yeah there are some shitty hosts which required URLs for cron jobs too |
# |
Sep 13th 2019, 08:35 |
conehead |
Well yes actually I can only call urls for cron jobs |
# |
Sep 13th 2019, 08:33 |
admad |
@info315 cpanel for e.g. can give access to cron jobs but not shell access :slightly_smiling_face: |
# |
Sep 13th 2019, 08:33 |
conehead |
I will just double check what I am allowed to do |
# |
Sep 13th 2019, 08:32 |
conehead |
Probably this wont work lol |
# |
Sep 13th 2019, 08:32 |
conehead |
ah well yes. |
# |
Sep 13th 2019, 08:32 |
info315 |
Didn't you say: >I can NOT create a command and call that via console. ^^ |
# |
Sep 13th 2019, 08:30 |
conehead |
https://book.cakephp.org/3.0/en/console-and-shells/cron-jobs.html#cron-jobs-on-shared-hosting ``` On some shared hostings cd /full/path/to/root andand bin/cake myshell myparam might not work. Instead you can use php /full/path/to/root/bin/cake.php myshell myparam. ``` |
# |
Sep 13th 2019, 08:30 |
conehead |
thank you but already found the answer |
# |
Sep 13th 2019, 08:30 |
conehead |
Ah |
# |
Sep 13th 2019, 08:29 |
info315 |
I guess adding Authentication Middleware and use the `Stateless Authenticators ` like an API key as HTTP Header or in the URL like `apikey=<key>` but this is only secure if HTTPS is used |
# |
Sep 13th 2019, 08:26 |
conehead |
I am looking for a safe way to realize this |
# |
Sep 13th 2019, 08:25 |
conehead |
I can NOT create a command and call that via console. Our host only allows to call URLs at given times |
# |
Sep 13th 2019, 08:25 |
conehead |
I need to send E-Mails daily at 8 am |
# |
Sep 13th 2019, 08:24 |
info315 |
@conehead What? |
# |
Sep 13th 2019, 08:20 |
conehead |
I have a few URLs that should only be called internally. Unfortunately I can not execute ssh commands, that is why I have to execute some commands via cronjob and call urls. What would be a nice way to realize this? |
# |
Sep 13th 2019, 08:11 |
javier.villanueva |
ok |
# |
Sep 13th 2019, 08:10 |
admad |
debug the entities |
# |
Sep 13th 2019, 08:10 |
admad |
if there are no exceptions it means validation / application rules failure |
# |
Sep 13th 2019, 08:10 |
javier.villanueva |
savemany returns false, but no errors in debug |
# |
Sep 13th 2019, 08:10 |
admad |
you have the query log in debugkit |
# |
Sep 13th 2019, 08:09 |
javier.villanueva |
I use saveMany to save any entities, but there are any problem.... Is there any log to see more info? |
# |
Sep 13th 2019, 08:09 |
birdy247 |
:slightly_smiling_face: |
# |
Sep 13th 2019, 08:09 |
admad |
i think of myself and simply mad |
# |
Sep 13th 2019, 08:08 |
birdy247 |
@admad Some would say you are a genious |
# |
Sep 13th 2019, 08:07 |
admad |
@birdy247 `$uri = $this->request->getUri()->withHost($newHost); return $this->redirect((string)$uri);` |
# |
Sep 13th 2019, 08:06 |
birdy247 |
parse_url($this->getRequest()->getUri()) |
# |
Sep 13th 2019, 08:04 |
birdy247 |
@admad this is waht I have decided. I was looking for a method on getRequest->getUri and couldnt find one |
# |
Sep 13th 2019, 08:04 |
admad |
you need parse_url() at best |
# |
Sep 13th 2019, 08:03 |
admad |
@birdy247 if all you need to do is change the host of the URL why do you need to bother with router? just use basic string manipulation |
# |
Sep 13th 2019, 07:53 |
challgren |
https://api.cakephp.org/3.8/class-Cake.Routing.Router.html#_url |
# |
Sep 13th 2019, 07:52 |
birdy247 |
but how would we rebuild the URL? |
# |
Sep 13th 2019, 07:52 |
birdy247 |
Yes |
# |
Sep 13th 2019, 07:52 |
challgren |
_host in the options |
# |
Sep 13th 2019, 07:52 |
birdy247 |
is there a way to simply set the host on a current route? |
# |
Sep 13th 2019, 07:51 |
challgren |
Cake specializes in magic! |
# |
Sep 13th 2019, 07:51 |
birdy247 |
When a user navigates to a given url, we want to keep the same URL but change the host |
# |
Sep 13th 2019, 07:51 |
birdy247 |
I am trying to do some redirect magic |
# |
Sep 13th 2019, 07:50 |
challgren |
Anyone have any good articles for running cake on EC2? |
# |
Sep 13th 2019, 07:49 |
birdy247 |
Morning |