You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when i run above code on linux PC it's working fine but in mac it gives below error.
i think it might be an permission error.
please help me.
file_put_contents(): Filename cannot be empty
The text was updated successfully, but these errors were encountered:
anavgire4
changed the title
Filename cannot be empty issue in print from mac machine MAC
Filename cannot be empty issue in print from mac machine
May 17, 2017
The usage of file_put_contents in CupsPrintConnector is-
// Build command to work on data$tmpfname = tempnam(sys_get_temp_dir(), 'print-');
file_put_contents($tmpfname, $data);
Can you share your PHP version so that we can try to replicate? I don't have access to a web stack on Mac, but this method for creating temp files is the likely culprit.
It appears to be a permissions issue- There are some common stacks that are setting up PHP without a write-able temp space, and a web search turns up plenty of people who have seen it. You can echo sys_get_temp_dir(); to find out which directory to adjust permissions on.
It is a bug that we don't return an error here that indicates temp files cannot be created, so I'll leave this open until that has been patched.
when i run above code on linux PC it's working fine but in mac it gives below error.
i think it might be an permission error.
please help me.
file_put_contents(): Filename cannot be empty
The text was updated successfully, but these errors were encountered: