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 (希望可以解决问题)ma和mb文件无法正常打开,打开后是空白,但是有正常内存占用,但可以在打开Maya应用程序后打开场景ma和mb格式。
    • ¥20 ML307A在使用AT命令连接EMQX平台的MQTT时被拒绝
    • ¥20 腾讯企业邮箱邮件可以恢复么
    • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
    • ¥15 错误 LNK2001 无法解析的外部符号
    • ¥50 安装pyaudiokits失败
    • ¥15 计组这些题应该咋做呀
    • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?
    • ¥15 让node服务器有自动加载文件的功能
    • ¥15 jmeter脚本回放有的是对的有的是错的