Home › Forums › WoodMart support forum › Warning: file_get_contents
Warning: file_get_contents
- This topic has 11 replies, 3 voices, and was last updated 3 years, 4 months ago by Artem Temos.
-
AuthorPosts
-
July 30, 2021 at 8:44 pm #309805
GhasoParticipantDear Sir/Madam,
I have uploaded a Retail 2 demo and I’m having some problems with the svg icons.
“Warning: file_get_contents(https://****/wp-content/uploads/2019/05/call-icon.svg): failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden
in /****/domains/****/public_html/wp-content/plugins/woodmart-core/post-types.php on line 725”How can I fix it?
Thank you in advance for your help.
July 30, 2021 at 11:18 pm #309813
Elise NoromitMemberHello,
Please try to upload this SVG and let us know if there are any warnings. I attach SVG.
Most likely something is wrong with the SVG you are trying to upload.
Best Regards
Attachments:
You must be logged in to view attached files.July 31, 2021 at 2:57 pm #309904
GhasoParticipantThank you for your reply.
“Most likely something is wrong with the SVG you are trying to upload.” – These SVG files are uploaded together with the Retail 2 demo.
When I open a direct link to an SVG file (for example: https://****/wp-content/uploads/2019/05/call-icon.svg) it displays correctly.
July 31, 2021 at 6:52 pm #309913
Elise NoromitMemberHello,
Please, provide your site admin access to the private area.
Make the full backup of your site and confirm the permit for us to deactivate the plugins not related to the theme and switch to the parent theme for the while of checking what may take up to 15 minutes.
Best Regards
July 31, 2021 at 9:41 pm #309924
GhasoParticipantCould you please provide me your IP address? I need that to give you the access.
August 1, 2021 at 8:29 pm #309989
Elise NoromitMemberHello,
Here is my IP 37.115.27.175
Please provide access.
Best Regards
August 2, 2021 at 10:09 am #310086
GhasoParticipantPlease check the private area. Thank you!
August 3, 2021 at 6:12 am #310258
Artem TemosKeymasterHi,
It looks like your server blocks requests to load the SVG image with the help of the
file_get_contents
PHP funciton. You need to disable this restriction mechanism or consult with your hosting provider for help.Kind Regards
August 4, 2021 at 10:09 am #310559
GhasoParticipantHi,
They are told me that they turned on 2 options:
– Allow PHP function exec()
– Allow PHP function eval()But unfortunately the problem still persists.
Do you have any other solutions?Thank you!
August 4, 2021 at 11:25 am #310585
Artem TemosKeymasterThese functions have no relation to the problem. The problem is that the server blocks some HTTP requests. You can send them the error you mentioned in your first message for a better explanation
Warning: file_get_contents(https://****/wp-content/uploads/2019/05/call-icon.svg): failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden in /****/domains/****/public_html/wp-content/plugins/woodmart-core/post-types.php on line 725
August 4, 2021 at 12:36 pm #310613
GhasoParticipantI see the warning has gone but there is another problem. The icons are not displayed.
August 4, 2021 at 1:45 pm #310632
Artem TemosKeymasterTry to re-upload the icon with your own and test how it works. If it is still not visible, then the error is not gone. It is probably just hidden but the problem is still the same.
-
AuthorPosts
- You must be logged in to create new topics. Login / Register