Home › Forums › WoodMart support forum › PHP warning failed to open steam 403 forbidden
PHP warning failed to open steam 403 forbidden
- This topic has 11 replies, 3 voices, and was last updated 10 months, 1 week ago by Artem Temos.
-
AuthorPosts
-
March 7, 2024 at 12:48 am #546807
Puddle123ParticipantHi,
Since moving to a new web-host. Some SVG images have stopped showing on my website. The images relate to icons used as part of information boxes created on WPBakery builder.
I contacted the host and they said:
“These are Php warnings related to the plugin woodmart core which is sending request with an empty user-agent and getting this as we don’t allow an empty user-agent. You can ignore it, but it would be better if the developer assign a user-agent with the request which you can request.”
Would you be able to help me implement this so that the images will show?
March 7, 2024 at 1:23 pm #546979
Aizaz Imtiaz AwanKeymasterHello,
Can you please share some screenshots for better understanding and share the page url, Also share the wp logins details so i will check and give you a possible solution.
Best Regards.
March 7, 2024 at 2:43 pm #547016
Puddle123ParticipantSure, please see info in private content.
March 8, 2024 at 11:21 am #547285
Aizaz Imtiaz AwanKeymasterHello,
I have checked your site and the brand images are showing fine.
See the screenshot for clarification:
https://ibb.co/qRTVwHkBest Regards.
March 8, 2024 at 11:25 am #547293
Puddle123ParticipantThe issue does not relate to the brand images. Please see the text boxes below “Why Buy From Us?” There are 4 information boxes, each has an icon attached, but the icons are not showing.
March 8, 2024 at 4:27 pm #547464
Aizaz Imtiaz AwanKeymasterHello,
There is no problem with SVG uploading. The problem is that your server blocks the request to get the SVG icon content using PHP
file_get_contents
function.Kind Regards
March 8, 2024 at 4:44 pm #547481
Puddle123ParticipantHi,
Thanks for looking at this. Yes the SVG uploads okay. I mentioned above that it is being blocked. My host says they are blocked due to WoodMart Core sending the request with an “empty user-agent” – they don’t allow this. To fix it they said to assign a user-agent with the request – please can you instruct me how to assign the user-agent?
Thanks
March 11, 2024 at 9:54 am #547857
Artem TemosKeymasterHello,
These requests are sent using the
file_get_contents
PHP function. They should accept these requests. Otherwise, SVG can’t be displayed on your website, unfortunately.Kind Regards
March 11, 2024 at 12:22 pm #547957
Puddle123ParticipantHi,
Thanks for your reply. SVG images are loading from other areas of the website though, for example SVG icons for the product categories load fine – attached screenshot. Can the request for SVG icons used in the main page not be sent the same way as the category icon SVG icons which do load?
Thanks
Attachments:
You must be logged in to view attached files.March 11, 2024 at 12:24 pm #547960
Artem TemosKeymasterHello,
Currently, there is no way to change this request for particular elements like Infobox. But we will consider improving this in our future updates.
Kind Regards
March 11, 2024 at 3:07 pm #548050
Puddle123ParticipantHi,
Thanks for your reply. I clarified it with our host. They said “Even though its using file_get_contents, the request can’t go with an unspecified user agent. Because it’s basically trying to cURL the images. They need to set a user agent.”
Hopefully you can look at it for a future update.
Thanks
March 11, 2024 at 6:33 pm #548155
Artem TemosKeymasterHello,
We will try to remake this mechanism and not load SVG at all. It will be displayed as
<img src="path/to/svg" />
HTML tag.Kind Regards
-
AuthorPosts
- You must be logged in to create new topics. Login / Register