2014-01-31 132 views
-1

內部的錯誤,我在我的Mac安裝phpMyAdmin的,我收到以下錯誤500在Mac上安裝phpMyAdmin OS

Internal Server Error 

The server encountered an internal error or misconfiguration and was unable to complete your request. 

Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error. 

More information about this error may be available in the server error log. 

MySQL的工作了,我已經在我的系統上安裝了PHP應用程序。這是我花了

的步驟我下載phpMyAdmin-4.1.6-english.zip解壓縮它,並把它移到到/usr/local/phpmyadmin416english改變config.sample.inc.phpconfig.inc.php。在config.inc.php裏面,我將$cfg['Servers'][$i]['host']的值更改爲127.0.0.1

$cfg['Servers'][$i]['auth_type'] = 'cookie'; 
/* Server parameters */ 
$cfg['Servers'][$i]['host'] = '127.0.0.1'; 
$cfg['Servers'][$i]['connect_type'] = 'tcp'; 
$cfg['Servers'][$i]['compress'] = false; 
/* Select mysql if your server does not have mysqli */ 
$cfg['Servers'][$i]['extension'] = 'mysqli'; 
$cfg['Servers'][$i]['AllowNoPassword'] = false; 

在我hosts文件我創建phpmyadmin.local指向127.0.0.1

在我的Apache vhost文件我增加了以下內容:

<VirtualHost *:80> 
     ServerName "phpmyadmin.local" 
     ServerAlias "phpmyadmin.local" 
     DocumentRoot "/Library/WebServer/Documents/phpmyadmin" 
</VirtualHost> 

我在index.php文件中做了一個HELLO WORLD在工作的/Library/WebServer/Documents/phpmyadmin的根。

我然後創建一個像這樣的.htaccess文件..

<Directory /usr/local/phpmyadmin416english> 
    Options Indexes 
    Order allow,deny 
    Allow from all 
</Directory> 

這一切是基於關閉此教程http://www.djangoapp.com/blog/2011/07/24/installing-phpmyadmin-on-mac-os-x-lion/

這是我在錯誤日誌中我得到

[Thu Jan 30 19:13:07 2014] [alert] [client 127.0.0.1] /Library/WebServer/Documents/phpmyadmin/.htaccess: <Directory not allowed here 
+0

只需將文件從'/ usr/local/phpmyadmin416english'移動到'/ Library/WebServer/Documens/phpmyadmin' –

+0

就可以節省很多麻煩,但是我想爲了它而工作知道如何做到這一點:)我已更新我的帖子與我在錯誤日誌中找到的信息 – numerical25

+0

[The * Directory * directive](http://httpd.apache.org/docs/current/mod/core.html#directory )只能在* server config *和* virtual host *上下文中使用 – Phil

回答

0

我修好了。我有點慢。這就是我所做的。我從htaccess文件中刪除了以下內容。因爲我猜目錄文件不是屬於那裏的。

<Directory /usr/local/phpmyadmin416english> 
    Options Indexes 
    Order allow,deny 
    Allow from all 
</Directory> 

然後我在虛擬主機文件改變了這...

<VirtualHost *:80> 
     ServerName "phpmyadmin.local" 
     ServerAlias "phpmyadmin.local" 
     DocumentRoot "/Library/WebServer/Documents/phpmyadmin" 
</VirtualHost> 

對此

<VirtualHost *:80> 
<Directory /> 
    Options FollowSymLinks 
    AllowOverride All 
    Order deny,allow 
    Allow from all 
</Directory> 
     ServerName "phpmyadmin.local" 
     ServerAlias "phpmyadmin.local" 
     DocumentRoot "/usr/local/phpmyadmin416english" 
</VirtualHost> 

我不是使DocumentRoot的指向webroot的目錄,我只是指出了虛擬主機文件在那裏。如果有人有任何問題,我想知道替代方法。