gpt4 book ai didi

mysql - XAMPP + OSX + Virtualhosts + 在 httpd.conf 中更改用户 = phpmyadmin 创建数据库不工作

转载 作者:行者123 更新时间:2023-11-30 23:29:40 26 4
gpt4 key购买 nike

我已经在 OSX Lion 上安装了 XAMPP。因为我想从我的一个开发文件夹中提供一个文件夹,所以我在 /Applications/XAMPP/xamppfiles/etc/extra/httpd-vhosts.conf

添加了一个虚拟主机
<VirtualHost *:80>
ServerAdmin email@gmail.com
DocumentRoot "/Users/myosxUsername/Documents/dir/dir/htdocs"
ServerName qmh
ErrorLog "logs/qmh-error_log"
CustomLog "logs/qmh-access_log" common
</VirtualHost>

并且还在hosts文件中添加了一个条目

127.0.0.1 qmh

由于服务器访问目录 /Users/myosxUsername/Documents/dir/dir/htdocs 的权限问题,我还将 httpd.conf 中的用户更改为我的 myosxUsername

User myosxusername
Group admin
# previous setting below
# User nobody
# Group nobody

在这些更改之后,虚拟主机工作正常。问题是,当我现在使用 phpmyadmin 创建新数据库时,我收到错误消息

db_create.php: Missing parameter: new_db

如果我将用户改回:

User nobody
Group nobody

然后 phpmyadmin 工作正常,但由于权限问题无法访问我的 virtualhost 目录。

我假设我必须以某种方式告诉 apache 不要以某种方式使用新用户访问 mysql?感谢您的帮助。谢谢

最佳答案

请参阅 phpMyAdmin 常见问题解答 (http://wiki.phpmyadmin.net/pma/FAQ_2.8) 中的第 2.8 项

  • In the php.ini directive session.save_path and upload_tmp_dir, if these directories don't exist, are read-only or not accessable (f.e. due to base_dir restrictions) this error will occur. See trk
    • PHP installed from a packages (eg. an rpm) might set the permissions on these directories for an assumed user (eg. 'apache'). - Users of other web servers, eg Lighttpd, may need to change the ownership of these directories (eg. to 'lighttpd').
    • On Windows, if PHP is using directories for session.save_path and upload_tmp_dir that are somewhere within the main "Temp" directory, you must create those directories yourself; unlike other Windows programs PHP will not create them itself.
  • If you are using Hardened-PHP (/suhosin patch) with the ini directive varfilter.max_request_variables set to the default (200) or another low value, you could get this error if your table has a high number of columns. Adjust this setting accordingly ( request limits, thanks to Klaus Dorninger for the hint).
  • In config.inc.php, try to leave the $cfg['PmaAbsoluteUri'] directive empty. See also FAQ 4.7.
  • Maybe you have a broken PHP installation or you need to upgrade your Zend Optimizer. See http://bugs.php.net/31134.
  • In the php.ini directive arg_separator.input, a value of ";" will cause this error. Replace it with "&;".

(来自 https://serverfault.com/questions/385465/phpmyadmin-missing-parameter 的提示)

关于mysql - XAMPP + OSX + Virtualhosts + 在 httpd.conf 中更改用户 = phpmyadmin 创建数据库不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11372079/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com