Whoops! There was an error.
Error
Call to a member function fetch_all() on bool Error thrown with message "Call to a member function fetch_all() on bool" Stacktrace: #3 Error in /home/agtgenetics/public_html/model/config.model.php:34 #2 Database:all_query in /home/agtgenetics/public_html/class/category.class.php:9 #1 Category:show_category in /home/agtgenetics/public_html/view/product-list.php:9 #0 include in /home/agtgenetics/public_html/index.php:89
Stack frames (4)
3
Error
/model/config.model.php34
2
Database all_query
/class/category.class.php9
1
Category show_category
/view/product-list.php9
0
include
/index.php89
/home/agtgenetics/public_html/model/config.model.php
  }
    
    public function is_server_up(){
        $sql  = "select status from server_up where id = '1'";
        $response = $this->single_query($sql);
        return $response['status'];
    }
    public function sanitize($sql){
      $this->sql = $sql;
      return $this->mysqli->real_escape_string($sql);
    }
  
        public function single_query($sql){
        $this->sql = $sql;
        return $this->mysqli->query($sql)->fetch_array(MYSQLI_ASSOC);    
        }
        
        public function all_query($sql){
            $this->sql = $sql;
        return $this->mysqli->query($sql)->fetch_all(MYSQLI_ASSOC);
        }
        
        public function run_query($sql){
            $this->sql = $sql;
            $this->mysqli->query($sql);
        }
        
        public function insert($data,$table){
            $column_name = array();
            $column_value = array();
            foreach($data as $column => $value){
                        $column_name[] = $column;
                        $column_value[] = $value;
            }
            $column_name = implode(",",$column_name);
            $column_value = implode("','",$column_value);
            $insert = "insert into $table($column_name) values ('{$column_value}')";
            return $insert;
        }
        
/home/agtgenetics/public_html/class/category.class.php
<?php
    require_once __DIR__.'./../model/config.model.php';
    
    
    class Category extends Database{
            
        public function show_category(){
            $sql = "select * from shop_category";
            $data =  $this->all_query($sql);
            return $data;
        }
        
        
        public function get_category_name_n($id){
            $sql = "select * from shop_category where id = '{$id}'";
            $data = $this->single_query($sql);
            return $data['en_name'];
            
        }
        public function get_my_sub_category($id){
            $id = $this->sanitize($id);
            $sql = "select * from sub_category where parent = '{$id}'";
            return $this->all_query($sql);
        }
        
        public function get_image($name){
            $sql = "select image from shop_category where en_name = '{$name}'";
            $response = $this->single_query($sql);
            return $response['image'];
        }
        
        public function get_category_product(){
            //$sql = "select * from shop_category order by en_name asc";
            //$response = $this->all_query($sql);
            return array();
        }
        
        public function get_category_name($category){
            $sql = "select en_name from shop_category where id = '{$category}'";
            $response = $this->single_query($sql);
/home/agtgenetics/public_html/view/product-list.php
<?php include("_header.php");?>
<?php
    require_once __DIR__.'./../class/category.class.php';
    require_once __DIR__.'./../class/products.class.php';
    
    $category_ct = new Category();
    $product_ct = new Products();
    
    $all_category= $category_ct->show_category();
    $newarrival = $product_ct->all_new_arrival();
?>
<style>
    .slider {
    width: 100%;
    margin: 0 auto;
}
 
.activefilter{
    color: blue;
}
</style>
    <!-- Category -->
    <section class="category_area section_padding_100" style="padding-top: 138px;padding-bottom:100px;">
        <div class="container">
          <div class="row justify-content-center">
    <div class="col-12 col-md-3 col-lg-3 row max-content">
        <div class="filter-box row">
                <div class="col-12" style="display:block;">
                    <p style="color:black;">
                    <span class="filter-text">FILTER PRODUCT</span>
                    <span class="clear-all pointer clear-all-filter">Clear All</span></p>
        
 
                </div>
                <div class="col-12" style="border-top:1px solid #e0e0e0;padding-top:9px;">
    
    <?php foreach($all_category as $category_data): ?>
 
                    <?php if($category_data['id'] == $parameter): ?>
                    <span class="product-category-select pointer triggerlist activefilter"><?=$category_data['en_name']; ?></span>
/home/agtgenetics/public_html/index.php
}
::-webkit-scrollbar {
    display: none; // Safari and Chrome
}
</style>
<?php endif; ?>
<?php } ?>
<?php
 
 
$discount = array('our-dna-test');
 
if(in_array($filename,$discount)){
    $filename = "our-dna-test-discount";
    $full_path = "./view/".$filename.".php";
}
if ($filename == "profile-preview") {
    $full_path = "./profile-preview/theme/index.html";  
    include($full_path);
}else if(include($full_path)){
  
}else{
    header("HTTP/1.1 200 OK");
    include($error);
}
 
}else{ }
 
 
?>
 

Environment & details:

Key Value
/product-list/
empty
empty
empty
Key Value
language en
Key Value
USER agtgenetics
HOME /home/agtgenetics
SCRIPT_NAME /index.php
REQUEST_URI /product-list/
QUERY_STRING /product-list/
REQUEST_METHOD GET
SERVER_PROTOCOL HTTP/1.1
GATEWAY_INTERFACE CGI/1.1
REDIRECT_QUERY_STRING /product-list/
REDIRECT_URL /product-list/
REMOTE_PORT 32802
SCRIPT_FILENAME /home/agtgenetics/public_html/index.php
SERVER_ADMIN webmaster@agtgenetics.com
CONTEXT_DOCUMENT_ROOT /home/agtgenetics/public_html
CONTEXT_PREFIX
REQUEST_SCHEME https
DOCUMENT_ROOT /home/agtgenetics/public_html
REMOTE_ADDR 35.175.201.191
SERVER_PORT 443
SERVER_ADDR 172.31.10.13
SERVER_NAME www.agtgenetics.com
SERVER_SOFTWARE Apache
SERVER_SIGNATURE
PATH /usr/local/jdk/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin:/root/bin:/opt/bin
HTTP_X_HTTPS 1
HTTP_CONNECTION Keep-Alive
HTTP_HOST www.agtgenetics.com
HTTP_ACCEPT_ENCODING br,gzip
HTTP_IF_MODIFIED_SINCE Tue, 26 Sep 2023 20:06:36 GMT
HTTP_ACCEPT_LANGUAGE en-US,en;q=0.5
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_USER_AGENT CCBot/2.0 (https://commoncrawl.org/faq/)
proxy-nokeepalive 1
SSL_TLS_SNI www.agtgenetics.com
HTTPS on
SCRIPT_URI https://www.agtgenetics.com/product-list/
SCRIPT_URL /product-list/
UNIQUE_ID ZeUIAnt72JuQ4NOhcADuigAAABI
REDIRECT_STATUS 200
REDIRECT_SSL_TLS_SNI www.agtgenetics.com
REDIRECT_HTTPS on
REDIRECT_SCRIPT_URI https://www.agtgenetics.com/product-list/
REDIRECT_SCRIPT_URL /product-list/
REDIRECT_UNIQUE_ID ZeUIAnt72JuQ4NOhcADuigAAABI
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1709508610.3892
REQUEST_TIME 1709508610
argv Array ( [0] => /product-list/ )
argc 1
BASE_URL minimaomao.com/staging/agt
APP_NAME GARDENGENESIS
ENVIRONMENT stagging
HOST localhost
DB_USERNAME agtgenetics_database
DB_PASSWORD Minimo2023
DB_NAME agtgenetics_database
stripe_mode live
live_pk_key pk_live_51LRnF0Bv8asdasdasdNh3oEs0eSNTjgYIgm8vDrmJz6Ly9KpVQ4HKCcKsC18QetcmjqMidOxftTiPqa4RItNojRob8oKv855000PZRsw8AO
live_sk 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
test_pk_key pk_test_51LRnF0Bv8Nh3oEs01udNFQ14NXND920eVkzOaD1DMqSDeNJMavPdgqZfIcyly0zZRus3nikLxwEYzohknXd4fsXc00TECS32LR
test_sk sk_test_51LRnF0Bv8Nh3oEs01nd9anqPmX8GUH7yFUfWKy4JaDGFsJXYeTiO9VAqiSQLSzqDN6WQHDcp9MwbHLnstSKFEV7G00Exh8zdDc
REFUND_ENDPOINT https://gardengenesis.app/stripe/api/refund.php
CREATE_RECEIPT https://gardengenesis.app/stripe/api/stripe/create-receipt
SITE_KEY 51714f9c-c7ce-4560-af21-6795de63f7d6
SECRET 0xD9171Af338cEa44f8834B2E6E661c492eddEB20D
Key Value
BASE_URL minimaomao.com/staging/agt
APP_NAME GARDENGENESIS
ENVIRONMENT stagging
HOST localhost
DB_USERNAME agtgenetics_database
DB_PASSWORD Minimo2023
DB_NAME agtgenetics_database
stripe_mode live
live_pk_key pk_live_51LRnF0Bv8asdasdasdNh3oEs0eSNTjgYIgm8vDrmJz6Ly9KpVQ4HKCcKsC18QetcmjqMidOxftTiPqa4RItNojRob8oKv855000PZRsw8AO
live_sk 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
test_pk_key pk_test_51LRnF0Bv8Nh3oEs01udNFQ14NXND920eVkzOaD1DMqSDeNJMavPdgqZfIcyly0zZRus3nikLxwEYzohknXd4fsXc00TECS32LR
test_sk sk_test_51LRnF0Bv8Nh3oEs01nd9anqPmX8GUH7yFUfWKy4JaDGFsJXYeTiO9VAqiSQLSzqDN6WQHDcp9MwbHLnstSKFEV7G00Exh8zdDc
REFUND_ENDPOINT https://gardengenesis.app/stripe/api/refund.php
CREATE_RECEIPT https://gardengenesis.app/stripe/api/stripe/create-receipt
SITE_KEY 51714f9c-c7ce-4560-af21-6795de63f7d6
SECRET 0xD9171Af338cEa44f8834B2E6E661c492eddEB20D
0. Whoops\Handler\PrettyPageHandler