We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum

Forum

Thread tagged as: Error, Runway, Backup

perch runway backup

The perch backup seems to run when run manually. At least I get an .sql file in a zip file on my dropbox account. When run via a cron job I am getting an error:

PHP Fatal error:  Call to a member function getMetadata() on a non-object in /home/sbsportf/public_html/perch/addons/apps/perch_dropbox/DropboxStream.class.php on line 227

Fatal error: Call to a member function getMetadata() on a non-object in /home/sbsportf/public_html/perch/addons/apps/perch_dropbox/DropboxStream.class.php on line 227

Here is the command line being run with Cron:


/opt/php/php-5.4.0/bin/php -c /home/sbsportf/php.ini /home/sbsportf/public_html/perch/core/scheduled/run.php MpjASlIZzalRJlxz

Here is my debug message:


FAILED Backup plan_1 Task failed to complete, or is still running. 03 Aug 2015 17:00:01 Debug Message SELECT u.*, r.* FROM perch2_users u, perch2_user_roles r WHERE u.roleID=r.roleID AND u.userEnabled=1 AND u.userID=1 AND u.userHash='e4440756fafc2545fa87dd029ee08839' LIMIT 1 UPDATE perch2_users SET userHash='587ef7e6d9a3086f5274608743d01594' WHERE userID='1' SELECT p.privKey FROM perch2_user_privileges p SELECT * FROM (SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=1 OR userID=0 ORDER BY userID DESC) AS settings GROUP BY settingID SELECT collectionID, collectionKey FROM perch2_collections WHERE collectionInAppMenu=1 ORDER BY collectionOrder ASC SELECT * FROM perch2_scheduled_tasks WHERE 1=1 ORDER BY taskStartTime DESC LIMIT 20 Looking up missing property taskEndTime SELECT taskEndTime FROM perch2_scheduled_tasks WHERE taskID='143' Looking up missing property taskEndTime SELECT taskEndTime FROM perch2_scheduled_tasks WHERE taskID='142' Looking up missing property taskEndTime SELECT taskEndTime FROM perch2_scheduled_tasks WHERE taskID='141' Looking up missing property taskEndTime SELECT taskEndTime FROM perch2_scheduled_tasks WHERE taskID='140' Looking up missing property taskEndTime SELECT taskEndTime FROM perch2_scheduled_tasks WHERE taskID='139' Looking up missing property taskEndTime SELECT taskEndTime FROM perch2_scheduled_tasks WHERE taskID='138' Looking up missing property taskEndTime SELECT taskEndTime FROM perch2_scheduled_tasks WHERE taskID='137' Looking up missing property taskEndTime SELECT taskEndTime FROM perch2_scheduled_tasks WHERE taskID='136' Looking up missing property taskEndTime SELECT taskEndTime FROM perch2_scheduled_tasks WHERE taskID='135' Looking up missing property taskEndTime SELECT taskEndTime FROM perch2_scheduled_tasks WHERE taskID='134' Looking up missing property taskEndTime SELECT taskEndTime FROM perch2_scheduled_tasks WHERE taskID='133' Looking up missing property taskEndTime SELECT taskEndTime FROM perch2_scheduled_tasks WHERE taskID='132' Looking up missing property taskEndTime SELECT taskEndTime FROM perch2_scheduled_tasks WHERE taskID='131' Looking up missing property taskEndTime SELECT taskEndTime FROM perch2_scheduled_tasks WHERE taskID='130' Looking up missing property taskEndTime SELECT taskEndTime FROM perch2_scheduled_tasks WHERE taskID='129' Looking up missing property taskEndTime SELECT taskEndTime FROM perch2_scheduled_tasks WHERE taskID='128' Looking up missing property taskEndTime SELECT taskEndTime FROM perch2_scheduled_tasks WHERE taskID='127' Looking up missing property taskEndTime SELECT taskEndTime FROM perch2_scheduled_tasks WHERE taskID='126' Looking up missing property taskEndTime SELECT taskEndTime FROM perch2_scheduled_tasks WHERE taskID='125' Looking up missing property taskEndTime SELECT taskEndTime FROM perch2_scheduled_tasks WHERE taskID='124' Queries: 27 Memory: 0.8217 ~~ The Cron job runs with a different PHP install. Php-5.4.0 I am led to believe. Here is my Perch install summary.

SUMMARY INFORMATION

Perch Runway: 2.8.8, PHP: 5.5.27, MySQL: 5.5.34, with PDO Server OS: Linux, litespeed Installed apps: content (2.8.8), assets (2.8.8), categories (2.8.8) App runtimes: <?php $apps_list = array( 'content', 'categories', ); PERCH_LOGINPATH: /perch PERCH_PATH: /home/sbsportf/public_html/perch PERCH_CORE: /home/sbsportf/public_html/perch/core PERCH_RESFILEPATH: /home/sbsportf/public_html/perch/resources Image manipulation: GD PHP limits: Max upload 2M, Max POST 8M, Memory: 128M, Total max file upload: 2M Resource folder writeable: Yes HTTP_HOST: www.sbs-portfolio.com DOCUMENT_ROOT: /home/sbsportf/public_html REQUEST_URI: /perch/core/settings/diagnostics/ SCRIPT_NAME: /perch/core/settings/diagnostics/index.php

~~

Can you help?

Sue Stewart

Sue Stewart 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Does your config file do anything such as branching on hostname?

Here are portions from my config files:

runway.php

/*
        |----------------------
        | Dropbox
        |----------------
        */
        'dropbox' => [
            'access_token' => 'xxx',
            'handler'      => 'PerchDropbox_ResourceBucket',
            'handler_path' => PERCH_PATH.'/addons/apps/perch_dropbox/PerchDropbox_ResourceBucket.class.php',
],

buckets.php

<?php 
    return [
        'backup' => [
                 'type'      => 'dropbox',
                 'web_path'  => '',
                 'file_path' => 'PerchBackups',
         ],
    ];

config.php

<?php

    include(__DIR__.'/config.local.php');  

     define('PERCH_DEBUG', true);

    define('PERCH_LICENSE_KEY', '****');
    define('PERCH_EMAIL_FROM', 'suebstewart@gmail.com');
    define('PERCH_EMAIL_FROM_NAME', 'Sue Stewart');

    define('PERCH_LOGINPATH', '/perch');
    define('PERCH_PATH', str_replace(DIRECTORY_SEPARATOR.'config', '', __DIR__));
    define('PERCH_CORE', PERCH_PATH.DIRECTORY_SEPARATOR.'core');

    define('PERCH_RESFILEPATH', PERCH_PATH . DIRECTORY_SEPARATOR . 'resources');
    define('PERCH_RESPATH', PERCH_LOGINPATH . '/resources');

    define('PERCH_HTML5', true);
    define('PERCH_TZ', 'UTC');

config.local

<?php

    define('PERCH_SITEPATH', '/home/sbsportf/public_html');

    define('PERCH_SCHEDULE_SECRET', 'xxx');

    define('PERCH_DB_USERNAME', '****');
    define('PERCH_DB_PASSWORD', '****');
    define('PERCH_DB_SERVER',   "localhost");
    define('PERCH_DB_DATABASE', '****');
    define('PERCH_DB_PREFIX',   'perch2_');
Drew McLellan

Drew McLellan 2638 points
Perch Support

If you look at the scheduled task list in the control panel, do you have lots of 'in progress' tasks?

Only one scheduled task

I only have one scheduled task.

Not sure what you need to see. The link just took me to my dropbox account. Here is a screenshot of the manual backups I have in dropbox.

Dropbox files

Hi Sue, just moved the image so this should be better.

here

Drew McLellan

Drew McLellan 2638 points
Perch Support

I meant within the Perch Runway control panel, not your hosting control panel.

Here is the scheduled task tab :

scheduled tab 1

scheduled tab 2

Here is the backup tab:

backup

Drew McLellan

Drew McLellan 2638 points
Perch Support

That doesn't look so good. I think it may be similar to the issue Scott is encountering with his site. Some sort of inconsistent file state that is tripping the process up.

Any progress on this??? Anything I can do from this end???

Drew McLellan

Drew McLellan 2638 points
Perch Support

Did you say it runs ok manually?

Yes.

Drew McLellan

Drew McLellan 2638 points
Perch Support

I've not been able to replicate anything like this, but I'm trying.