好的,所以(回顾性的,相当愚蠢),我把我的mamp版本(不是mamp)从5.3.28升级到5.4.10,尝试安装composer。现在,我的MAMP站点似乎没有加载。(我不是后援。)
1.我升级了mamp
在升级结束时,终端的最终消息如下:
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但是当我检查终端中的php版本时,它仍然是5.3.28。
2. MAMP开始页面加载,站点无法运行
突然间,我的MAMP网站都没有工作了。我在httpd-vhosts.conf中设置了虚拟主机(并使用sudo /etc/host)。这些已经工作了大约3年,没有问题。
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 803.重新安装MAMP
因此,我卸载并重新安装MAMP,并恢复了所有设置,这些设置仍然很好地加载( MAMP版本现在为5.6.7)。
4.尝试将mac php降级到5.3.28
然后,我试图将其降级到PHP 5.3.28,但当我尝试使用:
curl -s http://php-osx.liip.ch/install.sh | bash -s 5.3.28所以我就用:
curl -s http://php-osx.liip.ch/install.sh | bash -s 5.3它似乎已经降级为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当我检查php版本时,它仍然是'5.3.28‘:(
5.谁来救我
同样的问题依然存在。我不知道哪里出了问题,也不知道怎么解决。任何帮助都是非常感谢的!
运行Mac 10.7.5
发布于 2015-05-27 17:49:46
好的。于是MAMP就完全停止工作了。但尽管困难重重,我还是设法修好了它。
我遵循本指南并重新安装了PHP5.3:
http://benedmunds.com/php/2014/10/16/fixing-homebrew-php-apache-after-yosemite/
当我到达这一行时,我发现了一个错误:
$ brew reinstall php53 --with-mysql --with-pgsql --with-apache因此,我遵循了本指南的开头:https://rtcamp.com/tutorials/mac/osx-brew-php-mysql-nginx/
直到我到达安装线,再次尝试安装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花了一小段时间,结束了。重新启动MAMP,一切都恢复正常。
呼。
更新
加载MAMP起始页面后也有问题。通过阻止OSX apache运行来解决这些问题。肯定是被接管了什么的..。
sudo apachectl stophttps://stackoverflow.com/questions/30486073
复制相似问题