[英]Upgraded PHP version to 5.4.1, MAMP URLs broken, so downgraded but still broken?
OK, so (retrospectively, quite stupidly), I upgraded my mac osx PHP version (not mamp php) from 5.3.28 to 5.4.10, to try and install composer. 好的,所以(回顾起来,非常愚蠢),我将mac osx PHP版本(不是mamp php)从5.3.28升级到了5.4.10,以尝试安装作曲家。 Now my MAMP sites don't seem to be loading.
现在,我的MAMP网站似乎没有加载。 (I am not a backender.)
(我不是支持者。)
1. I upgraded mamp 1.我升级了功放
At the end of the upgrade the final messages in terminal were as follows: 升级结束时,终端中的最终消息如下:
Create symlink /usr/local/php5/entropy-php.conf /etc/apache2/other/+php-osx.conf
Restarting Apache
httpd: Could not reliably determine the server's fully qualified domain name, using 192.168.0.2 for ServerName
Syntax OK
But when I checked the php version in terminal, it still said 5.3.28. 但是当我在终端中检查php版本时,它仍然显示5.3.28。
2. MAMP start page loaded, sites didn't work 2. MAMP起始页已加载,网站无法正常工作
Suddenly none of my MAMP sites were working. 突然,我的MAMP站点都没有工作。 I have set the virtual hosts in httpd-vhosts.conf (and using sudo vim /etc/hosts).
我已经在httpd-vhosts.conf中设置了虚拟主机(并使用sudo vim / etc / hosts)。 These have been working for like 3 years with no problem.
这些已经工作了3年没有问题。
MAMP still loads the start page, but when I load a site I get: MAMP仍然加载起始页面,但是当我加载网站时,我得到:
Not Found
The requested URL / was not found on this server.
Apache/2.2.26 (Unix) PHP/5.4.41 DAV/2 Server at domain.dev Port 80
3. Reinstalled MAMP 3.重新安装了MAMP
So I then uninstalled and reinstalled MAMP, and restored all my settings, which again still loads up fine (the MAMP php version is now 5.6.7). 因此,我然后卸载并重新安装了MAMP,并恢复了我的所有设置,这些设置仍然可以正常加载(MAMP php版本现在为5.6.7)。
4. Tried downgrading mac php back to 5.3.28 4.尝试将Mac php降级到5.3.28
I then tried to downgrade back to PHP 5.3.28, but that wouldn't work when I tried to use: 然后,我尝试降级到PHP 5.3.28,但是当我尝试使用时,这将不起作用:
curl -s http://php-osx.liip.ch/install.sh | bash -s 5.3.28
So I just used: 所以我只是用了:
curl -s http://php-osx.liip.ch/install.sh | bash -s 5.3
And it appears to have downgraded to 5.3.29 , but with the following error at the end: 它似乎已降级为5.3.29 ,但最终出现以下错误 :
Executing post-install script /tmp/5.3-frontenddev-post-install
Restarting Apache
httpd: Syntax error on line 665 of /private/etc/apache2/httpd.conf: Syntax error on line 8 of /etc/apache2/other/+php-osx.conf: Cannot load /usr/local/php5/libphp5.so into server: dlopen(/usr/local/php5/libphp5.so, 10): Symbol not found: _libiconv\n Referenced from: /usr/local/php5/lib/libintl.8.dylib\n Expected in: /usr/lib/libiconv.2.dylib\n in /usr/local/php5/lib/libintl.8.dylib
When I check the php version, it still says '5.3.28' :( 当我检查php版本时,它仍然显示'5.3.28':(
5. Someone save me 5.有人救我
The exact same problem persists. 完全相同的问题仍然存在。 I have no idea what's gone wrong or how to fix it.
我不知道出了什么问题或如何解决。 Any help would be super appreciated!
任何帮助将不胜感激!
Running Mac Lion 10.7.5 运行Mac Lion 10.7.5
OK. 好。 So MAMP then stopped working completely.
因此,MAMP随后完全停止工作。 But against all odds, I managed to fix it.
但是,尽管有种种困难,我还是设法解决了。
I followed this guide and reinstalled PHP 5.3: 我遵循了本指南并重新安装了PHP 5.3:
http://benedmunds.com/php/2014/10/16/fixing-homebrew-php-apache-after-yosemite/ http://benedmunds.com/php/2014/10/16/fixing-homebrew-php-apache-after-yosemite/
I got an error when I got to this line: 当我到达这一行时出现错误:
$ brew reinstall php53 --with-mysql --with-pgsql --with-apache
So I followed the beginning of this guide: https://rtcamp.com/tutorials/mac/osx-brew-php-mysql-nginx/ 因此,我遵循了本指南的开头: https : //rtcamp.com/tutorials/mac/osx-brew-php-mysql-nginx/
Until I got to the install line tried it again to install 5.3: 在我到达安装线之前,再次尝试安装5.3:
brew search php
brew tap josegonzalez/php
brew tap homebrew/dupes
brew options php53
brew reinstall php53 --with-mysql --with-pgsql --with-apache
Took a little while, finished up. 花了一段时间,结束了。 Restarted MAMP, and everything works again.
重新启动MAMP,一切都会再次正常。
Phew. ew
Update 更新资料
Had issues loading the MAMP start page too afterwards. 之后也出现了加载MAMP起始页的问题。 Solved them by stopping OSX apache from running.
通过停止运行OSX Apache解决了这些问题。 It must have been taking over or something...
一定是接管了什么...
sudo apachectl stop
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.