Category: Build
-
Post Views: 27 The background of the problem I run a WordPress-based bilingual website (Chinese/English), using polylang Plugins to manage multilingual content. In order to create corresponding English translations for existing Chinese categories/labels in batches, I wrote a php script polylang-batch-zh-to-en-tags.php. However, when executing the script, the terminal suddenly reported a fatal error: The script crashes directly and cannot continue…
-
Post Views: 53 1. My personal blog suddenly responded to 504’s investigation and resolution process today. as shown in Figure 1 2. 504 Gateway Timeout Description Nginx (or other reverse proxy) waits for the backend (PHP-FPM) response timeout. Check in the following order: 3. Execute the top command, the result is shown as follows: The problem is very clear, and…
-
Post Views: 19 1. In LNMP 2.1, delete the default Default virtual host process. Looking at the directory, only .user.ini is left in /home/wwwroot/default, and other files have been manually deleted. as shown in Figure 1 2. Reference: lnmp add and delete virtual host and pseudo-static use tutorialhttps://lnmp.org/faq/lnmp-vhost-add-howto.html. But there is no default virtual host. as shown in Figure 2…
-
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: 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.…
-
Post Views: 19 1. The current domain name is:https://learn-php-app-0605-prod.shuijingwanwq.com. Plan to switch to:https://learn-php-app-0605-prod.wangqiang.store. as shown in Figure 1 2. Add the DNS resolution of learn-php-app-0605-prod.wangqiang.store. as shown in Figure 2 3. Based on the virtual host before OneInStack delete: learn-php-0605-prod.shuijingwanwq.com, the directory should not be deleted. 4. Based on OneInstack Add a new virtual host: learn-php-app-0605-prod.wangqiang.store, the directory still uses…
-
Post Views: 155 1. There is a Shopify PHP application, which can already be previewed in the development environment. as shown in Figure 1 2. Now it is ready to be deployed to the production environment. Shopify recommends creating a separate application if you need to deploy the application to the production environment. This application shares the code base with…
-
Post Views: 28 1. Reference:Based on Alibaba Cloud’s ECS and RDS, the personal blog migration has been upgraded to: Docker (based on budget considerations, ultimately not realized), LNMP (CentOS 7.7, Nginx 1.16, MySQL 5.7, PHP 7.4), the process of HTTPS , the previous environment was based on the automatic installation of OneInstack. PHP version 7.4 is no longer eligible for…