У меня есть собственный домен, который я объявил внутри своего виртуального хоста и который ведет на страницу входа в систему. Домен связан с базой данных, импортированной в phpmyadmin. Однако после ввода имени пользователя и пароля меня перенаправляет на панель управления, но панель управления постоянно загружается. Как мне определить причину этой ошибки 500?
app\config\app:
namespace Config;
use CodeIgniter\Config\BaseConfig;
class App extends BaseConfig
{
/**
* --------------------------------------------------------------------------
* Base Site URL
* --------------------------------------------------------------------------
*
* URL to your CodeIgniter root. Typically this will be your base URL,
* WITH a trailing slash:
*
* http://example.com/
*
* If this is not set then CodeIgniter will try guess the protocol, domain
* and path to your installation. However, you should always configure this
* explicitly and never rely on auto-guessing, especially in production
* environments.
*
* @var string
*/
public $baseURL = 'http://local.example.com/';
public function __construct()
{
if ($_SERVER['SERVER_NAME']== 'local.example.com') {
$this->baseURL = 'http://local.example.com/';
}
}
...
app\Config\database:
class Database extends Config
{
/**
* The directory that holds the Migrations
* and Seeds directories.
*
* @var string
*/
public $filesPath = APPPATH . 'Database' . DIRECTORY_SEPARATOR;
/**
* Lets you choose which connection group to
* use if no other is specified.
*
* @var string
*/
public $defaultGroup = 'default';
/**
* The default database connection.
*
* @var array
*/
public $default = [
'DSN' => '',
'hostname' => '127.0.0.1',
'username' => 'root',
'password' => '',
'database' => '*database name on phpmyadmin*',
'DBDriver' => 'MySQLi',
'DBPrefix' => '',
'pConnect' => false,
'DBDebug' => (ENVIRONMENT !== 'production'),
'charset' => 'utf8',
'DBCollat' => 'utf8_general_ci',
'swapPre' => '',
'encrypt' => false,
'compress' => false,
'strictOn' => false,
'failover' => [],
'port' => 3306,
];
...
httpd-vhosts.conf:
ServerName local.example.com
DocumentRoot "C:\xxxxx\xxxxx\Desktop\XAMPP Folder\htdocs\xxxxxx\public"
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
# LimitRequestBody 10737418240
драйверы\etc\hosts:
127.0.0.1 local.example.com
# localhost name resolution is handled within DNS itself.
127.0.0.1 localhost
::1 localhost
127.0.0.1 local.example.com
Подробнее здесь: https://stackoverflow.com/questions/790 ... rver-error
GET http://local.example.com/edi_orders 500 (внутренняя ошибка сервера) ⇐ Php
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение