DVWA setup PHP function allow_url_include: Disabled
You are encountering a persistent configuration error on your local development environment because allow_url_include is set to Off by default in modern PHP builds. You checked your php.ini file, confirmed the setting looks correct, yet the DVWA setup script still reports it as Disabled. This discrepancy usually stems from how XAMPP manages its configuration files rather than a misunderstanding of network ports or router settings.
The core issue is that XAMPP does not use a single global php.ini for every PHP process running on the system. Instead, the Apache module (mod_php) and the CLI (Command Line Interface) often load separate configuration files. Even if you edited the main C:\xampp\php\php.ini, the Apache server might be reading from a specific file located in your installation directory that overrides or ignores your global changes.
To resolve this, you must locate the active configuration file used by the Apache module specifically for XAMPP. Navigate to C:\xampp\apache\conf\extra\php.ini. Check this file first; if the line allow_url_include = Off exists there, change it to On. If that file does not exist or is empty, you need to create a custom configuration file within the extra folder and name it custom.ini. Inside this new file, add the directive:
allow_url_include = On
allow_url_fopen = On
After saving the file, restart the Apache service via the XAMPP Control Panel. The setup script will re-run its checks only after a full server restart, not just when you modify the file. Failing to restart Apache is the most common reason developers believe their configuration changes haven't taken effect.
There are trade-offs to consider when enabling this directive in a production environment versus a local lab like DVWA. In a real-world scenario, allowing PHP to include files from URLs (like http://example.com/file.php) significantly increases the attack surface. An attacker could potentially exploit vulnerabilities in remote servers to execute arbitrary code on your machine. This is why frameworks and security guidelines default this setting to Off.
DVWA, however, is designed explicitly for training these specific vulnerabilities. The "External File Inclusion" module relies on this setting being enabled to function. Disabling it renders the lab unusable for its intended purpose. While enabling allow_url_fopen (which you already have enabled) allows reading remote files, combining it with allow_url_include enables the full scope of Remote Code Execution attacks that the tool simulates.
Network configuration is unrelated to this specific error. The fact that your Web Server SERVER_NAME shows 192.168.0.13 indicates Apache is binding correctly to your local interface. The error message regarding allow_url_include is purely a PHP runtime configuration check, not a firewall or port forwarding issue. You do not need to open specific ports on your router for this PHP directive to change; the setting controls how the PHP interpreter parses the include function arguments, independent of network accessibility.
Once you have updated the custom config file and restarted Apache, run the DVWA setup check again. The status should turn green, confirming that the vulnerability is now enabled within your local sandbox. If you are building a similar application with Laravel, remember that while you can configure this in php.ini, best practices suggest keeping it disabled in production and using middleware to handle file uploads securely instead of relying on dangerous PHP directives.