-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
PhpOffice\PhpWord\Exception\InvalidImageException #1223
Comments
Running your test php script is from your user, but your website is running as apache or nobody, and thus it could be you do not have permissions to access that file under that apache user. If you have SELinux, you also need to check for file context (ls -lZ) and maybe explicitely set the context but maybe the basic permissions are not set: chgrp -R www public/images && chmod -R g+w public/images (and check that apache is in the www group; and maybe you need to create that www group first) |
Thanks for the reply. In my case the |
@iamsayantan do you have the same with the latest 0.14 version? |
@iamsayantan try to display all php errors and warnings |
I am getting the above exception when I try to add image to word document.
This is the related code. And following is the stack trace,
I was checking the code for
checkImage
Here
getimagesize($source)
is returning false. But$source
is valid and I have checked with the following snippet which is working fine,Output:
5.6.32
Context
The text was updated successfully, but these errors were encountered: