Coder Social home page Coder Social logo

Comments (5)

glassdimly avatar glassdimly commented on August 21, 2024 4

@4bai's suggestion works. However, it's a hacky workaround -- apache_conf_path should be a global variable so it can be overridden in ~/.bash_profile.

from brew-php-switcher.

star-szr avatar star-szr commented on August 21, 2024

Related: #19 #25 and possibly others.

from brew-php-switcher.

4bai avatar 4bai commented on August 21, 2024

You just have to change the path in this file: /usr/local/Cellar/brew-php-switcher/1.7/bin/phpswitch.sh
Line 40 apache_conf_path="/usr/local/etc/httpd/httpd.conf"

Then its working like charm

from brew-php-switcher.

theteknocat avatar theteknocat commented on August 21, 2024

It's also more than just the path to the apache conf file, there's also the matter of what means by which it should restart apache. If you're using home-brew apache, then it should call "brew services restart httpd" rather than sudo apachectl restart. I mean it could use apachectl, but it shouldn't do it as root with the home-brew installed version.

It might be prudent to allow a configuration file in your home folder for this specifically, so you can specify whatever config options are needed to let this script know what to do - which conf file to modify, and what means by which to restart apache.

from brew-php-switcher.

jiayouzl avatar jiayouzl commented on August 21, 2024

v2.4
apache_conf_path="/etc/apache2/httpd.conf" in 55 line

sudo apachectl stop
sudo apachectl start
in 150 and 151 line.

Change
apache_conf_path="/opt/homebrew/etc/httpd/httpd.conf"

sudo brew services stop httpd
sudo brew services start httpd

from brew-php-switcher.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.