Skip to content
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

fclose() PHP warning #35

Open
hostep opened this issue Aug 4, 2015 · 4 comments
Open

fclose() PHP warning #35

hostep opened this issue Aug 4, 2015 · 4 comments

Comments

@hostep
Copy link

hostep commented Aug 4, 2015

Hi

We notice a couple of lines in our var/log/system.log Magento file which look like this:

fclose(): 437 is not a valid stream resource/path/to/our/project/lib/Varien/Io/File.php

Has anyone else encountered these?
It happens when a pdf file is created in the filesystem.
The pdf file is actually generated and nothing else goes wrong, just this warning in the log file.

I can get rid of them if I remove this line:

But that's probably not the best solution.

If anyone has any idea what can cause this, please let me know.

Magento version: 1.9.1.0 (fully patched)
PHP version: 5.5.27
Filesystem: Mac OS Extended (Case-sensitive, Journaled)

Thanks!

@mvgucht
Copy link
Contributor

mvgucht commented Aug 28, 2015

I would not remove the streamclose line. but I can't figure out why you get an error.
I think this is a php problem.

@mvgucht
Copy link
Contributor

mvgucht commented Nov 30, 2015

Are you sure that the pdf are being written to the file system? because it could be that the streamreader fails because it doesn't have permission to write to the folder/file.

@hostep
Copy link
Author

hostep commented Nov 30, 2015

Yes, the files are being written. Everything works perfectly fine, except for that one warning. Very strange. We have it on our local developer machines running Mac OS X and also on the actual servers it runs on (staging & production, which are different machines) running Debian.

See:
dpd-orders-flose
(the timestamps are at a one hour difference because the Magento logs are logged in GMT time and the server itself runs in GMT+1 time)

You don't see this happen yourself?

@mvgucht
Copy link
Contributor

mvgucht commented Jan 26, 2016

I don't see this happen no, but we should add a check before the close. then this issue wouldn't show anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants