doupao3662 2018-12-02 15:53
浏览 131

如何更改brew PHP目录

I've been trying to set up a web application for over 10 hours now

The most difficult part in this was setting up Memcached

I got it working with apache using php found here:

/Applications/XAMPP/xamppfiles/bin/php

but then I found out the routing was broken and needed nginx so I managed to somehow configure the nginx.conf but it is not letting me install Memcached now.

      location ~ \.php$ {
        root           html;
        include        fastcgi.conf;
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        #fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param  SCRIPT_FILENAME  /Applications/XAMPP/htdocs/rc$fastcgi_script_name;
        #include        fastcgi_params;
    }

This is my nginx.conf and the php version that is ran when opening this page localhost is the one that was installed using brew. This php version runs when I use sudo brew services start php71 but this php version doesn't let me install memcached, I have added the memcached.so to the extensions folder found in phpinfo() and added the extension=memcached.so line in php.ini

There are 2 ways to "fix" this issue: one is somehow getting memcached to work on php71 with brew OR somehow making brew use the other php found in XAMPP

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 基于卷积神经网络的声纹识别
    • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
    • ¥100 为什么这个恒流源电路不能恒流?
    • ¥15 有偿求跨组件数据流路径图
    • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
    • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
    • ¥15 CSAPPattacklab
    • ¥15 一直显示正在等待HID—ISP
    • ¥15 Python turtle 画图
    • ¥15 stm32开发clion时遇到的编译问题