New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Faker->image() return 0 on windows local env #475
Comments
No this means there is an ssl issue at the image host. Ignoring the ssl certificate is never a secure option |
Hello, PHP 8.0.18 |
I also have issues with Faker returning false when generating an image. After investigating, the reason is caused by CloudFlare blocking the request on my IP, but if I access the generated placeholder.com link, CloudFlare doesn't block my request. |
Hello, I have similar issue and I (temporary locally) solved adding User-Agent: like suggest here: |
Maybe that could be included into the package as a PR/Commit. It worked for me but changing a vendor package is not the way I would solve the issue. |
Yes Totally agree with you, I just have no time to do PR/Commit and only a quick local test |
The same thing is happening to me where $faker->image() is returning FALSE now as of the latest version. This could be a placeholder.com issue which means, for Faker, that it should allow alternatives. |
Just to summarize. The issue is not Faker itself but the external vendor where it retrieves the images (placeholder.com). It is also something we won't fix since it would mean a breaking change where we have to add an extra dependency on php-gd to generate the actual images. For Faker 2.x we will remove the image generation from the Core package where an external one can be used. For now i suggest using a custom provider instead |
Anyone who's here looking for a quick fix, this could help: |
@pluc this is a good alternative for me, instead of creating a custom provider myself. Thanks! |
Adding an option in CURL, isn't that a solution? In this case a user agent. |
The user agent has nothing to do with it |
Please check if you can curl anything from placeholder.com, they use Cloudflare maybe you have been blocked.
|
Can you please tell me when the new working version will be released? |
There wont be a release or a fix for this. Its an external service that is used (placeholder.com) |
Versions
fakerphp/faker
Laravel
Faker->image() return 0 on windows local env, but it works with adding at Faker\Provider\Image after string 114:
Is this a safe solution?
The text was updated successfully, but these errors were encountered: