What should I do if the basic system parameters of Dedecms are blank?
What should I do if the basic system parameters of dedecms are blank?
The basic system parameters of dedecms appear blank or display Call to undefined function make_hash()
Recommended learning: cms
The latest version of Dreamweaver (2018-01-09) modified common.func.php in the include folder and added two functions.
If the common.func.php file is provided in the downloaded template folder, it is very likely that these two functions are not available, which will cause an error.
You need to paste the code of these two functions into the /include/common.func.php file. The code is as follows:
function make_hash() { $rand = dede_random_bytes(16); $_SESSION['token'] = ($rand === FALSE) ? md5(uniqid(mt_rand(), TRUE)) : bin2hex($rand); return $_SESSION['token']; } function dede_random_bytes($length) { if (empty($length) OR ! ctype_digit((string) $length)) { return FALSE; } if (function_exists('random_bytes')) { try { return random_bytes((int) $length); } catch (Exception $e) { return FALSE; } } if (defined('MCRYPT_DEV_URANDOM') && ($output = mcrypt_create_iv($length, MCRYPT_DEV_URANDOM)) !== FALSE) { return $output; } if (is_readable('/dev/urandom') && ($fp = fopen('/dev/urandom', 'rb')) !== FALSE) { is_php('5.4') && stream_set_chunk_size($fp, $length); $output = fread($fp, $length); fclose($fp); if ($output !== FALSE) { return $output; } } if (function_exists('openssl_random_pseudo_bytes')) { return openssl_random_pseudo_bytes($length); } return FALSE; }
Paste the above code into
/* *
* Load the assistant. The system defaults to loading the assistant
just above this code.
The above is the detailed content of What should I do if the basic system parameters of Dedecms are blank?. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

Zend Studio 13.0.1
Powerful PHP integrated development environment

SublimeText3 English version
Recommended: Win version, supports code prompts!

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool