-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Implemented Feature #60524 (sys_temp_dir) #262
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
Conversation
@@ -731,6 +731,10 @@ user_dir = | |||
; On windows: | |||
; extension_dir = "ext" | |||
|
|||
; Directory where the temporary files should be placed. | |||
; Defaults to the system defaut (see sys_get_temp_dir) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo in "default"
Nice patch. See my few remarks and we need a test for it. Could you add one? |
would you like a test like this? --EXPECT-- (if yes, update my branch, right? - I'm new too this stuff) |
Yep, looks good. |
{ | ||
char *system_tmp_dir = PG(system_tmp_dir); | ||
if (system_tmp_dir) { | ||
int len = strlen(system_tmp_dir); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Declarations need to be on top of the block so that our Windows build doesn’t fail
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's okey, it at the beginning of a block
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, @laruence is right. Stupid me.
Added a new configuration directive which allows it to change the temporary directory, the default behavior is unchanged. This is a useful option if you use all/some hosts inside of one .ini file with sections and want to change the temp dir per user (maybe it's not allowed to write outside the users home directory). Since the TMPDIR variable affects the whole php that way can not be used for this scenario. (see https://bugs.php.net/bug.php?id=60524)
Comment on behalf of stas at php.net: merged |
Added a new configuration directive which allows it to change the
temporary directory, the default behavior is unchanged.
This is a useful option if you use all/some hosts inside of one .ini file
with sections and want to change the temp dir per user (maybe it's not
allowed to write outside the users home directory). Since the TMPDIR
variable affects the whole php that way can not be used for this scenario.
(see https://bugs.php.net/bug.php?id=60524)