/home2/xelwelmain/beruju.xelwel.com/app/Models/EmailSetting.php
{
protected $table = 'email_configuration';
protected $guarded = [];
public static function get_email_configuration()
{
error_reporting(0);
$config_db = config('database');
if (!empty($config_db)) {
$default_db = $config_db['default'];
if (!empty($default_db)) {
$db_connection = $config_db['connections'][$default_db];
$servername = $db_connection['host'];
$database = $db_connection['database'];
$username = $db_connection['username'];
$password = $db_connection['password'];
// Create connection
$conn = mysqli_connect($servername, $username, $password, $database);
// Check connection
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
} else {
$sql = "SELECT ec.mail_from_name,ec.mail_from_address, ec.smtp_host, ec.smtp_user, ec.smtp_password, ec.smtp_port, ept.protocol_code, ept.protocal_name, ec.is_active, eet.encryption_code, eet.encryption_name FROM email_configuration ec INNER JOIN email_protocol_type ept ON ept.id = ec.email_protocol_typeid INNER JOIN email_encryption_type eet ON eet.id = ec.email_encryption_typeid WHERE ec.is_active = 'Y' ORDER BY ec.id DESC LIMIT 1";
$result = $conn->query($sql);
$conn->close();
if ($result->num_rows > 0) {
while ($row = $result->fetch_assoc()) {
$db_rsltArray = $row;
}
return $db_rsltArray;
} else {
return false;
}
}
}
}
Arguments
"Access denied for user 'root'@'localhost' (using password: YES)"
/home2/xelwelmain/beruju.xelwel.com/app/Models/EmailSetting.php
{
protected $table = 'email_configuration';
protected $guarded = [];
public static function get_email_configuration()
{
error_reporting(0);
$config_db = config('database');
if (!empty($config_db)) {
$default_db = $config_db['default'];
if (!empty($default_db)) {
$db_connection = $config_db['connections'][$default_db];
$servername = $db_connection['host'];
$database = $db_connection['database'];
$username = $db_connection['username'];
$password = $db_connection['password'];
// Create connection
$conn = mysqli_connect($servername, $username, $password, $database);
// Check connection
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
} else {
$sql = "SELECT ec.mail_from_name,ec.mail_from_address, ec.smtp_host, ec.smtp_user, ec.smtp_password, ec.smtp_port, ept.protocol_code, ept.protocal_name, ec.is_active, eet.encryption_code, eet.encryption_name FROM email_configuration ec INNER JOIN email_protocol_type ept ON ept.id = ec.email_protocol_typeid INNER JOIN email_encryption_type eet ON eet.id = ec.email_encryption_typeid WHERE ec.is_active = 'Y' ORDER BY ec.id DESC LIMIT 1";
$result = $conn->query($sql);
$conn->close();
if ($result->num_rows > 0) {
while ($row = $result->fetch_assoc()) {
$db_rsltArray = $row;
}
return $db_rsltArray;
} else {
return false;
}
}
}
}
Arguments
"localhost"
"root"
"xelwel@530"
"beruju_ims"
/home2/xelwelmain/beruju.xelwel.com/config/mail_old.php
<?php
use App\Models\EmailSetting;
$emailsetting = EmailSetting::get_email_configuration();
$mail_from_name = '';
$mail_from_address = '';
$smtp_host = '';
$smtp_user = '';
$smtp_password = '';
$smtp_port = '';
$protocol_code = '';
$protocal_name = '';
$encryption_code = '';
$encryption_name = '';
if (!empty($emailsetting)) {
$mail_from_address = $emailsetting['mail_from_address'];
$mail_from_name = $emailsetting['mail_from_name'];
$smtp_host = $emailsetting['smtp_host'];
$smtp_user = $emailsetting['smtp_user'];
$smtp_password = $emailsetting['smtp_password'];
$smtp_port = $emailsetting['smtp_port'];
$protocol_code = $emailsetting['protocol_code'];
$protocal_name = $emailsetting['protocal_name'];
$encryption_code = $emailsetting['encryption_code'];
$encryption_name = $emailsetting['encryption_name'];
}
return [
/*
|--------------------------------------------------------------------------
| Mail Driver
|--------------------------------------------------------------------------
|
/home2/xelwelmain/beruju.xelwel.com/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php
/**
* Load the configuration items from all of the files.
*
* @param \Illuminate\Contracts\Foundation\Application $app
* @param \Illuminate\Contracts\Config\Repository $repository
* @return void
*
* @throws \Exception
*/
protected function loadConfigurationFiles(Application $app, RepositoryContract $repository)
{
$files = $this->getConfigurationFiles($app);
if (! isset($files['app'])) {
throw new Exception('Unable to load the "app" configuration file.');
}
foreach ($files as $key => $path) {
$repository->set($key, require $path);
}
}
/**
* Get all of the configuration files for the application.
*
* @param \Illuminate\Contracts\Foundation\Application $app
* @return array
*/
protected function getConfigurationFiles(Application $app)
{
$files = [];
$configPath = realpath($app->configPath());
foreach (Finder::create()->files()->name('*.php')->in($configPath) as $file) {
$directory = $this->getNestedDirectory($file, $configPath);
$files[$directory.basename($file->getRealPath(), '.php')] = $file->getRealPath();
}
Arguments
"/home2/xelwelmain/beruju.xelwel.com/config/mail_old.php"
/home2/xelwelmain/beruju.xelwel.com/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php
public function bootstrap(Application $app)
{
$items = [];
// First we will see if we have a cache configuration file. If we do, we'll load
// the configuration items from that file so that it is very quick. Otherwise
// we will need to spin through every configuration file and load them all.
if (file_exists($cached = $app->getCachedConfigPath())) {
$items = require $cached;
$loadedFromCache = true;
}
// Next we will spin through all of the configuration files in the configuration
// directory and load each one into the repository. This will make all of the
// options available to the developer for use in various parts of this app.
$app->instance('config', $config = new Repository($items));
if (! isset($loadedFromCache)) {
$this->loadConfigurationFiles($app, $config);
}
// Finally, we will set the application's environment based on the configuration
// values that were loaded. We will pass a callback which will be used to get
// the environment in a web context where an "--env" switch is not present.
$app->detectEnvironment(function () use ($config) {
return $config->get('app.env', 'production');
});
date_default_timezone_set($config->get('app.timezone', 'UTC'));
mb_internal_encoding('UTF-8');
}
/**
* Load the configuration items from all of the files.
*
* @param \Illuminate\Contracts\Foundation\Application $app
* @param \Illuminate\Contracts\Config\Repository $repository
* @return void
Arguments
Illuminate\Foundation\Application {#2}
Illuminate\Config\Repository {#28}
/home2/xelwelmain/beruju.xelwel.com/vendor/laravel/framework/src/Illuminate/Foundation/Application.php
{
$this->register(new EventServiceProvider($this));
$this->register(new LogServiceProvider($this));
$this->register(new RoutingServiceProvider($this));
}
/**
* Run the given array of bootstrap classes.
*
* @param string[] $bootstrappers
* @return void
*/
public function bootstrapWith(array $bootstrappers)
{
$this->hasBeenBootstrapped = true;
foreach ($bootstrappers as $bootstrapper) {
$this['events']->dispatch('bootstrapping: '.$bootstrapper, [$this]);
$this->make($bootstrapper)->bootstrap($this);
$this['events']->dispatch('bootstrapped: '.$bootstrapper, [$this]);
}
}
/**
* Register a callback to run after loading the environment.
*
* @param \Closure $callback
* @return void
*/
public function afterLoadingEnvironment(Closure $callback)
{
return $this->afterBootstrapping(
LoadEnvironmentVariables::class, $callback
);
}
/**
* Register a callback to run before a bootstrapper.
Arguments
Illuminate\Foundation\Application {#2}
/home2/xelwelmain/beruju.xelwel.com/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php
Facade::clearResolvedInstance('request');
$this->bootstrap();
return (new Pipeline($this->app))
->send($request)
->through($this->app->shouldSkipMiddleware() ? [] : $this->middleware)
->then($this->dispatchToRouter());
}
/**
* Bootstrap the application for HTTP requests.
*
* @return void
*/
public function bootstrap()
{
if (! $this->app->hasBeenBootstrapped()) {
$this->app->bootstrapWith($this->bootstrappers());
}
}
/**
* Get the route dispatcher callback.
*
* @return \Closure
*/
protected function dispatchToRouter()
{
return function ($request) {
$this->app->instance('request', $request);
return $this->router->dispatch($request);
};
}
/**
* Call the terminate method on any terminable middleware.
*
Arguments
array:6 [
0 => "Illuminate\Foundation\Bootstrap\LoadEnvironmentVariables"
1 => "Illuminate\Foundation\Bootstrap\LoadConfiguration"
2 => "Illuminate\Foundation\Bootstrap\HandleExceptions"
3 => "Illuminate\Foundation\Bootstrap\RegisterFacades"
4 => "Illuminate\Foundation\Bootstrap\RegisterProviders"
5 => "Illuminate\Foundation\Bootstrap\BootProviders"
]
/home2/xelwelmain/beruju.xelwel.com/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php
$this->app['events']->dispatch(
new Events\RequestHandled($request, $response)
);
return $response;
}
/**
* Send the given request through the middleware / router.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
protected function sendRequestThroughRouter($request)
{
$this->app->instance('request', $request);
Facade::clearResolvedInstance('request');
$this->bootstrap();
return (new Pipeline($this->app))
->send($request)
->through($this->app->shouldSkipMiddleware() ? [] : $this->middleware)
->then($this->dispatchToRouter());
}
/**
* Bootstrap the application for HTTP requests.
*
* @return void
*/
public function bootstrap()
{
if (! $this->app->hasBeenBootstrapped()) {
$this->app->bootstrapWith($this->bootstrappers());
}
}
/**
/home2/xelwelmain/beruju.xelwel.com/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php
$router->middlewareGroup($key, $middleware);
}
foreach ($this->routeMiddleware as $key => $middleware) {
$router->aliasMiddleware($key, $middleware);
}
}
/**
* Handle an incoming HTTP request.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function handle($request)
{
try {
$request->enableHttpMethodParameterOverride();
$response = $this->sendRequestThroughRouter($request);
} catch (Exception $e) {
$this->reportException($e);
$response = $this->renderException($request, $e);
} catch (Throwable $e) {
$this->reportException($e = new FatalThrowableError($e));
$response = $this->renderException($request, $e);
}
$this->app['events']->dispatch(
new Events\RequestHandled($request, $response)
);
return $response;
}
/**
* Send the given request through the middleware / router.
*
Arguments
Illuminate\Http\Request {#46
+attributes: Symfony\Component\HttpFoundation\ParameterBag {#48}
+request: Symfony\Component\HttpFoundation\ParameterBag {#54}
+query: Symfony\Component\HttpFoundation\ParameterBag {#54}
+server: Symfony\Component\HttpFoundation\ServerBag {#50}
+files: Symfony\Component\HttpFoundation\FileBag {#51}
+cookies: Symfony\Component\HttpFoundation\ParameterBag {#49}
+headers: Symfony\Component\HttpFoundation\HeaderBag {#52}
#content: null
#languages: null
#charsets: null
#encodings: null
#acceptableContentTypes: array:1 [
0 => "*/*"
]
#pathInfo: null
#requestUri: null
#baseUrl: null
#basePath: null
#method: null
#format: null
#session: null
#locale: null
#defaultLocale: "en"
-preferredFormat: null
-isHostValid: true
-isForwardedValid: true
#json: null
#convertedFiles: null
#userResolver: null
#routeResolver: null
pathInfo: "/"
requestUri: "/"
baseUrl: ""
basePath: ""
method: "GET"
format: "html"
}
/home2/xelwelmain/beruju.xelwel.com/public/index.php
*/
$app = require_once __DIR__ . '/../bootstrap/app.php';
/*
|--------------------------------------------------------------------------
| Run The Application
|--------------------------------------------------------------------------
|
| Once we have the application, we can handle the incoming request
| through the kernel, and send the associated response back to
| the client's browser allowing them to enjoy the creative
| and wonderful application we have prepared for them.
|
*/
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
$response = $kernel->handle(
$request = Illuminate\Http\Request::capture()
);
$response->send();
$kernel->terminate($request, $response);
Arguments
Illuminate\Http\Request {#46
+attributes: Symfony\Component\HttpFoundation\ParameterBag {#48}
+request: Symfony\Component\HttpFoundation\ParameterBag {#54}
+query: Symfony\Component\HttpFoundation\ParameterBag {#54}
+server: Symfony\Component\HttpFoundation\ServerBag {#50}
+files: Symfony\Component\HttpFoundation\FileBag {#51}
+cookies: Symfony\Component\HttpFoundation\ParameterBag {#49}
+headers: Symfony\Component\HttpFoundation\HeaderBag {#52}
#content: null
#languages: null
#charsets: null
#encodings: null
#acceptableContentTypes: array:1 [
0 => "*/*"
]
#pathInfo: null
#requestUri: null
#baseUrl: null
#basePath: null
#method: null
#format: null
#session: null
#locale: null
#defaultLocale: "en"
-preferredFormat: null
-isHostValid: true
-isForwardedValid: true
#json: null
#convertedFiles: null
#userResolver: null
#routeResolver: null
pathInfo: "/"
requestUri: "/"
baseUrl: ""
basePath: ""
method: "GET"
format: "html"
}