0

For some reason, this perfectly works on my local development server but when I deploy it to google I get the following error:

PHP Fatal error: Class 'PHPOnCouch\couchClient' not found in /base/data/home/apps/../2.105209891175321430/library/testerson.php on line 10

Does anyone know why I wouldnt be getting conflicting errors on local vs deployment?

Here is my folder structure:

project folder
- app.yaml
- library/
- vendor/
- index.php

/library/testerson.php

<?php
    namespace testerson;
    use PHPOnCouch\couchClient as couchClient;

    class Testerson {

        public function __construct()
        {
            $this->CLOUDANT_URL = "https://user:pass@url.cloudant.com";
            $this->global_client = new couchClient($this->CLOUDANT_URL, 'global');
        }

    }
?>

/index.php

<?php
    require_once("vendor/autoload.php");
    require_once("library/testerson.php");

    use testerson\Testerson;

    $account = new Testerson();
?>
bryan
  • 8,879
  • 18
  • 83
  • 166
  • Can you show us the general structure of your application? All files deployed and referenced by an app engine project must live in the same folder as the app.yaml file or deeper i.e. -app_folder --app.yaml --app_folder_library/autoload.php -library --autoload1.php In this example, autoload1.php can't be referenced in your application. Only the files under app_folder can be referenced. – dwelling Nov 23 '17 at 16:50
  • @dwelling I've updated my folder structure. I'd also like to note that in the Stackdriver Debug on GCP all the files have been deployed correctly. I've never had this issue where it works with GoogleAppEngineLauncher but not actually when it was deployed – bryan Nov 23 '17 at 17:16

1 Answers1

0

As a wild guess, have you copied someone's app.yaml that includes test* in the skip_files clause?

Dave W. Smith
  • 24,318
  • 4
  • 40
  • 46