Author: 永夜
-
Post Views: 18 1. Prompt in phpstorm: potential polymorphic calls. There are no members in the hierarchy of requests. as shown in Figure 1 2. Print $this->request and confirm that it is yii\web\request object. as shown in Figure 2 3. This is because $this->request is not explicitly marked by the type, and phpstorm cannot confirm its class type (i.e. $this->request…
-
Post Views: 17 1. Report an error in Yii2: Model Not Inserted Due to Validation Error. as shown in Figure 1 2. The code is implemented as follows 3. However, !$input->save(false) does not report an error. Problem analysis, the value of value is 444 (integer), but the rule requires that value must be a string. You need to convert the…
-
Post Views: 54 1. When requesting the WeChat Mini Program interface: obtaining unrestricted applet code, an error is reported: errcode: 47001, errmsg: data format error Rid. as shown in Figure 1 2. Adjust the content-type of the request parameter and solve it. Then another error is reported: errcode: 41030, errmsg: invalid page Rid. as shown in Figure 2 3. Adjust…
-
Post Views: 17 1. The code is implemented as follows 2. But the verification failed, as shown in Figure 1 3. Since the format of H:I is the format in PHP. Set the string starting with php: to represent the date-time format that PHP can recognize. Verification passed. as shown in Figure 2
-
Post Views: 16 1. Request an HTTPS URL in curl, and the response is False’s troubleshooting analysis. var_dump($rst), whose value is false 2. Configure openssl.cafile in php.ini. False no longer responds after restarting php-fpm
-
Post Views: 23 1. Error report: call to undefined function common\models\exif_imageType error indicates that php cannot find the EXIF_IMAGETYPE function. EXIF_IMAGEType is a function in the EXIF extension of PHP to detect the type of image file. This error is caused if the extension is not installed or enabled. 2. In LNMP 2.1, install and enable the PHP EXIF extension…
-
Post Views: 17 1. The interface response is 500. as shown in Figure 1 2. Check the error log of nginx. Error report: php message: php warning: require(): open_basedir restriction in effect. file(/home/wwwroot/object/src/vendor/autoload.php) is not within the allowed path(s): as shown in Figure 2 3. Reference:lnmp add and delete virtual host and pseudo-static use tutorial to prevent cross-directory settings View…
-
Post Views: 16 1. Confirm the Web server user with the following command: , confirm as the WWW user. There are root users and WWW users in the system (web server users) 2. Set the owner of the project directory to root user: 3. Set directory permissions: 755: 4. Set the owner of the runtime directory to the WWW user:…
-
Post Views: 23 1. Check the /etc/os-release file, the operating system is CentOS Stream 9. 2. Reference:https://lnmp.org/install.htmlInstall the VPS or server with putty or similar ssh tools; after logging in, run: screen -s lnmp If the screen: command not found command does not exist can be executed: yum install screen Installation, prompt: not found. as shown in Figure 1 3.…