I upload my Laravel project on shared hosting. When I upload my project on the server it throws an exception then switched my PHP version 5.4 to 7.4. Now am facing this issue.
Deprecated: Directive 'allow_url_include' is deprecated in Unknown on line 0
I also disable the allow_url_include in my PHP ini file which exists in project root directory but it still says allow_url_include depreciated error.
Also, I go into the PHP Multi INI Editor and change the allow_url_include but it still throw the above error.
6
Answers
Remove .htaccess or change name to .htaccess.backup and WP will generate new file based on your site configuration
Please Update PHP version of your site through CPanel to 7.3. This fixed the issue for my site. Thank you!
In case anyone comes across this:
Make sure that .htaccess files at all levels do not have conflicting code.
That is, I found that my "…/public_html/.htaccess" did not have any conflicts. However, I also had an .htaccess file in the folder level above that and it included code that read:
# Use PHP71 as default AddHandler application/x-httpd-php71 .php <IfModule mod_suphp.c> suPHP_ConfigPath /opt/php71/lib </IfModule>
Commenting this out resolved the error for me.
My client had 2
.ini
files, conflictingmax_input_var
.Deleting
user.ini
worked for me! Payment options were greyed out in WooCommerce. Now they are showing and this "allow_url" error is gone.Log into your website host and navigate to your
public_html
folder and find thephp.ini
file. Open the file and find this code:Change
allow_url_include = On
toallow_url_include = Off
and save the file.This should fix the error.
Additional detail located here:
https://www.php.net/manual/en/filesystem.configuration.php#ini.allow-url-include
If your web host uses Cpanel, log in and under the
Software
section clickSelect PHP Version
, then on the next screen clickOptions
. Under Options, unclickallow_url_include
: