Skip to content

Fix issue #172 with tempnam() throwing an Exception.#219

Closed
BrandonSurowiec wants to merge 1 commit intotroydavisson:masterfrom
BrandonSurowiec:patch-1
Closed

Fix issue #172 with tempnam() throwing an Exception.#219
BrandonSurowiec wants to merge 1 commit intotroydavisson:masterfrom
BrandonSurowiec:patch-1

Conversation

@BrandonSurowiec
Copy link
Copy Markdown

@BrandonSurowiec BrandonSurowiec commented Dec 18, 2018

I have a Homestead server setup on my Windows PC for Laravel development.

When I run a command in my local CLI that calls PHRETS I get an error exception because Window's temporary directory is not "/tmp."

Using sys_get_temp_dir() will return the correct path for PHP's temporary file store for the current environment. On Linux it will still be /tmp.

I have a Homestead server setup on my Windows PC for development and so my temp directory is not "/tmp" and Laravel throws an ErrorException. The `sys_get_temp_dir()` function returns the default path PHP stores temporary files in. So it will still resolve to `"/tmp"` on Linux, but for Windows it will resolve to the correct temp directory.
@BrandonSurowiec
Copy link
Copy Markdown
Author

Another option could be to allow the value to be modified through the configuration.

@BrandonSurowiec
Copy link
Copy Markdown
Author

According to #158, it would be better if we didn't even use a cookie file as they currently are not auto-cleaned up.

@BrandonSurowiec BrandonSurowiec deleted the patch-1 branch June 10, 2022 03:06
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

Successfully merging this pull request may close these issues.

1 participant