ActiveRecord \ DatabaseException
PDOException: SQLSTATE[HY000] [1045] Access denied for user 'thep_bhawani'@'localhost' (using password: YES) in /home/thepos.xyz/bhawani-medical/vendor/php-activerecord/php-activerecord/lib/Connection.php:260 Stack trace: #0 /home/thepos.xyz/bhawani-medical/vendor/php-activerecord/php-activerecord/lib/Connection.php(260): PDO->__construct('mysql:host=loca...', 'thep_bhawani', 'demo!1@123', Array) #1 /home/thepos.xyz/bhawani-medical/vendor/php-activerecord/php-activerecord/lib/Connection.php(122): ActiveRecord\Connection->__construct(Object(stdClass)) #2 /home/thepos.xyz/bhawani-medical/vendor/php-activerecord/php-activerecord/lib/ConnectionManager.php(33): ActiveRecord\Connection::instance('mysql://thep_bh...') #3 /home/thepos.xyz/bhawani-medical/vendor/php-activerecord/php-activerecord/lib/Table.php(114): ActiveRecord\ConnectionManager::get_connection('development') #4 /home/thepos.xyz/bhawani-medical/vendor/php-activerecord/php-activerecord/lib/Table.php(90): ActiveRecord\Table->reestablish_connection(false) #5 /home/thepos.xyz/bhawani-medical/vendor/php-activerecord/php-activerecord/lib/Table.php(71): ActiveRecord\Table->__construct('Setting') #6 /home/thepos.xyz/bhawani-medical/vendor/php-activerecord/php-activerecord/lib/Model.php(765): ActiveRecord\Table::load('Setting') #7 /home/thepos.xyz/bhawani-medical/vendor/php-activerecord/php-activerecord/lib/Model.php(1657): ActiveRecord\Model::table() #8 /home/thepos.xyz/bhawani-medical/vendor/php-activerecord/php-activerecord/lib/Model.php(1605): ActiveRecord\Model::find_by_pk(Array, Array) #9 [internal function]: ActiveRecord\Model::find('all', 1) #10 /home/thepos.xyz/bhawani-medical/vendor/php-activerecord/php-activerecord/lib/Model.php(1436): call_user_func_array('static::find', Array) #11 /home/thepos.xyz/bhawani-medical/app/routes/admin/index.php(14): ActiveRecord\Model::all(1) #12 /home/thepos.xyz/bhawani-medical/core/classes/Router.php(288): {closure}() #13 /home/thepos.xyz/bhawani-medical/index.php(7): Router->run() #14 {main} ActiveRecord\DatabaseException thrown with message "PDOException: SQLSTATE[HY000] [1045] Access denied for user 'thep_bhawani'@'localhost' (using password: YES) in /home/thepos.xyz/bhawani-medical/vendor/php-activerecord/php-activerecord/lib/Connection.php:260 Stack trace: #0 /home/thepos.xyz/bhawani-medical/vendor/php-activerecord/php-activerecord/lib/Connection.php(260): PDO->__construct('mysql:host=loca...', 'thep_bhawani', 'demo!1@123', Array) #1 /home/thepos.xyz/bhawani-medical/vendor/php-activerecord/php-activerecord/lib/Connection.php(122): ActiveRecord\Connection->__construct(Object(stdClass)) #2 /home/thepos.xyz/bhawani-medical/vendor/php-activerecord/php-activerecord/lib/ConnectionManager.php(33): ActiveRecord\Connection::instance('mysql://thep_bh...') #3 /home/thepos.xyz/bhawani-medical/vendor/php-activerecord/php-activerecord/lib/Table.php(114): ActiveRecord\ConnectionManager::get_connection('development') #4 /home/thepos.xyz/bhawani-medical/vendor/php-activerecord/php-activerecord/lib/Table.php(90): ActiveRecord\Table->reestablish_connection(false) #5 /home/thepos.xyz/bhawani-medical/vendor/php-activerecord/php-activerecord/lib/Table.php(71): ActiveRecord\Table->__construct('Setting') #6 /home/thepos.xyz/bhawani-medical/vendor/php-activerecord/php-activerecord/lib/Model.php(765): ActiveRecord\Table::load('Setting') #7 /home/thepos.xyz/bhawani-medical/vendor/php-activerecord/php-activerecord/lib/Model.php(1657): ActiveRecord\Model::table() #8 /home/thepos.xyz/bhawani-medical/vendor/php-activerecord/php-activerecord/lib/Model.php(1605): ActiveRecord\Model::find_by_pk(Array, Array) #9 [internal function]: ActiveRecord\Model::find('all', 1) #10 /home/thepos.xyz/bhawani-medical/vendor/php-activerecord/php-activerecord/lib/Model.php(1436): call_user_func_array('static::find', Array) #11 /home/thepos.xyz/bhawani-medical/app/routes/admin/index.php(14): ActiveRecord\Model::all(1) #12 /home/thepos.xyz/bhawani-medical/core/classes/Router.php(288): {closure}() #13 /home/thepos.xyz/bhawani-medical/index.php(7): Router->run() #14 {main}" Stacktrace: #13 ActiveRecord\DatabaseException in /home/thepos.xyz/bhawani-medical/vendor/php-activerecord/php-activerecord/lib/Connection.php:262 #12 ActiveRecord\Connection:__construct in /home/thepos.xyz/bhawani-medical/vendor/php-activerecord/php-activerecord/lib/Connection.php:122 #11 ActiveRecord\Connection:instance in /home/thepos.xyz/bhawani-medical/vendor/php-activerecord/php-activerecord/lib/ConnectionManager.php:33 #10 ActiveRecord\ConnectionManager:get_connection in /home/thepos.xyz/bhawani-medical/vendor/php-activerecord/php-activerecord/lib/Table.php:114 #9 ActiveRecord\Table:reestablish_connection in /home/thepos.xyz/bhawani-medical/vendor/php-activerecord/php-activerecord/lib/Table.php:90 #8 ActiveRecord\Table:__construct in /home/thepos.xyz/bhawani-medical/vendor/php-activerecord/php-activerecord/lib/Table.php:71 #7 ActiveRecord\Table:load in /home/thepos.xyz/bhawani-medical/vendor/php-activerecord/php-activerecord/lib/Model.php:765 #6 ActiveRecord\Model:table in /home/thepos.xyz/bhawani-medical/vendor/php-activerecord/php-activerecord/lib/Model.php:1657 #5 ActiveRecord\Model:find_by_pk in /home/thepos.xyz/bhawani-medical/vendor/php-activerecord/php-activerecord/lib/Model.php:1605 #4 ActiveRecord\Model:find in /home/thepos.xyz/bhawani-medical/vendor/php-activerecord/php-activerecord/lib/Model.php:1436 #3 call_user_func_array in /home/thepos.xyz/bhawani-medical/vendor/php-activerecord/php-activerecord/lib/Model.php:1436 #2 ActiveRecord\Model:all in /home/thepos.xyz/bhawani-medical/app/routes/admin/index.php:14 #1 {closure} in /home/thepos.xyz/bhawani-medical/core/classes/Router.php:288 #0 Router:run in /home/thepos.xyz/bhawani-medical/index.php:7
Stack frames (14)
13
ActiveRecord
\
DatabaseException
/
vendor
/
php-activerecord
/
php-activerecord
/
lib
/
Connection.php
262
12
ActiveRecord
\
Connection
__construct
/
vendor
/
php-activerecord
/
php-activerecord
/
lib
/
Connection.php
122
11
ActiveRecord
\
Connection
instance
/
vendor
/
php-activerecord
/
php-activerecord
/
lib
/
ConnectionManager.php
33
10
ActiveRecord
\
ConnectionManager
get_connection
/
vendor
/
php-activerecord
/
php-activerecord
/
lib
/
Table.php
114
9
ActiveRecord
\
Table
reestablish_connection
/
vendor
/
php-activerecord
/
php-activerecord
/
lib
/
Table.php
90
8
ActiveRecord
\
Table
__construct
/
vendor
/
php-activerecord
/
php-activerecord
/
lib
/
Table.php
71
7
ActiveRecord
\
Table
load
/
vendor
/
php-activerecord
/
php-activerecord
/
lib
/
Model.php
765
6
ActiveRecord
\
Model
table
/
vendor
/
php-activerecord
/
php-activerecord
/
lib
/
Model.php
1657
5
ActiveRecord
\
Model
find_by_pk
/
vendor
/
php-activerecord
/
php-activerecord
/
lib
/
Model.php
1605
4
ActiveRecord
\
Model
find
/
vendor
/
php-activerecord
/
php-activerecord
/
lib
/
Model.php
1436
3
call_user_func_array
/
vendor
/
php-activerecord
/
php-activerecord
/
lib
/
Model.php
1436
2
ActiveRecord
\
Model
all
/
app
/
routes
/
admin
/
index.php
14
1
{closure}
/
core
/
classes
/
Router.php
288
0
Router
run
/
index.php
7
/
home
/
thepos.xyz
/
bhawani-medical
/
vendor
/
php-activerecord
/
php-activerecord
/
lib
/
Connection.php
     * @param array $info Array containing URL parts
     * @return Connection
     */
    protected function __construct($info)
    {
        try {
            // unix sockets start with a /
            if ($info->host[0] != '/')
            {
                $host = "host=$info->host";
 
                if (isset($info->port))
                    $host .= ";port=$info->port";
            }
            else
                $host = "unix_socket=$info->host";
 
            $this->connection = new PDO("$info->protocol:$host;dbname=$info->db", $info->user, $info->pass, static::$PDO_OPTIONS);
        } catch (PDOException $e) {
            throw new DatabaseException($e);
        }
    }
 
    /**
     * Retrieves column meta data for the specified table.
     *
     * @param string $table Name of a table
     * @return array An array of {@link Column} objects.
     */
    public function columns($table)
    {
        $columns = array();
        $sth = $this->query_column_info($table);
 
        while (($row = $sth->fetch())) {
            $c = $this->create_column($row);
            $columns[$c->name] = $c;
        }
        return $columns;
    }
Arguments
  1. """
    PDOException: SQLSTATE[HY000] [1045] Access denied for user 'thep_bhawani'@'localhost' (using password: YES) in /home/thepos.xyz/bhawani-medical/vendor/php-activerecord/php-activerecord/lib/Connection.php:260\n
    Stack trace:\n
    #0 /home/thepos.xyz/bhawani-medical/vendor/php-activerecord/php-activerecord/lib/Connection.php(260): PDO->__construct('mysql:host=loca...', 'thep_bhawani', 'demo!1@123', Array)\n
    #1 /home/thepos.xyz/bhawani-medical/vendor/php-activerecord/php-activerecord/lib/Connection.php(122): ActiveRecord\Connection->__construct(Object(stdClass))\n
    #2 /home/thepos.xyz/bhawani-medical/vendor/php-activerecord/php-activerecord/lib/ConnectionManager.php(33): ActiveRecord\Connection::instance('mysql://thep_bh...')\n
    #3 /home/thepos.xyz/bhawani-medical/vendor/php-activerecord/php-activerecord/lib/Table.php(114): ActiveRecord\ConnectionManager::get_connection('development')\n
    #4 /home/thepos.xyz/bhawani-medical/vendor/php-activerecord/php-activerecord/lib/Table.php(90): ActiveRecord\Table->reestablish_connection(false)\n
    #5 /home/thepos.xyz/bhawani-medical/vendor/php-activerecord/php-activerecord/lib/Table.php(71): ActiveRecord\Table->__construct('Setting')\n
    #6 /home/thepos.xyz/bhawani-medical/vendor/php-activerecord/php-activerecord/lib/Model.php(765): ActiveRecord\Table::load('Setting')\n
    #7 /home/thepos.xyz/bhawani-medical/vendor/php-activerecord/php-activerecord/lib/Model.php(1657): ActiveRecord\Model::table()\n
    #8 /home/thepos.xyz/bhawani-medical/vendor/php-activerecord/php-activerecord/lib/Model.php(1605): ActiveRecord\Model::find_by_pk(Array, Array)\n
    #9 [internal function]: ActiveRecord\Model::find('all', 1)\n
    #10 /home/thepos.xyz/bhawani-medical/vendor/php-activerecord/php-activerecord/lib/Model.php(1436): call_user_func_array('static::find', Array)\n
    #11 /home/thepos.xyz/bhawani-medical/app/routes/admin/index.php(14): ActiveRecord\Model::all(1)\n
    #12 /home/thepos.xyz/bhawani-medical/core/classes/Router.php(288): {closure}()\n
    #13 /home/thepos.xyz/bhawani-medical/index.php(7): Router->run()\n
    #14 {main}
    """
    
/
home
/
thepos.xyz
/
bhawani-medical
/
vendor
/
php-activerecord
/
php-activerecord
/
lib
/
Connection.php
    {
        $config = Config::instance();
 
        if (strpos($connection_string_or_connection_name, '://') === false)
        {
            $connection_string = $connection_string_or_connection_name ?
                $config->get_connection($connection_string_or_connection_name) :
                $config->get_default_connection_string();
        }
        else
            $connection_string = $connection_string_or_connection_name;
 
        if (!$connection_string)
            throw new DatabaseException("Empty connection string");
 
        $info = static::parse_connection_url($connection_string);
        $fqclass = static::load_adapter_class($info->protocol);
 
        try {
            $connection = new $fqclass($info);
            $connection->protocol = $info->protocol;
            $connection->logging = $config->get_logging();
            $connection->logger = $connection->logging ? $config->get_logger() : null;
 
            if (isset($info->charset))
                $connection->set_encoding($info->charset);
        } catch (PDOException $e) {
            throw new DatabaseException($e);
        }
        return $connection;
    }
 
    /**
     * Loads the specified class for an adapter.
     *
     * @param string $adapter Name of the adapter.
     * @return string The full name of the class including namespace.
     */
    private static function load_adapter_class($adapter)
    {
Arguments
  1. {}
    
/
home
/
thepos.xyz
/
bhawani-medical
/
vendor
/
php-activerecord
/
php-activerecord
/
lib
/
ConnectionManager.php
    /**
     * Array of {@link Connection} objects.
     * @var array
     */
    static private $connections = array();
 
    /**
     * If $name is null then the default connection will be returned.
     *
     * @see Config
     * @param string $name Optional name of a connection
     * @return Connection
     */
    public static function get_connection($name=null)
    {
        $config = Config::instance();
        $name = $name ? $name : $config->get_default_connection();
 
        if (!isset(self::$connections[$name]) || !self::$connections[$name]->connection)
            self::$connections[$name] = Connection::instance($config->get_connection($name));
 
        return self::$connections[$name];
    }
 
    /**
     * Drops the connection from the connection manager. Does not actually close it since there
     * is no close method in PDO.
     *
     * If $name is null then the default connection will be returned.
     *
     * @param string $name Name of the connection to forget about
     */
    public static function drop_connection($name=null)
    {
        $config = Config::instance();
        $name = $name ? $name : $config->get_default_connection();
 
        if (isset(self::$connections[$name]))
            unset(self::$connections[$name]);
    }
Arguments
  1. "mysql://thep_bhawani:demo!1@123@localhost/thep_bhawani"
    
/
home
/
thepos.xyz
/
bhawani-medical
/
vendor
/
php-activerecord
/
php-activerecord
/
lib
/
Table.php
        $this->set_delegates();
        $this->set_cache();
        $this->set_setters_and_getters();
 
        $this->callback = new CallBack($class_name);
        $this->callback->register('before_save', function(Model $model) { $model->set_timestamps(); }, array('prepend' => true));
        $this->callback->register('after_save', function(Model $model) { $model->reset_dirty(); }, array('prepend' => true));
    }
 
    public function reestablish_connection($close=true)
    {
        // if connection name property is null the connection manager will use the default connection
        $connection = $this->class->getStaticPropertyValue('connection',null);
 
        if ($close)
        {
            ConnectionManager::drop_connection($connection);
            static::clear_cache();
        }
        return ($this->conn = ConnectionManager::get_connection($connection));
    }
 
    public function create_joins($joins)
    {
        if (!is_array($joins))
            return $joins;
 
        $ret = $space = '';
 
        $existing_tables = array();
        foreach ($joins as $value)
        {
            $ret .= $space;
 
            if (stripos($value,'JOIN ') === false)
            {
                if (array_key_exists($value, $this->relationships))
                {
                    $rel = $this->get_relationship($value);
 
Arguments
  1. "development"
    
/
home
/
thepos.xyz
/
bhawani-medical
/
vendor
/
php-activerecord
/
php-activerecord
/
lib
/
Table.php
            self::$cache[$model_class_name] = new Table($model_class_name);
            self::$cache[$model_class_name]->set_associations();
        }
 
        return self::$cache[$model_class_name];
    }
 
    public static function clear_cache($model_class_name=null)
    {
        if ($model_class_name && array_key_exists($model_class_name,self::$cache))
            unset(self::$cache[$model_class_name]);
        else
            self::$cache = array();
    }
 
    public function __construct($class_name)
    {
        $this->class = Reflections::instance()->add($class_name)->get($class_name);
 
        $this->reestablish_connection(false);
        $this->set_table_name();
        $this->get_meta_data();
        $this->set_primary_key();
        $this->set_sequence_name();
        $this->set_delegates();
        $this->set_cache();
        $this->set_setters_and_getters();
 
        $this->callback = new CallBack($class_name);
        $this->callback->register('before_save', function(Model $model) { $model->set_timestamps(); }, array('prepend' => true));
        $this->callback->register('after_save', function(Model $model) { $model->reset_dirty(); }, array('prepend' => true));
    }
 
    public function reestablish_connection($close=true)
    {
        // if connection name property is null the connection manager will use the default connection
        $connection = $this->class->getStaticPropertyValue('connection',null);
 
        if ($close)
        {
Arguments
  1. false
    
/
home
/
thepos.xyz
/
bhawani-medical
/
vendor
/
php-activerecord
/
php-activerecord
/
lib
/
Table.php
 
    /**
     * A instance of CallBack for this model/table
     * @static
     * @var object ActiveRecord\CallBack
     */
    public $callback;
 
    /**
     * List of relationships for this table.
     */
    private $relationships = array();
 
    public static function load($model_class_name)
    {
        if (!isset(self::$cache[$model_class_name]))
        {
            /* do not place set_assoc in constructor..it will lead to infinite loop due to
               relationships requesting the model's table, but the cache hasn't been set yet */
            self::$cache[$model_class_name] = new Table($model_class_name);
            self::$cache[$model_class_name]->set_associations();
        }
 
        return self::$cache[$model_class_name];
    }
 
    public static function clear_cache($model_class_name=null)
    {
        if ($model_class_name && array_key_exists($model_class_name,self::$cache))
            unset(self::$cache[$model_class_name]);
        else
            self::$cache = array();
    }
 
    public function __construct($class_name)
    {
        $this->class = Reflections::instance()->add($class_name)->get($class_name);
 
        $this->reestablish_connection(false);
        $this->set_table_name();
Arguments
  1. "Setting"
    
/
home
/
thepos.xyz
/
bhawani-medical
/
vendor
/
php-activerecord
/
php-activerecord
/
lib
/
Model.php
    /**
     * Re-establishes the database connection with a new connection.
     *
     * @return Connection
     */
    public static function reestablish_connection()
    {
        return static::table()->reestablish_connection();
    }
 
    /**
     * Returns the {@link Table} object for this model.
     *
     * Be sure to call in static scoping: static::table()
     *
     * @return Table
     */
    public static function table()
    {
        return Table::load(get_called_class());
    }
 
    /**
     * Creates a model and saves it to the database.
     *
     * @param array $attributes Array of the models attributes
     * @param boolean $validate True if the validators should be run
     * @param boolean $guard_attributes Set to true to guard protected/non-accessible attributes
     * @return Model
     */
    public static function create($attributes, $validate=true, $guard_attributes=true)
    {
        $class_name = get_called_class();
        $model = new $class_name($attributes, $guard_attributes);
        $model->save($validate);
        return $model;
    }
 
    /**
     * Save the model to the database.
Arguments
  1. "Setting"
    
/
home
/
thepos.xyz
/
bhawani-medical
/
vendor
/
php-activerecord
/
php-activerecord
/
lib
/
Model.php
        return array_filter($models);
    }
 
    /**
     * Finder method which will find by a single or array of primary keys for this model.
     *
     * @see find
     * @param array $values An array containing values for the pk
     * @param array $options An options array
     * @return Model
     * @throws {@link RecordNotFound} if a record could not be found
     */
    public static function find_by_pk($values, $options)
    {
        if($values===null)
        {
            throw new RecordNotFound("Couldn't find ".get_called_class()." without an ID");
        }
 
        $table = static::table();
 
        if($table->cache_individual_model)
        {
            $list = static::get_models_from_cache($values, $options);
        }
        else
        {
            $options['conditions'] = static::pk_conditions($values);
            $list = $table->find($options);
        }
        $results = count($list);
 
        //if ($results != ($expected = count($values)))
        if ($results != ($expected = count((array)$values)))
        {
            $class = get_called_class();
            if (is_array($values))
                $values = join(',',$values);
 
            if ($expected == 1)
/
home
/
thepos.xyz
/
bhawani-medical
/
vendor
/
php-activerecord
/
php-activerecord
/
lib
/
Model.php
                        $options['order'] = SQLBuilder::reverse_order($options['order']);
 
                    // fall thru
 
                 case 'first':
                    $options['limit'] = 1;
                    $options['offset'] = 0;
                     break;
            }
 
            $args = array_slice($args,1);
            $num_args--;
        }
        //find by pk
        elseif (1 === count($args) && 1 == $num_args)
            $args = $args[0];
 
        // anything left in $args is a find by pk
        if ($num_args > 0 && !isset($options['conditions']))
            return static::find_by_pk($args, $options);
 
        $options['mapped_names'] = static::$alias_attribute;
        $list = static::table()->find($options);
 
        return $single ? (!empty($list) ? $list[0] : null) : $list;
    }
 
    /**
     * Will look up a list of primary keys from cache
     *
     * @param mixed $pks primary keys
     * @return array
     */
    protected static function get_models_from_cache($pks, $options)
    {
        $models = array();
        $table = static::table();
 
        if(!is_array($pks))
        {
Arguments
  1. array:1 [
      0 => 1
    ]
    
  2. []
    
/
home
/
thepos.xyz
/
bhawani-medical
/
vendor
/
php-activerecord
/
php-activerecord
/
lib
/
Model.php
            {
                // access association to ensure that the relationship has been loaded
                // so that we do not double-up on records if we append a newly created
                $this->$association_name;
                return $association->$method($this, $args);
            }
        }
 
        throw new ActiveRecordException("Call to undefined method: $method");
    }
 
    /**
     * Alias for self::find('all').
     *
     * @see find
     * @return array array of records found
     */
    public static function all(/* ... */)
    {
        return call_user_func_array('static::find',array_merge(array('all'),func_get_args()));
    }
 
    /**
     * Get a count of qualifying records.
     *
     * <code>
     * YourModel::count(array('conditions' => 'amount > 3.14159265'));
     * </code>
     *
     * @see find
     * @return int Number of records that matched the query
     */
    public static function count(/* ... */)
    {
        $args = func_get_args();
        $options = static::extract_and_validate_options($args);
        $options['select'] = 'COUNT(*)';
 
        if (!empty($args) && !is_null($args[0]) && !empty($args[0]))
        {
Arguments
  1. "all"
    
  2. 1
    
/
home
/
thepos.xyz
/
bhawani-medical
/
vendor
/
php-activerecord
/
php-activerecord
/
lib
/
Model.php
            {
                // access association to ensure that the relationship has been loaded
                // so that we do not double-up on records if we append a newly created
                $this->$association_name;
                return $association->$method($this, $args);
            }
        }
 
        throw new ActiveRecordException("Call to undefined method: $method");
    }
 
    /**
     * Alias for self::find('all').
     *
     * @see find
     * @return array array of records found
     */
    public static function all(/* ... */)
    {
        return call_user_func_array('static::find',array_merge(array('all'),func_get_args()));
    }
 
    /**
     * Get a count of qualifying records.
     *
     * <code>
     * YourModel::count(array('conditions' => 'amount > 3.14159265'));
     * </code>
     *
     * @see find
     * @return int Number of records that matched the query
     */
    public static function count(/* ... */)
    {
        $args = func_get_args();
        $options = static::extract_and_validate_options($args);
        $options['select'] = 'COUNT(*)';
 
        if (!empty($args) && !is_null($args[0]) && !empty($args[0]))
        {
Arguments
  1. "static::find"
    
  2. array:2 [
      0 => "all"
      1 => 1
    ]
    
/
home
/
thepos.xyz
/
bhawani-medical
/
app
/
routes
/
admin
/
index.php
<?php
 
/*
 * Route Url : /admin/dashboard
 * Request type : GET
 * Loading dashboard view if user is loggedin 
 *
 */
 
 
 
 
$app->map("GET", "/", function(){
    $setting  = Setting::all(1);
       View::load("admin/index",array('setting'=>$setting));
       
});
 
 
$app->map("POST", "/login", function(){
 
        if(!Input::exists('token')){
            
           Redirect::to(base_url());
           exit;
        }
           
        if(!Input::exists('email') || !Input::exists('password') || !Input::exists('token')){
            
             Session::put("type","error");
             Session::put("msg","Input Fields are required.");
             Redirect::to(base_url());
             exit;
             
        }else{
            
            
        
          if(Token::check(Input::all())){
              
Arguments
  1. 1
    
/
home
/
thepos.xyz
/
bhawani-medical
/
core
/
classes
/
Router.php
                        . ($pre !== '' ? $pre : null)
                        . '('
                        . ($param !== '' ? "?P<$param>" : null)
                        . $type
                        . '))'
                        . ($optional !== '' ? '?' : null);
 
                $route = str_replace($block, $pattern, $route);
            }
 
        }
        return "`^$route$`u";
    }
 
    public function run(){
        $match = $this->match();
        
        //dd($match); exit;
        if( $match && is_callable( $match['target'] ) ) {
            call_user_func_array( $match['target'], $match['params'] );
        } else {
            header( $_SERVER["SERVER_PROTOCOL"] . ' 404 Not Found');
            echo Json::encode(['error' => 'invalid api call please contact provider']);
        }
    }
}
 
/
home
/
thepos.xyz
/
bhawani-medical
/
index.php
<?php
 
define("SYSTEM_PATH", __dir__."/");
 
require_once SYSTEM_PATH."core/init.php";
 
$app->run();
 

Environment & details:

empty
empty
empty
Key Value
PHPSESSID
"55gq1nmcslsont6j33l1vdb461"
empty
Key Value
PATH
"/bin:/usr/bin"
HTTP_ACCEPT
"*/*"
HTTP_ACCEPT_ENCODING
"gzip, br, zstd, deflate"
HTTP_COOKIE
"PHPSESSID=55gq1nmcslsont6j33l1vdb461"
HTTP_HOST
"www.bhawani-medical.thepos.xyz"
HTTP_USER_AGENT
"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)"
DOCUMENT_ROOT
"/home/thepos.xyz/bhawani-medical"
REMOTE_ADDR
"216.73.216.61"
REMOTE_PORT
"24222"
SERVER_ADDR
"51.15.178.130"
SERVER_NAME
"www.bhawani-medical.thepos.xyz"
SERVER_ADMIN
"info.hostinglo@gmail.com"
SERVER_PORT
"443"
REQUEST_URI
"/"
HTTPS
"on"
X_SPDY
"HTTP2"
SSL_PROTOCOL
"TLSv1.3"
SSL_CIPHER
"TLS_AES_256_GCM_SHA384"
SSL_CIPHER_USEKEYSIZE
"256"
SSL_CIPHER_ALGKEYSIZE
"256"
LSWS_EDITION
"Openlitespeed 1.8.3"
X-LSCACHE
"on,crawler"
SCRIPT_FILENAME
"/home/thepos.xyz/bhawani-medical/index.php"
QUERY_STRING
""
SCRIPT_NAME
"/index.php"
SERVER_PROTOCOL
"HTTP/1.1"
SERVER_SOFTWARE
"LiteSpeed"
REQUEST_METHOD
"GET"
PHP_SELF
"/index.php"
REQUEST_TIME_FLOAT
1761271733.2334
REQUEST_TIME
1761271733
empty
0. Whoops\Handler\PrettyPageHandler