Php версия:
введите описание изображения здесь
Когда я запрашиваю один из интерфейсов моего проекта CodeIgniter и echo phpinfo (), в сообщении отсутствует расширение redis. И проект загружает неправильную версию php, например:
введите описание изображения здесь
Да, у меня есть несколько версий php в моей MacOS.
Кто-нибудь может мне помочь с этим?
Мой проект имеет эту ошибку msg:
ERROR - 2019-01-09 04:18:05 --> Exception:Error::__set_state(array(
'message' => 'Class \'Redis\' not found',
'string' => '',
'code' => 0,
'file' => '/Users/charlie/IdeaProjects/my_project/src/application/libraries/My_Redis.php',
'line' => 93,
'trace' =>
array (
0 =>
array (
'file' => '/Users/charlie/IdeaProjects/my_project/src/application/libraries/My_Redis.php',
'line' => 51,
'function' => '_init',
'class' => 'My_Redis',
'type' => '->',
'args' =>
array (
0 =>
array (
'host' => '',
'port' => 6379,
'password' => '',
'timeout' => 2,
'persistent' => 0,
),
),
),
1 =>
array (
'file' => '/Users/charlie/IdeaProjects/my_project/src/application/libraries/My_Redis.php',
'line' => 35,
'function' => 'getInstance',
'class' => 'My_Redis',
'type' => '->',
'args' =>
array (
0 => 'supply_chain_busi',
),
),
2 =>
array (
'file' => '/Users/charlie/IdeaProjects/my_project/src/system/core/Loader.php',
'line' => 1095,
'function' => '__construct',
'class' => 'My_Redis',
'type' => '->',
'args' =>
array (
0 => 'supply_chain_busi',
),
),
3 =>
array (
'file' => '/Users/charlie/IdeaProjects/my_project/src/system/core/Loader.php',
'line' => 975,
'function' => '_ci_init_class',
'class' => 'CI_Loader',
'type' => '->',
'args' =>
array (
0 => 'my_redis',
1 => '',
2 =>
array (
0 => 'supply_chain_busi',
),
3 => 'redis',
),
),
4 =>
array (
'file' => '/Users/charlie/IdeaProjects/my_project/src/system/core/Loader.php',
'line' => 216,
'function' => '_ci_load_class',
'class' => 'CI_Loader',
'type' => '->',
'args' =>
array (
0 => 'My_Redis',
1 =>
array (
0 => 'supply_chain_busi',
),
2 => 'redis',
),
),
5 =>
array (
'file' => '/Users/charlie/IdeaProjects/my_project/src/application/libraries/Tank_auth.php',
'line' => 45,
'function' => 'library',
'class' => 'CI_Loader',
'type' => '->',
'args' =>
array (
0 => 'My_Redis',
1 =>
array (
0 => 'supply_chain_busi',
),
2 => 'redis',
),
),
6 =>
array (
'file' => '/Users/charlie/IdeaProjects/my_project/src/system/core/Loader.php',
'line' => 1095,
'function' => '__construct',
'class' => 'Tank_auth',
'type' => '->',
'args' =>
array (
0 =>
array (
'website_name' => 'mycom',
'webmaster_email' => 'webmaster@mycom.com',
'phpass_hash_portable' => true,
'phpass_hash_strength' => 8,
'allow_registration' => false,
'captcha_registration' => false,
'email_activation' => false,
'email_activation_expire' => 172800,
'email_account_details' => true,
'use_username' => true,
'username_min_length' => 4,
'username_max_length' => 20,
'password_min_length' => 4,
'password_max_length' => 20,
'login_by_username' => true,
'login_by_email' => true,
'login_record_ip' => true,
'login_record_time' => true,
'login_count_attempts' => true,
'login_max_attempts' => 99,
'login_attempt_expire' => 86400,
'autologin_cookie_name' => 'autologin',
'autologin_cookie_life' => 2592000,
'forgot_password_expire' => 900,
'captcha_path' => 'captcha/',
'captcha_fonts_path' => 'captcha/fonts/5.ttf',
'captcha_width' => 200,
'captcha_height' => 50,
'captcha_font_size' => 14,
'captcha_grid' => false,
'captcha_expire' => 180,
'captcha_case_sensitive' => false,
'use_recaptcha' => false,
'recaptcha_public_key' => '',
'recaptcha_private_key' => '',
'db_table_prefix' => '',
),
),
),
7 =>
array (
'file' => '/Users/charlie/IdeaProjects/my_project/src/system/core/Loader.php',
'line' => 975,
'function' => '_ci_init_class',
'class' => 'CI_Loader',
'type' => '->',
'args' =>
array (
0 => 'tank_auth',
1 => '',
2 =>
array (
'website_name' => 'mycom',
'webmaster_email' => 'webmaster@mycom.com',
'phpass_hash_portable' => true,
'phpass_hash_strength' => 8,
'allow_registration' => false,
'captcha_registration' => false,
'email_activation' => false,
'email_activation_expire' => 172800,
'email_account_details' => true,
'use_username' => true,
'username_min_length' => 4,
'username_max_length' => 20,
'password_min_length' => 4,
'password_max_length' => 20,
'login_by_username' => true,
'login_by_email' => true,
'login_record_ip' => true,
'login_record_time' => true,
'login_count_attempts' => true,
'login_max_attempts' => 99,
'login_attempt_expire' => 86400,
'autologin_cookie_name' => 'autologin',
'autologin_cookie_life' => 2592000,
'forgot_password_expire' => 900,
'captcha_path' => 'captcha/',
'captcha_fonts_path' => 'captcha/fonts/5.ttf',
'captcha_width' => 200,
'captcha_height' => 50,
'captcha_font_size' => 14,
'captcha_grid' => false,
'captcha_expire' => 180,
'captcha_case_sensitive' => false,
'use_recaptcha' => false,
'recaptcha_public_key' => '',
'recaptcha_private_key' => '',
'db_table_prefix' => '',
),
3 => NULL,
),
),
8 =>
array (
'file' => '/Users/charlie/IdeaProjects/my_project/src/system/core/Loader.php',
'line' => 216,
'function' => '_ci_load_class',
'class' => 'CI_Loader',
'type' => '->',
'args' =>
array (
0 => 'Tank_auth',
1 => NULL,
2 => NULL,
),
),
9 =>
array (
'file' => '/Users/charlie/IdeaProjects/my_project/src/system/core/Loader.php',
'line' => 1178,
'function' => 'library',
'class' => 'CI_Loader',
'type' => '->',
'args' =>
array (
0 => 'Tank_auth',
),
),
10 =>
array (
'file' => '/Users/charlie/IdeaProjects/my_project/src/system/core/Loader.php',
'line' => 152,
'function' => '_ci_autoloader',
'class' => 'CI_Loader',
'type' => '->',
'args' =>
array (
),
),
11 =>
array (
'file' => '/Users/charlie/IdeaProjects/my_project/src/system/core/Controller.php',
'line' => 51,
'function' => 'initialize',
'class' => 'CI_Loader',
'type' => '->',
'args' =>
array (
),
),
12 =>
array (
'file' => '/Users/charlie/IdeaProjects/my_project/src/application/libraries/REST_Controller.php',
'line' => 197,
'function' => '__construct',
'class' => 'CI_Controller',
'type' => '->',
'args' =>
array (
),
),
13 =>
array (
'file' => '/Users/charlie/IdeaProjects/my_project/src/application/controllers/api/my_project.php',
'line' => 11,
'function' => '__construct',
'class' => 'REST_Controller',
'type' => '->',
'args' =>
array (
),
),
14 =>
array (
'file' => '/Users/charlie/IdeaProjects/my_project/src/system/core/CodeIgniter.php',
'line' => 310,
'function' => '__construct',
'class' => 'my_project',
'type' => '->',
'args' =>
array (
),
),
15 =>
array (
'file' => '/Users/charlie/IdeaProjects/my_project/src/index.php',
'line' => 204,
'args' =>
array (
0 => '/Users/charlie/IdeaProjects/my_project/src/system/core/CodeIgniter.php',
),
'function' => 'require_once',
),
),
'previous' => NULL,
))
Остальная часть журнала похожа. Он просто не может найти класс Redis.