[Vtigercrm-developers] Problems with workflow 6.2

Christophe Humbert chrissc.humbert at gmail.com
Wed Jul 1 12:10:33 GMT 2015


Hello Mariusz,

thanks for the tips.
What the true help to achieve in the code

I am not able to run any sh files fo I found a workaound I have created a
php file
#!/usr/local/bin/php
<?php
$url = 'https://www.lib-assur.com/vtiger/vtigercron.php';
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 0);
$data = curl_exec($ch);
curl_close($ch);
exit;
?>

so I go around the problem of error headers...and the page vtigercron is
acting like it was called from web so I just add to adjust the PHP_SAPI ===
'cli'to the paramter of my server and it works like a charm

Thanks for the help and tips to all

Kind Regards



Christophe Humbert



On Wed, Jul 1, 2015 at 10:54 AM, Mariusz Krzaczkowski <
m.krzaczkowski at yetiforce.com> wrote:

> Hi,
>
> There are two ways to run cron:
> *1. Run directly PHP file: vtigercron.php*
> But you need add in IF "*true &&*" e.x.
> if(*true &&* PHP_SAPI === "cli" ||
> (isset($_SESSION["authenticated_user_id"]) &&
> isset($_SESSION["app_unique_key"]) && $_SESSION["app_unique_key"] ==
> $application_unique_key)){
>
> But this method is not completely safe
>
> *2. Use the script SH: cron/vtigercron.sh*
> A few actions are required:
>
>    - Grant permissions 777 or 755 (cron/vtigercron.sh)
>    - Set the path to PHP e.x. export USE_PHP=php ,
>    USE_PHP=/usr/local/php53/bin/php
>    - Check whether PHP.ini configuration for CLI console is correct
>
> ---
>
> Z poważaniem / Regards
>
> *Mariusz Krzaczkowski*
> *Director of Product Development*
> M: +48 884-998-123
> E: m.krzaczkowski at yetiforce.com
> ------------------------------
>
> We created an innovative open source project called YetiForceCRM. You can
> test it here <https://test.yetiforce.com/>, download
> <https://github.com/YetiForceCompany/YetiForceCRM> it for free or read
> its documentation <https://yetiforce.com/en/documentation.html>. Follow
> us on Twitter <https://twitter.com/YetiForceEN> to get real-time info
> about new functionalities and articles.
>
>
>
> W dniu 2015-07-01 10:04, Alan Lord napisał(a):
>
> On 01/⁠07/⁠15 08:30, Christophe Humbert wrote:
>
> Hello Guys
>
> until now I was using a webcron to launch vtigercron.php but I would
> like ti use the cron of my shared hosting (no access to shell) and when
> I am launching the vtigercron.php through the cron I have the following
> : error reading from the headers  anyone an idea
>
>
> I would try and use the shell helper script rather than run php directly.
>
> So your cron entry looks like:
>
> */⁠15 * * * * sh /⁠path/⁠to/⁠vtiger/⁠cron/⁠vtigercron.sh
>
>
> <rant>
> Shared hosts are a complete PITA.
>
> Some shared hosts limit the version of the PHP cli your cron can access.
>
> Another thing we found with our GeoTools module on shared hosts can be
> that the cron jobs are limited to some arbitrary time and they can be
> terminated by the shared hosting engine (CPanel, Plesk or whatever) so be
> aware that if you have a long job (like an import or loads of
> emails/workflows) then the script might get killed prematurely.
> </⁠rant>
>
> Al
>
>
>
>
> _______________________________________________
> http://www.vtiger.com/
>
>
> _______________________________________________
> http://www.vtiger.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20150701/4301b490/attachment.html>


More information about the vtigercrm-developers mailing list