2014-01-31 135 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的目录,我只是指出了虚拟主机文件在那里。如果有人有任何问题,我想知道替代方法。