2014-02-16 129 views
2

我試圖安裝工藝CMS和我收到以下錯誤PHP文件無法找到

Could not find your craft/ folder. Please ensure that $craftPath is set correctly in /var/www/index.php 

這是我的index.php文件夾看起來像

必要的文件夾
<?php 

// Path to your craft/ folder 
$craftPath = '../craft'; 

// Do not edit below this line 
$path = rtrim($craftPath, '/').'/app/index.php'; 

if (!is_file($path)) 
{ 
     exit('Could not find your craft/ folder. Please ensure that <strong><code>$craftPath</code></strong> is set correctly in '.__FILE__); 
} 

require_once $path; 

工藝文件夾只是www上面的一個目錄,不明白爲什麼找不到它。

這裏是我的apache2.conf文件,我想有所作爲的部分,該文件是大,我無法弄清楚如何複製納米

Include /etc/phpmyadmin/apache.conf 

DocumentRoot /var/www 


ServerRoot "/etc/apache2" 

enter image description here

整件事
+0

Im和使用有預置的燈安裝。 –

回答

0

嘗試使用這樣的:

$craftPath = './craft'; 

,而不是

$craftPath = '../craft'; 
+0

沒有骰子,該文件夾在上面不在同一目錄 –

+0

我添加了文件目錄的屏幕截圖。 –

0

您可能無權訪問該目錄。嘗試更改目錄權限。

chmod a+x ../craft 

如果不工作只是將其移動到文件夾www,只是在數字海洋使用Ubuntu設置$craftPath'craft'

+0

試過所有組合無法工作我得到這個錯誤重置apache根@ cms:/ var/www#sudo服務apache2重裝 *重新加載web服務器配置apache2 [Sun Feb 16 04:04:23 2014] [警告] NameVirtualHost * :80沒有虛擬主機 –

+0

我認爲問題是工藝目錄不在'www'(腳本正在執行中),所以你沒有訪問權限。你已經嘗試將其移動到目錄中? – julienhaversano

+0

我剛將它移入www​​目錄。它在我的ftp中,當我在ssh中查看時。 –