473,386 Members | 1,679 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How to handle temporary file on Linux and Windows

I'm having so much difficulty in manipulating temporary files on Windows and Linux.

When the code works on Windows it does not work on Linux or vice versa.

What seems to be the problem?

TIA...
Jul 8 '11 #1
2 1741
code green
1,726 Expert 1GB
No idea without any code, but possible pitfalls are:
case sensitive filenames,
directory structure,
back/forward slashes
Jul 8 '11 #2
@code-green I'm running out of time that's why I failed to include a code snippet to troubleshoot the problem.

What I did now to resolve the problem is I used tempnam($_SERVER['DOCUMENT_ROOT']."/", 'tmp');

This has the same effect on Windows and Linux box.

Thanks...
Jul 11 '11 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Frank Millman | last post by:
Hi all I need to generate potentially large reports from a database, and I want to offer the option of print preview before actually printing (using wxPython). I figure that the best way to...
6
by: Codemonkey | last post by:
Hi, I have a few questions about best practices when it comes to the management of temporary files. Any thoughts anyone can give would be much appreciated. Basically, I'm writing a document...
2
by: muttu2244 | last post by:
hi all could anybody please tell me how can i copy a file from windows file systems like FAT12, FAT16,FAT32 and NTFS to EXT2, and EXT3. Is their any function in python that we can do the above ...
2
by: nicknack | last post by:
"Metadata file 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\my_proj\ce601211\9d5d0aae\App_WEB_header.ascx.asdf7d2.vcvdd1d.dll' could not be found" I'm getting this...
4
by: =?Utf-8?B?R2Vvcmdl?= | last post by:
Hello everyone, I am using Windows API open (create) a new file by CreateFile, http://msdn2.microsoft.com/en-us/library/aa363858.aspx the return value is HANDLE, if I use fwrite to write...
3
bajajv
by: bajajv | last post by:
Hi, I have linux and windows xp on my machine. I have a 1 GB file on linux. And I want to access it from windows. I tried by mapping but I am able to get only read only access. But I need to copy...
3
crystal2005
by: crystal2005 | last post by:
Hi all, Basically, i'm trying to create temporary file using TemporaryFile() module. TemporaryFile( ]]]]) It's done perfectly to create an intended file. But, i encountered a problem to...
0
by: rangi500 | last post by:
Hello, We've recently started getting errors like this: Last error: ERROR: could not write to hash-join temporary file: No space left on device But there is plenty of space on the all the...
18
by: Coffee Pot | last post by:
Thanks for any advice. ~ CP
1
by: TechBabu | last post by:
I'm trying to read data from config file in windows service in OnStart(), but it is throwing error "Object reference not set to an instance of an object". Is there any seeting required to use config...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.