[Fri Apr 20 22:06:04.940699 2018] [proxy:error] [pid 2141] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /var/run/php/php7.2-fpm.sock (*) failed
[Fri Apr 20 22:06:04.940775 2018] [proxy_fcgi:error] [pid 2141] [client 127.0.0.1:39546] AH01079: failed to make connection to backend: httpd-UDS
application
и system
на уровень выше отредактируйте переменные в файле index.php
./*
*---------------------------------------------------------------
* SYSTEM DIRECTORY NAME
*---------------------------------------------------------------
*
* This variable must contain the name of your "system" directory.
* Set the path if it is not in the same directory as this file.
*/
$system_path = '../system';
/*
*---------------------------------------------------------------
* APPLICATION DIRECTORY NAME
*---------------------------------------------------------------
*
* If you want this front controller to use a different "application"
* directory than the default one you can set its name here. The directory
* can also be renamed or relocated anywhere on your server. If you do,
* use an absolute (full) server path.
* For more info please see the user guide:
*
* https://codeigniter.com/user_guide/general/managing_apps.html
*
* NO TRAILING SLASH!
*/
$application_folder = '../application';
$loginsp
массив с хэшами паролей, а вместо $date['login']
, соответственно, хэш введённого пользователем пароля. $loginsp
- массив с логинами? <?php
$mysqli = new mysqli("localhost", "sandbox", "", "sandbox");
if ($mysqli->connect_errno) {
printf("Не удалось подключиться: %s\n", $mysqli->connect_error);
exit();
}
$query = "SELECT * FROM phonebook;";
$result = $mysqli->query($query);
$phonebook = [];
while($row = $result->fetch_array(MYSQLI_ASSOC)) $phonebook[] = $row;
$smarty = new Smarty();
$smarty->assign('phonebook', $phonebook);
$smarty->display('main.tpl');
$result->free();
$mysqli->close();
?>
array(2) {
[0]=>
array(4) {
["id"]=>
string(1) "1"
["name"]=>
string(25) "Фёдор Михалыч"
["phone"]=>
string(6) "118504"
["email"]=>
string(15) "hello@world.com"
}
[1]=>
array(4) {
["id"]=>
string(1) "2"
["name"]=>
string(29) "Пётр Евстахевич"
["phone"]=>
string(4) "5864"
["email"]=>
string(16) "admin@example.ru"
}
}
/news/1
и /?page=news&id=1
). Какой движок вы используете? Ну или более кардинальный метод - пишите безобразно и никому не нужную фигню - самый кардинальный метод)