Php MAMP服务器正在运行,但显示;哎呀!Google Chrome找不到localhost:8888“;

Php MAMP服务器正在运行,但显示;哎呀!Google Chrome找不到localhost:8888“;,php,mysql,osx-snow-leopard,mamp,Php,Mysql,Osx Snow Leopard,Mamp,我正试着在雪豹身上奔跑。服务器是绿色的,可以正常工作,但每当我进入任何浏览器时,或多或少都会收到来自Chrome的“Oops”消息。我想不出问题出在哪里 在我的apache_error.log中,我得到: [Sun Dec 02 14:03:40 2012] [notice] Digest: generating secret for digest authentication ... [Sun Dec 02 14:03:40 2012] [notice] Digest: done [Sun D

我正试着在雪豹身上奔跑。服务器是绿色的,可以正常工作,但每当我进入任何浏览器时,或多或少都会收到来自Chrome的“Oops”消息。我想不出问题出在哪里

在我的apache_error.log中,我得到:

[Sun Dec 02 14:03:40 2012] [notice] Digest: generating secret for digest authentication ...
[Sun Dec 02 14:03:40 2012] [notice] Digest: done
[Sun Dec 02 14:03:40 2012] [notice] Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/0.9.8r DAV/2 PHP/5.4.4 configured -- resuming normal operations
[Sun Dec 02 14:14:12 2012] [notice] caught SIGTERM, shutting down
[Sun Dec 02 14:14:13 2012] [notice] Digest: generating secret for digest authentication...    
[Sun Dec 02 14:14:13 2012] [notice] Digest: done
[Sun Dec 02 14:14:13 2012] [notice] Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/0.9.8r DAV/2 PHP/5.4.4 configured -- resuming normal operations
[Sun Dec 02 14:27:55 2012] [notice] caught SIGTERM, shutting down
[Sun Dec 02 14:43:56 2012] [notice] Digest: generating secret for digest authentication ...
[Sun Dec 02 14:43:56 2012] [notice] Digest: done
[Sun Dec 02 14:43:56 2012] [notice] Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/0.9.8r DAV/2 PHP/5.4.4 configured -- resuming normal operations
[Sun Dec 02 15:04:14 2012] [notice] caught SIGTERM, shutting down
[Sun Dec 02 15:04:18 2012] [notice] Digest: generating secret for digest authentication ...
[Sun Dec 02 15:04:18 2012] [notice] Digest: done
[Sun Dec 02 15:04:18 2012] [notice] Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/0.9.8r DAV/2 PHP/5.4.4 configured -- resuming normal operations
[Sun Dec 02 15:04:24 2012] [notice] caught SIGTERM, shutting down
[Sun Dec 02 15:04:27 2012] [notice] Digest: generating secret for digest authentication ...
[Sun Dec 02 15:04:27 2012] [notice] Digest: done
[Sun Dec 02 15:04:27 2012] [notice] Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/0.9.8r DAV/2 PHP/5.4.4 configured -- resuming normal operations
mysql_error_log.err是:

121202 15:04:27 mysqld_safe Starting mysqld daemon with databases from /Applications/MAMP/db/mysql
121202 15:04:27 [Warning] You have forced lower_case_table_names to 0 through a command-line option, even though your file system '/Applications/MAMP/db/mysql/' is case insensitive.  This means that you can corrupt a MyISAM table by accessing it with different cases. You should consider changing lower_case_table_names to 1 or 2
121202 15:04:27 [Warning] One can only use the --user switch if running as root

121202 15:04:27 [Note] Plugin 'FEDERATED' is disabled.
121202 15:04:27 InnoDB: The InnoDB memory heap is disabled
121202 15:04:27 InnoDB: Mutexes and rw_locks use GCC atomic builtins
121202 15:04:27 InnoDB: Compressed tables use zlib 1.2.3
121202 15:04:27 InnoDB: Initializing buffer pool, size = 128.0M
121202 15:04:27 InnoDB: Completed initialization of buffer pool
121202 15:04:27 InnoDB: highest supported file format is Barracuda.
121202 15:04:27 InnoDB: 1.1.8 started; log sequence number 1595675
121202 15:04:27 [Note] Server hostname (bind-address): '0.0.0.0'; port: 8889
121202 15:04:27 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
121202 15:04:27 [Note] Server socket created on IP: '0.0.0.0'.
121202 15:04:27 [Note] Event Scheduler: Loaded 0 events
121202 15:04:27 [Note] /Applications/MAMP/Library/bin/mysqld: ready for connections.
Version: '5.5.25'  socket: '/Applications/MAMP/tmp/mysql/mysql.sock'  port: 8889  Source distribution

有什么帮助吗?

您说您的主机文件是空的,所以听起来计算机好像不知道“localhost”是什么。尝试向其中添加以下内容(完全复制此内容):


然后完全关闭并重新启动。看看这是否有帮助。

你确定apache配置为在8888上侦听吗?你能连接到localhost:8889吗?@GabrielSantos-Mysql使用MAMP在8889上侦听。@GabrielSantos不,我试过了,没有任何结果
http://127.0.0.1:8888
或在终端中运行
telnet 127.0.0.1 8888
-查看是否有任何内容正在侦听。在
/etc/hosts
中,您至少应该有一行:
127.0.0.1 localhost
谢谢您的帮助。Chrome的行为对我来说很奇怪。最初它加载得很好。但是当我点击refresh(F5)时,它给出了上面的错误消息,说它找不到那个服务器(“可能是localho.st?”)。然后在其他时候,它无法加载相关的js文件。在HOSTS文件中添加这些条目修复了该问题。无需重新启动(对于我来说,运行Windows 7)。
127.0.0.1   localhost

255.255.255.255 broadcasthost
::1             localhost 
fe80::1%lo0 localhost