DVWA 设置 PHP 函数 allow_url_include:已禁用
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/34274492/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
DVWA setup PHP function allow_url_include: Disabled
提问by Mette
I'm setting up DVWA on Windows via XAMPP, and I've searched in Google for about 24 hours - I cannot seem to find the answer.
我正在通过 XAMPP 在 Windows 上设置 DVWA,并且我已经在 Google 中搜索了大约 24 小时 - 我似乎找不到答案。
My problem is setting up the server:
我的问题是设置服务器:
PHP function `allow_url_include: Disabled`
My config file says it's enabled. Could it have something to do with my ports? Should I set up my server for outside access to my router, or is the internal IP access enough?
我的配置文件说它已启用。会不会和我的端口有关?我应该设置我的服务器以便外部访问我的路由器,还是内部 IP 访问就足够了?
When setting up my server I get this:
设置我的服务器时,我得到了这个:
Database Setup
Click on the 'Create / Reset Database' button below to create or reset your database.
If you get an error make sure you have the correct user credentials in: C:\XAMPP\htdocs\dvwa/config/config.inc.php
Setup Check Operating system: Windows Backend database: MySQL PHP version: 5.5.30
Web Server SERVER_NAME: 192.168.0.13
PHP function display_errors: Enabled (Easy Mode!) PHP function safe_mode: Disabled PHP function allow_url_include: Disabled PHP function allow_url_fopen: Enabled PHP function magic_quotes_gpc: Disabled PHP module php-gd: Installed
reCAPTCHA key: Missing
Writable folder C:\XAMPP\htdocs\dvwa/hackable/uploads/: Yes) Writable file C:\XAMPP\htdocs\dvwa/external/phpids/0.6/lib/IDS/tmp/phpids_log.txt: Yes
Status in red, indicate there will be an issue when trying to complete some modules.
数据库设置
单击下面的“创建/重置数据库”按钮以创建或重置您的数据库。
如果出现错误,请确保您在以下位置拥有正确的用户凭据:C:\XAMPP\htdocs\dvwa/config/config.inc.php
设置检查操作系统:Windows 后端数据库:MySQL PHP 版本:5.5.30
Web 服务器 SERVER_NAME:192.168.0.13
PHP 函数 display_errors:已启用(简易模式!) PHP 函数 safe_mode:已禁用 PHP 函数 allow_url_include:已禁用 PHP 函数 allow_url_fopen:已启用 PHP 函数 magic_quotes_gpc:已禁用 PHP 模块 php-gd:已安装
reCAPTCHA 密钥:丢失
可写文件夹 C:\XAMPP\htdocs\dvwa/hackable/uploads/:是)可写文件 C:\XAMPP\htdocs\dvwa/external/phpids/0.6/lib/IDS/tmp/phpids_log.txt:是
状态为红色,表示在尝试完成某些模块时会出现问题。
回答by manali pawar
To solve the issue, go to:
要解决此问题,请转到:
C:\xampp\php\php.ini
And change:
并改变:
allow_url_include=Off
To:
到:
allow_url_include=On
Then go to:
然后去:
C:\xampp\htdocs\DVWA\config\config.inc.php
And change:
并改变:
$_DVWA[ 'recaptcha_public_key' ] = ' ';
$_DVWA[ 'recaptcha_private_key' ] = ' ';
Into:
进入:
$_DVWA[ 'recaptcha_public_key' ] = '6LdK7xITAAzzAAJQTfL7fu6I-0aPl8KHHieAT_yJg';
$_DVWA[ 'recaptcha_private_key' ] = '6LdK7xITAzzAAL_uw9YXVUOPoIHPZLfw2K1n5NVQ';
回答by Chad D
I know this is two weeks old at this point but to fix this you will want to modify php.ini, at least on Linux. I haven't ran into this on Windows, but here is the line you need to change:
我知道这已经两周了,但要解决这个问题,您需要修改 php.ini,至少在 Linux 上是这样。我还没有在 Windows 上遇到过这个问题,但这是您需要更改的行:
; Whether to allow include/require to open URLs (like http:// or ftp://) as files.
; http://php.net/allow-url-include
allow_url_include=Off
Change that last line to:
将最后一行更改为:
allow_url_include=on
Now, restart the Apache server and reload the URL.
现在,重新启动 Apache 服务器并重新加载 URL。
回答by Uday
Found it for Windows and XAMPP installation. Don't bother to change values in php.ini
file located in DVWA
Folder. Instead, look for php.ini
located in XAMPP installation directory e.g. C:\xampp\php\php.ini
为 Windows 和 XAMPP 安装找到了它。不要费心更改php.ini
位于DVWA
文件夹中的文件中的值。相反,查找php.ini
位于 XAMPP 安装目录中,例如C:\xampp\php\php.ini
Search for the string:
搜索字符串:
allow_url_include=
Change the value to allow_url_include=On
and restart apache
.
将值更改为allow_url_include=On
并重新启动apache
。
回答by Wolfxana
Found the problems mates but this for windows but may apply for you
发现了问题,但这适用于 Windows,但可能适用于您
you need to apply the changes in the "phpForApache.ini" not the "php.in"
您需要应用“phpForApache.ini”而不是“php.in”中的更改
回答by Petr Javorik
For Kali Linux editing "apache2 wide" php.ini
worked for me:
对于 Kali Linux 编辑“apache2wide”php.ini
对我有用:
# updatedb
# locate php.ini
/etc/php/7.2/apache2/php.ini
/etc/php/7.2/cli/php.ini
/usr/lib/php/7.2/php.ini-development
/usr/lib/php/7.2/php.ini-production
/usr/lib/php/7.2/php.ini-production.cli
/var/www/html/DVWA-master/php.ini
# nano /etc/php/7.2/apache2/php.ini
CTRL + W, search for allow_url_include, set it On
CTRL + W,搜索allow_url_include,设置它On
# service restart apache2
And you should have allow_url_includeenabled
你应该启用allow_url_include
回答by admin
On ubuntu raise same question and I solve it.Just set
$_DVWA[ 'db_user' ] = 'root';
$_DVWA[ 'db_password' ] = '';
在 ubuntu 上提出同样的问题,我解决了它。只需设置
$_DVWA[ 'db_user' ] = 'root';
$_DVWA[ 'db_password' ] = '';