edit /etc/php/8.1/fpm/php.int:
upload_max_filesize = 200M
post_max_size = 300M
sudo systemctl restart php8.1-fpm
Go to: http://localhost/~chiao/phpinfo.php to check if it is changed.
edit /etc/php/8.1/fpm/php.int:
upload_max_filesize = 200M
post_max_size = 300M
sudo systemctl restart php8.1-fpm
Go to: http://localhost/~chiao/phpinfo.php to check if it is changed.
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
cf: http://linux.how2shout.com/how-to-install-phpmyadmin-on-debian-11-bullseye-apache/
sudo apt -y install php-cgi php-mysqli php-pear php-mbstring libapache2-mod-php php-common php-phpseclib php-mysqlwget https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-all-languages.tar.gzudo tar xvf phpMyAdmin-latest-all-languages.tar.gzsudo mv phpMyAdmin-*-all-languages/ /var/www/html/phpmyadmincd /var/www/html
sudo cp phpmyadmin/config.sample.inc.php phpmyadmin/config.inc.phpsudo mkdir /var/www/html/phpmyadmin/tmpopenssl rand -base64 32
(copy the output key)sudo vim /var/www/html/phpmyadmin/config.inc.phpPut the key in Step 6 into:
$cfg[‘blowfish_secret’] = ‘your-key‘; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */And add this line:
$cfg['TempDir'] = '/var/www/html/phpmyadmin/tmp';sudo chown -R www-data:www-data /var/www/html/phpmyadminsudo vim /etc/apache2/conf-available/phpmyadmin.confAdd the followings:
Alias /phpmyadmin /var/www/html/phpmyadmin
<Directory /var/www/html/phpmyadmin/>
AddDefaultCharset UTF-8
<IfModule mod_authz_core.c>
<RequireAny>
Require all granted
</RequireAny>
</IfModule>
</Directory>
<Directory /var/www/html/phpmyadmin/setup/>
<IfModule mod_authz_core.c>
<RequireAny>
Require all granted
</RequireAny>
</IfModule>
</Directory>sudo a2enconf phpmyadmin.confsudo systemctl restart apache2
Change this line:
$tempstore = \Drupal::service('user.private_tempstore')->get('appraisal_edit');
into
$tempstore = \Drupal::service('tempstore.private')->get('appraisal_edit');
Otherwise, the html lines inside php file would have error.
Error while exporting excel from FAHP online system:
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /usr/share/php/OLE.php on line 319
sudo vim +319 /usr/share/php/OLE.php
Change "continue" to "continue 2" as follows:
default:
#chiao, 2021-12-5
# continue;
continue 2;
Because Error msg:
Parse error: syntax error, unexpected 'new' (T_NEW) in /usr/share/php/Spreadsheet/Excel/Writer/Workbook.php on line 180
Edit the line 180 as:
# $this->_parser =& new Spreadsheet_Excel_Writer_Parser($this->_byte_order, $this->_BIFF_version);
$this->_parser =new Spreadsheet_Excel_Writer_Parser($this->_byte_order, $this->_BIFF_version);
And line 194 as:
# $this->_tmp_format =& new Spreadsheet_Excel_Writer_Format($this->_BIFF_version);
$this->_tmp_format =new Spreadsheet_Excel_Writer_Format($this->_BIFF_version);