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 NAO机器人的录音程序保存问题
    • ¥15 C#读写EXCEL文件,不同编译
    • ¥15 MapReduce结果输出到HBase,一直连接不上MySQL
    • ¥15 扩散模型sd.webui使用时报错“Nonetype”
    • ¥15 stm32流水灯+呼吸灯+外部中断按键
    • ¥15 将二维数组,按照假设的规定,如0/1/0 == "4",把对应列位置写成一个字符并打印输出该字符
    • ¥15 NX MCD仿真与博途通讯不了啥情况
    • ¥15 win11家庭中文版安装docker遇到Hyper-V启用失败解决办法整理
    • ¥15 gradio的web端页面格式不对的问题
    • ¥15 求大家看看Nonce如何配置