Macpro, php5.6 is installed with homebrew, and php-v is 5.6 in the terminal, but phpinfo () is accessed through the nginx server on the web page () it shows that php5.5 is still used by the system. This is the latest one. How can I solve the Mac pro problem? I installed php 5.6 with homebrew. in the terminal, php-v shows 5.6, but through the nginx server, accessing phpinfo () on a web page shows that php5.5 is still useless.
How can this problem be solved?
Reply content:
For Mac pro, php 5.6 is installed with homebrew. in the terminal, php-v is 5.6, but phpinfo () is accessed through the nginx server on the web page () it shows that php5.5 is still used by the system.
How can this problem be solved?
Nginx interacts with php through fascgi.
So you can modify the nginx configuration, listen to the php-fpm port of php5.6, and then restart nginx.
Google.
Make sure that the current HTTP server is nginx.
Nginx is generally used in combination with PHP-fpm. They are independent and interact with each other through the local network according to the FastCGI standard protocol. Therefore:
Stop the self-starting PHP-fpm Version 5.5, and add PHP-fpm version 5.6 to the auto-starting version to solve the problem.
This is because mac comes with php
The mac OS system provides many common environments for us. We do not need to install everything like windows, such as ruby, python, and php, before installing the environment you need, run the following command to verify whether the installation is complete.
5.5 is enough. Of course, I use the xampp integrated environment,
If you want to use homebrew, add the installed php location to the environment variable,
Edit.bash_profile
Add this sentence to the fileexport PATH=/Applications/XAMPP/xamppfiles/bin:$PATH
Set/Applications/XAMPP/xamppfiles/bin
Replace it with your own php Directory