Deprecated: Directive 'allow_url_include' is deprecated in Unknown on line 0
Asked Answered
B

6

14

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.

Burnoose answered 22/8, 2020 at 2:49 Comment(0)
D
8

Remove .htaccess or change name to .htaccess.backup and WP will generate new file based on your site configuration

Dipnoan answered 3/10, 2020 at 17:44 Comment(1)
Didn't work for me. I belive there is a limitation in my shared hosting provider :/Belak
N
7

Log into your website host and navigate to your public_html folder and find the php.ini file. Open the file and find this code:

; Whether to allow include/require to open URLs (like http:// or ftp://) as files.
; http://php.net/allow-url-include
allow_url_include = On

Change allow_url_include = On to allow_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

Numerology answered 16/6, 2021 at 23:53 Comment(0)
M
5

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.

Matheson answered 18/1, 2021 at 6:42 Comment(0)
B
1

If your web host uses Cpanel, log in and under the Software section click Select PHP Version, then on the next screen click Options. Under Options, unclick allow_url_include:

enter image description here

enter image description here

Bryner answered 6/2, 2022 at 17:58 Comment(1)
I don't see this option in my cpanelTemper
A
0

Please Update PHP version of your site through CPanel to 7.3. This fixed the issue for my site. Thank you!

Aleman answered 1/12, 2020 at 4:41 Comment(1)
didn't work for me. i am already on 7.4 (native) and changing didn't workTemper
T
0

My client had 2 .ini files, conflicting max_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.

Tooth answered 24/3, 2021 at 18:38 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.