I write curl php script which work is download csv file from one website after succesfully loged in. It works fine when i start it in my browser but it fails when i put it on cron jobs list. I seen memory exhausted error in my log once, so i guess my server give me less memory for cron.
When I execute it from the browser, it works fine. However, when I try to execute it as a cron job the Curl part won't work. The rest of the script works even as a cron job, as I receive the confirmation email at the end.
DOWNLOAD >>> https://t.co/EKGD6HX0Hv
Update 2: Adding -dsafe_mode=Off while running via shell make the script run fine. However adding the same flag to the cron entry didn't do anything. So I still need to figure out how to make it work from cron.
If you are using php command to call the script you can try to call the script (url) using wget comand it should be more similar to calling it trough browser. Some aditional info could be found here -wget-to-run-a-cronjob-php
I have a crontab pointing to an sh every */2 minutes. The sh executes a php with a curl call to cron.php?cron_key=CRON-KEY. It was working perfectly some weeks ago. Suddenly, it has stopped working. When I launch the same cron.php address by browser, it works perfectly, executes the cron with all the scheduled tasks in order as defined by Elysia config.
But when the same cron.php is called via the SSH php (console or just through the cron daemon), it does not work. It gives no error or hint, just does not do anything. I have tested curl in the same domain, with GET parameters, to a different php file, and it is working. I have no idea what can be happening, I have re-installed Elysia cron, and the same results. I cannot understand why Drupal knows that the script is called via a non-browser script and why it stops working.
I have wrestled for a long while with a problem that has plagued many people. Just witness the number of postings with problems about how to run CRON on this or that web host system. Does the system allow wget or lynx? Does it support running PHP from the cron tab in cpanel? You have to run cron from a browser, need to use 'curl' and what does that mean?
Note
Executing cron.php from a web browser is not possible if the /crons directory is not inside a web-accessible directory. It will be subject to limitations that apply to executing any PHP script via a web browser such as, timeouts and won't provide any output on screen to examine (the execution must be observed from the Activity Log). Where possible, executing cron.php from your server's command line interface is the recommended troubleshooting method.
It is not designed to be run from a normal web browser, but from an unattended cron script, utilizing wget or cron as a means of accessing the function.
The same API call works fine when I go via browser to the Camunda cockpit, logged in as demo/demo: I can see in my browser developer tools / network tab, that the very same API call is also being made from the cockpit successfully there.
Emulate a fill-in form with -F. Let's say you fill in three fields in a form. One field is a file name which to post, one field is your name and one field is a file description. We want to post the file we have written named cooltext.txt. To let curl do the posting of this data instead of your favorite browser, you have to read the HTML source of the form page and find the names of the input fields. In our example, the input field names are file, yourname and filedescription.
df19127ead