Project

General

Profile

Actions

Bug #17184

closed

t3lib_div::tempnam('anything_'); returns invalid path

Added by Andreas Balzer about 17 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2007-04-03
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.1
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

If you use t3lib_div::tempnam('anything_'); on Windows Vista 64 Bit (didn't check for other systems), you'll recieve an invalid path.
e.g.: C:/Program Files (x86)/typo3/htdocs/typo3wamp/typo3temp/\abcD974.tmp
notice that "/\"
Why does this happen and how can it be solved? Shouldn't there only be \'s on a Windows computer?

OS: Windows Vista 64 Bit Ultimate
executables like csstidy.exe (see sf.net) don't work with such a filename
(issue imported from #M5352)

Actions #1

Updated by Michael Stucki about 17 years ago

I have no such CPU here, so please debug, and make sure it's not a PHP problem.

Actions #2

Updated by Michael Stucki about 17 years ago

1) Check what t3lib_div::tempnam() is doing
2) Paste the contents into a separate PHP file and try the same again
3) As you will see, the PHP function tempnam() is simply called with a path prefix. So you should check how this path looks like...

Actions #3

Updated by Andreas Balzer about 17 years ago

I have found the position of the 'problem'..
In t3lib/class.t3lib_div.php there's the function function tempnam($filePrefix)
The function returns the path, including "typo3temp/"
PHP adds "\" and the filename.. So one slash comes from T3, the other from PHP. Maybe there should be a check, whether there's a slash in the PHP return..

Actions #4

Updated by Michael Stucki about 17 years ago

Look here to see how tempnam() should work: http://ch2.php.net/tempnam

Especially watch the comment of "lreilly at lanl dot gov" at the end of the page.

To me this doesn't look like a TYPO3 issue at all..

Actions #5

Updated by Andreas Balzer about 17 years ago

right, but as M$ won't fix such a thing, it could be implemented into T3. As this seems to be a very important function of T3 it might be useful.. wouldn't it?

Actions #6

Updated by Michael Stucki about 17 years ago

It's not a Microsoft bug, it rather seems like a PHP bug!

Actions #7

Updated by Christian Kuhn about 15 years ago

Resolved, no change required:

- No further feedback for a long time
- Not a TYPO3 bug

Please reopen if this still happens in recent TYPO3 & PHP & Win versions to investigate further.

Actions #8

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF