Comments (5)
@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.
Related: #19 #25 and possibly others.
from brew-php-switcher.
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.
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.
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)
- php-brew-switcher 5.6 only effected in Cli, but not php-fpm HOT 1
- Add support for v7.3 HOT 3
- Fork for maintainability? HOT 3
- Cannot switch to PHP @7.1 HOT 5
- version 2.1 not release HOT 5
- Creating a file called 101300 HOT 1
- Ports to Linux? HOT 3
- icu4c PHP dependency HOT 4
- PATH env var HOT 1
- bison: undefined method `uses_from_macos'
- brew-php-switcher still shows either version in iTerm after switching HOT 2
- apache not restarted HOT 2
- Have you tested with PHP v8 HOT 1
- Unknown version of PHP 8 HOT 3
- apache config does not change HOT 2
- Tag a new version 2.5 for PHP 8.2 support HOT 2
- Switch to 8.2 HOT 2
- Doesn't support php 8.2 HOT 3
- Please support PHP 8.2 and httpd install by homebrew HOT 5
- Please add support for php 8.3 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from brew-php-switcher.