cron errors

set my cron job up like this....

*  *  *  *  *   /var/www/vhosts/manserver.co.uk/httpdocs/periodic/cron.php is there something missing here or coded wrong?  Its on a share managed server running plesk 9.5

 

It is right saying you dont need to edit

/periodic/cron.php at all?

 

and it keeps email me every minute with this.

 

/var/www/vhosts/[webaddress].co.uk/httpdocs/periodic/cron.php: line 1: ?php: No such file or directory
/var/www/vhosts/ [webaddress].co.uk /httpdocs/periodic/cron.php: line 2: /00_asl_whitelist.conf: Permission denied
/var/www/vhosts/ [webaddress].co.uk /httpdocs/periodic/cron.php: line 3: anon_ftp: command not found
/var/www/vhosts/ [webaddress].co.uk /httpdocs/periodic/cron.php: line 4: anon_ftp: command not found
/var/www/vhosts/ [webaddress].co.uk /httpdocs/periodic/cron.php: line 5: anon_ftp: command not found
/var/www/vhosts/ [webaddress].co.uk /httpdocs/periodic/cron.php: line 6: syntax error near unexpected token `('
/var/www/vhosts/ [webaddress].co.uk /httpdocs/periodic/cron.php: line 6: `*     copyright            : (C) 2006 BoonEx Group'


The web site address has only been remove as it's a 18+ site  give me a shout if anyone needs to see it running



Thank you for help in advance

Quote · 19 Apr 2012

Make sure the VERY 1st line of your cron is <?php

 

I am thinking you are missing the <

 

 

Or find the cron.php from the original archive and replace yours

http://www.mytikibar.com
Quote · 20 Apr 2012

this ones a new install so it is already, i will paste it all below.

 

<?php

/***************************************************************************

*                            Dolphin Smart Community Builder

*                              -----------------

*     begin                : Mon Mar 23 2006

*     copyright            : (C) 2006 BoonEx Group

*     website              : http://www.boonex.com/

* This file is part of Dolphin - Smart Community Builder

*

* Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License. 

* http://creativecommons.org/licenses/by/3.0/

*

* Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;

* without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

* See the Creative Commons Attribution 3.0 License for more details. 

* You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin, 

* see license.txt file; if not, write to marketing@boonex.com

***************************************************************************/

 

$GLOBALS['bx_profiler_disable'] = true;

define('BX_DOL_CRON_EXECUTE', '1');

 

$aPathInfo = pathinfo(__FILE__);

require_once ($aPathInfo['dirname'] . '/../inc/header.inc.php');

require_once(BX_DIRECTORY_PATH_INC . 'utils.inc.php');

require_once(BX_DIRECTORY_PATH_INC . 'profiles.inc.php' );

require_once(BX_DIRECTORY_PATH_CLASSES . 'BxDolDb.php');

 

 

function getRange($iLow, $iHigh, $iStep)

{

    $aResult = array();

    for ($i = $iLow; $i <= $iHigh && $iStep; $i += $iStep)

        $aResult[] = $i;

    return $aResult;

}

 

function getPeriod($sPeriod, $iLow, $iHigh)

{

    $aRes = array();

    $iStep = 1;

    $sErr = '';

    

    do 

    {

        if ('' === $sPeriod)

        {

            $sErr = 'Variable sPeriod is emply';

            break;

        }

        

        $aParam = explode('/', $sPeriod);

        

        if (count($aParam) > 2)

        {

            $sErr = 'Error of format for string assigning period';

            break;

        }

            

        if (count($aParam) == 2 && is_numeric($aParam[1]))

            $iStep = $aParam[1];

            

        $sPeriod = $aParam[0];

        

        if ($sPeriod != '*')

        {

            $aParam = explode('-', $sPeriod);

            

            if (count($aParam) > 2)

            {

                $sErr = 'Error of format for string assigning period';

                break;

            }

            

            if (count($aParam) == 2)

                $aRes = getRange($aParam[0], $aParam[1], $iStep);

            else 

                $aRes = explode(',', $sPeriod);

        }

        else 

            $aRes = getRange($iLow, $iHigh, $iStep);

    }

    while(false);

    

    if ($sErr)

    {

        // show error or add to log

    }

    

    return $aRes;

}

 

function checkCronJob($sPeriods, $aDate = array())

{

    $aParam = explode(' ', preg_replace("{ +}", ' ', trim($sPeriods)));

    $bRes = true;

 

    if(empty($aDate))

    $aDate = getdate(time());

 

    for ($i = 0; $i < count($aParam); $i++)

    {

        switch ($i)

        {

            case 0:

                $aRes = getPeriod($aParam[$i], 0, 59);

                $bRes = in_array($aDate['minutes'], $aRes); 

                break;

            case 1:

                $aRes = getPeriod($aParam[$i], 0, 23);

                $bRes = in_array($aDate['hours'], $aRes); 

                break;

            case 2:

                $aRes = getPeriod($aParam[$i], 1, 31);

                $bRes = in_array($aDate['mday'], $aRes); 

                break;

            case 3:

                $aRes = getPeriod($aParam[$i], 1, 12);

                $bRes = in_array($aDate['mon'], $aRes); 

                break;

            case 4:

                $aRes = getPeriod($aParam[$i], 0, 6);

                $bRes = in_array($aDate['wday'], $aRes); 

                break;

        }

        

        if (!$bRes)

            break;

    }

    

    return $bRes;

}

 

function runJob($aJob)

{

    if(!empty($aJob['file']) && !empty($aJob['class']) && file_exists(BX_DIRECTORY_PATH_ROOT . $aJob['file'])) {

        if(!class_exists($aJob['class']))

            require_once(BX_DIRECTORY_PATH_ROOT . $aJob['file']);

        

        $oHandler = new $aJob['class']();

        $oHandler->processing();

    }

    else if(!empty($aJob['eval'])) {

        require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDolService.php');

        eval($aJob['eval']);

    }

}

 

$oDb = new BxDolDb();

$aJobs = $oDb->fromCache('sys_cron_jobs', 'getAll', 'SELECT * FROM `sys_cron_jobs`');

 

$aDate = getdate(time());

 

foreach($aJobs as $aRow) {

    if (checkCronJob($aRow['time'], $aDate))

        runJob($aRow);

}

 

?>

 
Quote · 20 Apr 2012

The cron command is not entered properly on your server.

Please address to these instructions:
http://www.boonex.com/trac/dolphin/wiki/DetailedInstall#InstallScript-Step5-CronJobs

Quote · 29 Apr 2012

"Hint: The above lines serve as an example. The actual Cron Job commands are generated by the script at 6th step of the installation process. And you can easily copy&paste them into the "crontab" file."

I copied it just as it said in stage 6 of the install. Cool

Quote · 6 May 2012

Dont edit the cron.php.

 

Looking at your cron command:

*  *  *  *  *   /var/www/vhosts/manserver.co.uk/httpdocs/periodic/cron.php

 

I do not see the call to PHP (in red) needed before it. For example ONLY:

*  *  *  *  * /user/locan/bin/php -q /var/www/vhosts/manserver.co.uk/httpdocs/periodic/cron.php

Nothing to see here
Quote · 7 May 2012

You add that at the front and it sends you an email with:

 

/bin/sh: /user/locan/bin/php: No such file or directory

Quote · 14 May 2012

 

You add that at the front and it sends you an email with:

 

/bin/sh: /user/locan/bin/php: No such file or directory

 Thats why I said 'For Example ONLY'. The real path to PHP may be different. The point was, that the call to PHP was missing from the cron job.

 

Also, there is a typo in my cron statement above. /locan/ should be /local/.

 

If you look in the header.inc.php file, you will see the actual path to PHP.

Nothing to see here
Quote · 14 May 2012

OK now this has lost me totally, i do have a support ticket logged for it as well and they have access to log in to my server as well.

 

I did the typo there because you did Sealed I seen it and typed it that way anyway Embarassed

 

I copied it in just as it said in the stage 6 of the install

Quote · 16 May 2012
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.