php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #37613 tempnam suffix support and dir behavior change
Submitted: 2006-05-27 12:20 UTC Modified: 2021-09-27 12:23 UTC
Votes:10
Avg. Score:4.7 ± 0.6
Reproduced:7 of 7 (100.0%)
Same Version:2 (28.6%)
Same OS:2 (28.6%)
From: wardenik at gmail dot com Assigned:
Status: Open Package: Filesystem function related
PHP Version: 5.1.4 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
34 - 1 = ?
Subscribe to this entry?

 
 [2006-05-27 12:20 UTC] wardenik at gmail dot com
Description:
------------
It would be very useful if the tempnam function would allow to  support suffix on the created filename as well.  I'm creating for instance xml files with it, and they have to have .xml at the end.

Moreover, I think that the behavior that tempnam changes the prefix when unable to create the file in the supplied 'dir' is wrong. It should generate an error instead and not trash some other unwanted places.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-12-30 23:44 UTC] cmb@php.net
-Package: Feature/Change Request +Package: Filesystem function related
 [2021-09-27 12:23 UTC] cmb@php.net
> It should generate an error instead and not trash some other
> unwanted places.

As of PHP 7.1.0, a notice is emitted if the function falls back to
the system's temp directory[1].

[1] <https://github.com/php/doc-en/commit/2f07d53d999169b7446669a51dfd6ce9b3c20435>
 [2023-01-03 11:38 UTC] sheyda dot babi5161 at gmail dot com
I have the same issue. I tried contacting the support, got no answer. (https://www.hyveehuddle.net/)github.com
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 17:01:30 2024 UTC