我正在使用MAMP,但會話時出現問題。我的代碼完全適用於WAMP,但對MAMP不起作用,我也不知道爲什麼。我看了phpinfo,但是MAMP和WAMP之間的會話也是一樣的。會話無法在MAMP上工作
PHP日誌文件: [01-May-2012 12:18:28] PHP Warning: session_start() [<a href='function.session- start'>function.session-start</a>]: Cannot send session cookie - headers already sent by (output started at /Applications/MAMP/htdocs/Website/index.php:7) in /Applications/MAMP/htdocs/Website/header.php on line 2 [01-May-2012 12:18:28] PHP Warning: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /Applications/MAMP/htdocs/Website/index.php:7) in /Applications/MAMP/htdocs/Website/header.php on line 2
Apache日誌文件: [Tue May 01 12:03:29 2012] [notice] Digest: generating secret for digest authentication ... [Tue May 01 12:03:29 2012] [notice] Digest: done [Tue May 01 12:03:29 2012] [notice] Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8r DAV/2 PHP/5.3.6 configured -- resuming normal operations [Tue May 01 12:04:11 2012] [notice] caught SIGTERM, shutting down [Tue May 01 12:04:24 2012] [notice] Digest: generating secret for digest authentication ... [Tue May 01 12:04:24 2012] [notice] Digest: done [Tue May 01 12:04:24 2012] [notice] Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8r DAV/2 PHP/5.3.6 configured -- resuming normal operations [Tue May 01 12:05:11 2012] [error] [client 127.0.0.1] client denied by server configuration: /Applications/MAMP/htdocs/.DS_Store
他們爲什麼不起作用?
謝謝。
你有一個分爲訪問和錯誤日志之間的apache日誌(MAMP/logs/apache_access_log)。我會在那裏看看。 apache可能會給你一個錯誤 –
我在我的帖子中有日誌 – Guillaume