2012-08-29 33 views
2

Apache似乎運行正常,當我進入xampp控制面板時,我可以檢查phpinfo(),並且所有內容都顯示正常。當我嘗試在瀏覽器中打開任何php文件時,該頁面爲空白。PHP文件無法在新的xampp安裝上運行

這裏是你使用的是Windows 7

我的Apache錯誤日誌

[Wed Aug 29 07:07:19.160419 2012] [ssl:warn] [pid 280:tid 376] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache] 
[Wed Aug 29 07:07:19.768831 2012] [mpm_winnt:notice] [pid 280:tid 376] AH00455: Apache/2.4.2 (Win32) OpenSSL/1.0.1c PHP/5.4.4 configured -- resuming normal operations 
[Wed Aug 29 07:07:19.768831 2012] [mpm_winnt:notice] [pid 280:tid 376] AH00456: Server built: May 13 2012 14:10:15 
[Wed Aug 29 07:07:19.768831 2012] [core:notice] [pid 280:tid 376] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache' 
[Wed Aug 29 07:07:19.768831 2012] [mpm_winnt:notice] [pid 280:tid 376] AH00418: Parent: Created child process 424 
[Wed Aug 29 07:07:20.673648 2012] [ssl:warn] [pid 424:tid 268] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache] 
[Wed Aug 29 07:07:20.767250 2012] [mpm_winnt:notice] [pid 424:tid 268] AH00354: Child: Starting 150 worker threads. 
[Wed Aug 29 07:18:17.441000 2012] [mpm_winnt:notice] [pid 280:tid 376] AH00422: Parent: Received shutdown signal -- Shutting down the server. 
[Wed Aug 29 07:19:34.371074 2012] [core:warn] [pid 1608:tid 376] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run? 
[Wed Aug 29 07:19:35.104275 2012] [ssl:warn] [pid 1608:tid 376] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache] 
[Wed Aug 29 07:19:38.193080 2012] [mpm_winnt:notice] [pid 1608:tid 376] AH00455: Apache/2.4.2 (Win32) OpenSSL/1.0.1c PHP/5.4.4 configured -- resuming normal operations 
[Wed Aug 29 07:19:38.224280 2012] [mpm_winnt:notice] [pid 1608:tid 376] AH00456: Server built: May 13 2012 14:10:15 
[Wed Aug 29 07:19:38.224280 2012] [core:notice] [pid 1608:tid 376] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache' 
[Wed Aug 29 07:19:38.317881 2012] [mpm_winnt:notice] [pid 1608:tid 376] AH00418: Parent: Created child process 2812 
[Wed Aug 29 07:19:40.221084 2012] [ssl:warn] [pid 2812:tid 268] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache] 
[Wed Aug 29 07:19:40.252284 2012] [mpm_winnt:notice] [pid 2812:tid 268] AH00354: Child: Starting 150 worker threads. 
+0

你可以在控制檯/命令中執行php嗎? –

+1

您是否在xampp/htdocs下創建了一個目錄Xampp將您的文件放在/ xampp/htdocs中,然後在瀏覽器中輸入http://localhost/test.php –

+0

不,但我刪除了test.php文件的內容,測試「並顯示。我知道它是針對正確的文件。編輯 - 我試過了,它也沒有工作。 – user1104854

回答

2

Windows 7中有一個使用端口80

以便Apache可能無法運行網絡服務器。 檢查端口80正在使用

要更改端口號XAMPP阿帕奇檢查這個環節 Xampp server port

+0

ServerName和Listen都設置爲80.在XAMPP控制面板上,Apache顯示爲在端口80和443上運行。 – user1104854

+0

檢查鏈接並更改Xampp服務器端口apache運行不正常,這就是php未執行的原因。將端口號更改爲8080,然後瀏覽器中的路徑爲'localhost:8080 /' –

+0

將其更改爲8080。謝謝! – user1104854

0

我有這種事發生在一個工作安裝和事實證明,Skype的正在運行和阻塞正常的端口I用過的。