In the Nginx environment CodeIgniter will appear some problems!
1, database driver connection failed!
The following problems occur:
A PHP Error was encounteredseverity: warningmessagefile or directoryfilename: mysqli/mysqli_driver.php
Workaround:
This issue is a problem with php.ini configuration.
By default the following configuration is empty, the following three options are set to your mysql.sock corresponding directory can be resolved. (The following configuration is under Mac)
Mysql.default_socket =/tmp/mysql.sock
pdo_mysql.default_socket=/tmp/mysql.sock
Mysqli.default_socket =/tmp/mysql.sock
2, appears only variable references should is returned by reference error
A PHP Error is encounteredseverity: noticemessage: Only variable references should is returned by R Eferencefilename: Core/common. Number: 257
Workaround:
Original code:
return $_config[0] =& $config;
After modification:
$_config[0] =& $config;
return $_config[0];
3. Session Error
A PHP Error was encounteredseverity: warningmessagemkdir(): Invalid pathfilename: Drivers/session_files_driver. Number: 117
Workaround:
Take CI 3.0 as an example:
Change the config configuration file to Sess_save_path as follows
$config [' sess_save_path '] = Fcpath. ' Public/sess_save_path ';
A collection of CodeIgniter problems under Nginx construction