Perch works online - Does not work locally

  • Running php from my terminal via. "php -S localhost:8080"

    It is running PHP version 7.1.23


    On GoDaddy, I've added my IP address as an access host to remotely access the MySQL database.


    Not sure where to go from here. Would really appreciate some help!


    Here are the warnings and error I'm receiving:




    Warning: include(PERCH_CORE/runtime/loader.php): failed to open stream: No such file or directory in /Users/milandoshi/Desktop/owlvcms/cms/core/runtime/runtime.php on line 14



    Warning: include(): Failed opening 'PERCH_CORE/runtime/loader.php' for inclusion (include_path='.:') in /Users/milandoshi/Desktop/owlvcms/cms/core/runtime/runtime.phpon line 14



    Warning: include(PERCH_CORE/runtime/core.php): failed to open stream: No such file or directory in /Users/milandoshi/Desktop/owlvcms/cms/core/runtime/runtime.php on line 15



    Warning: include(): Failed opening 'PERCH_CORE/runtime/core.php' for inclusion (include_path='.:') in /Users/milandoshi/Desktop/owlvcms/cms/core/runtime/runtime.php on line 15



    Warning: include(PERCH_CORE/inc/apps.php): failed to open stream: No such file or directory in /Users/milandoshi/Desktop/owlvcms/cms/core/runtime/runtime.php on line 16



    Warning: include(): Failed opening 'PERCH_CORE/inc/apps.php' for inclusion (include_path='.:') in /Users/milandoshi/Desktop/owlvcms/cms/core/runtime/runtime.php on line 16



    Warning: include(PERCH_PATH/core/inc/forms.php): failed to open stream: No such file or directory in /Users/milandoshi/Desktop/owlvcms/cms/core/runtime/runtime.php on line 17



    Warning: include(): Failed opening 'PERCH_PATH/core/inc/forms.php' for inclusion (include_path='.:') in /Users/milandoshi/Desktop/owlvcms/cms/core/runtime/runtime.php on line 17



    Warning: include(PERCH_PATH/core/inc/feathers.php): failed to open stream: No such file or directory in /Users/milandoshi/Desktop/owlvcms/cms/core/runtime/runtime.phpon line 21



    Warning: include(): Failed opening 'PERCH_PATH/core/inc/feathers.php' for inclusion (include_path='.:') in /Users/milandoshi/Desktop/owlvcms/cms/core/runtime/runtime.phpon line 21


    Fatal error: Uncaught Error: Call to undefined function perch_content() in /Users/milandoshi/Desktop/owlvcms/team.php:26 Stack trace: #0 {main} thrown in /Users/milandoshi/Desktop/owlvcms/team.php on line 26

  • drewm

    Approved the thread.
  • Here's what my cms/core/runtime/runtime.php looks like:


    <?php

    if (defined('PERCH_ERROR_MODE')) {

    if (strpos($_SERVER['SCRIPT_NAME'], 'start.php')) {

    die('You have included the Perch runtime in your page template. Please remove it - Runway will include it for you.');

    }else{

    die('You have included the Perch runtime in your page more than once. Please only include it once.');

    }

    }


    define('PERCH_ERROR_MODE', 'SILENT');

    include(__DIR__.'/../inc/pre_config.php');

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

    if (!defined('PERCH_PRODUCTION_MODE')) define('PERCH_PRODUCTION_MODE', PERCH_PRODUCTION);

    include(PERCH_CORE . '/runtime/loader.php');

    include(PERCH_CORE . '/runtime/core.php');

    include(PERCH_CORE . '/inc/apps.php');

    include(PERCH_PATH . '/core/inc/forms.php');

    if (PERCH_FEATHERS && file_exists(PERCH_PATH . '/config/feathers.php')){

    include(PERCH_PATH . '/config/feathers.php');

    }

    include(PERCH_PATH . '/core/inc/feathers.php');

  • Hard to say. I too have setup a local site to use the database remotely, but that does t seem to be the issue here. It sound more of a permissions issue.


    Maybe if you could elaborate a little more on how you have the site setup, which server you’re using etc. Folder/file permissions. We might be able to narrow it down a bit.