In my spare time when building websites and servers, I searched online for a free web management panel called wdcp, through which you can easily install, configure and manage a variety of software used on the website, including MySQL, PHP, and Apache. wait. However, after trying it, I found that when I chose to install PHP in wdcp, we found that PHP was not installed correctly, so I had to continue searching for the reason.
The first step, check the environment
First of all, what I thought of was to check the reason why PHP installation failed. By checking the system log and the system environment settings on the wdcp console, and excluding other possible causes, everything shows that everything is normal. I found that the PHP installation package here is the latest version downloaded from PHP.net, and the system version is also the latest.
The second step is to find solutions
With this information, I started to look for solutions on the Internet. Found a lot of people with the same problem, but most of the solutions are unverified. Most of the solutions are recommended to update the system version, re-download the PHP installation package, uninstall wdcp, etc. However, I think that these methods are not very reliable, because my system is the latest version, and PHP and wdcp are also the latest versions.
The third step, try to install manually
In order to solve the problem, I decided to install PHP manually and configure it. I first downloaded a PHP installation package for Linux systems from the official website, then used the command line tool (Terminal) to enter the installation directory, and used the following commands to decompress and install:
①tar -zxvf php- 5.x.x.tar.gz
②cd php-5.x.x
③./configure --prefix=/usr/local/php --with-config-file-path=/etc/php.ini -- enable-fpm --with-fpm-user=www --with-fpm-group=www --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with -zlib --with-iconv --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-mcrypt - -enable-fpm --enable-mbregex --enable-mbstring --with-mysql --with-mysql-sock=/var/run/mysql/mysql.sock --with-pdo-mysql --enable-pcntl - -enable-opcache --enable-zip --with-pear
These commands will unzip, install, compile and configure PHP. Sometimes you need to adjust some parameters based on your specific deployment situation. Finally, I made sure PHP was working with the following commands:
①cd /usr/local/php
②cp php.ini-development /etc/php.ini
③cp sapi/fpm/init.d .php-fpm /etc/init.d/php-fpm
④chmod x /etc/init.d/php-fpm
⑤service php-fpm start
Using these commands I have been able to Successfully installed PHP and set it up to work properly in the wdcp configuration file. This way, my server can now display normal PHP pages with support from Apache.
End
In general, when using wdcp and there is a problem that PHP cannot be installed correctly, you can try to install PHP manually and set it to normal working status in the configuration of wdcp. Additionally, you need to ensure that the server's environment settings, system versions, and related tools match the required software. Through this process of learning, I not only solved the problems in wdcp, but also learned more about the settings of the server environment, and felt deeply about my gains.
The above is the detailed content of wdcp does not install PHP. For more information, please follow other related articles on the PHP Chinese website!