- 启动php监听
sudo php-fpm -D
sudo nginx
- php打开mysql有问题的解决方法:
启动mysql后,找文件:
find / -name mysql.sock
用 phpinfo(); 查看 .sock路径,建立映射
sudo ln -s /private/tmp/mysql.sock /var/mysql/mysql.sock
配置文件中 pdo_mysql.default_socket
/usr/local/nginx/conf/nginx.conf
location / {
root /Volumes/MACDATA/Programs/phpMyAdmin;
index index.php index.htm;
}
location ~ \.php$ {
#root
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /Volumes/MACDATA/Programs/phpMyAdmin$fastcgi_script_name;
include fastcgi_params;
}
分类:电脑技术
标签:
评论已关闭!