failed to open stream: no suitable wrapper could be found in – error
I recently upgraded a site to PHP 5.x. The installation went fine, but I had several ugly errors on the website. Upon further review, I found that the php.ini file needed some updating. If you are running into this error, start by changing your php.ini file to reflect the following.
allow_url_include = On
If the above does not exist, just add the entire line.
You will most likely also be getting this error:
Warning: include() [function.include]: URL file-access is disabled in the server configuration in
Find and edit this line in your php.ini file. If it does not exist, just add it.
allow_url_fopen = On
After making those changes, your site should not be broken anymore. If you are on shared hosting, you may run into some problems and have to find another way to include those files. Contact your server administrators first though.
Related posts:
- Introduction to PHP Functions This is an introduction into the world of PHP functions....
- Give Browser Specific CSS Files With PHP Make every website display perfectly in every browser! A PHP...
- Its Time To Swim Up The SEO Stream I have found myself drifting outside the mainstream SEO standards...
You should sign up for my RSS feed here
Guyz,
I am very thankful to you for sharing valuable information.
That’s very impressive.
Hopefully this provides a solution to the errors I have been getting recently. I will let you know if this fixes my problem.
It works. Thank You for sharing this info with us!
It’s great when something works first try.
Thanks
Most of the web developers forget this simple step when they update their system from PHP4 to PHP5
Actually there are couple of ways to do it. You can edit the php.ini file or you can edit the .htaccess file globaly. But extra care should be taken while editing .htacesss..
.-= Alan@Tulsa Real Estate´s last blog ..Protecting your Tulsa Property from Flood Damage =-.
Guys and gals- the reason this was set to off in PHP 5 as a default is that its a security hole – can be used by hackers employing XSS attacks…. There are coding workarounds that will make your site secure.
I’m still facing the same problem guys. I’m using Xampp and its “allow_url_include = On” by default.
Let me know if anyone can suggest a better solution.
Thanks