CodeIgniter Forums
failing to open autoload - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: failing to open autoload (/showthread.php?tid=76878)



failing to open autoload - richb201 - 06-29-2020

I am getting this error when i try running. The file where it occurs, MyReport.php is located in: /app/assets/MyReports.php.
Seems like a weird place to keep code but that is what the koolreport "docs" told me to do. 


A PHP Error was encountered
Severity: Compile Error
Message: require(): Failed opening required '/app/application/libraries/koolreport/core/autoload.php' (include_path='.:/opt/bitnami/php/lib/php')
Filename: assets/MyReport.php
Line Number: 3
Backtrace:



Here is the MyReport.php:

<?php
//MyReport.php
require APPPATH."libraries/koolreport/core/autoload.php";
class MyReport extends \koolreport\KoolReport
{
/*  use \koolreport\clients\Bootstrap;*/
  public function settings()
    {
        return array(

            "assets"=>array(
                "path"=>"../../assets",
                "url"=>"assets",
            ),

            "dataSources"=>array(
                "substantiator"=>array(
                    "connectionString"=>"mysql:host=localhost;dbname=substantiator",
                    "username"=>"admin",
                    "password"=>"xxx",
                    "charset"=>"utf8"
                )
            )
        );
    }
    function setup()
    {
        $this->src('substantiator')
            ->query("SELECT * FROM employees")
            ->pipe($this->dataStore("employees"));
    }
}