473,387 Members | 1,578 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,387 software developers and data experts.

Defining personal upload_tmp_dir..???

TJ
Hello All,

This is my first posting on this group and I'm also new to PHP ;-)

We have a client who is providing Web Hosting Solutions to customers.
One of the latest requirements is to enable PHP Scripting on the
Hosting Servers.
We are using PHP v4.4.0, but are running in an issue with File Uploads.
In PHP.ini file there is a config for temporary folder for uploaded
file. However, we dont want it to be pointing to a folder on the web
server itself rather we want customers to define one in their own
workspace (NAS share).

Questions:
1. Is it possible using scripts to define a personal upload_temp_dir?
If yes, how?
2. How PHP Parser works in above case (meaning will it performs usual
cleanup)?
3. Can same be done for Session.SavePath?

We are using Win2k3 Web Edition with SP1.

Thanks in advance.
~TJ

Oct 26 '06 #1
1 1822
On 26 Oct 2006 10:42:42 -0700, "TJ" <tj********@yahoo.comwrote:
>We have a client who is providing Web Hosting Solutions to customers.
One of the latest requirements is to enable PHP Scripting on the
Hosting Servers.
We are using PHP v4.4.0, but are running in an issue with File Uploads.
In PHP.ini file there is a config for temporary folder for uploaded
file. However, we dont want it to be pointing to a folder on the web
server itself rather we want customers to define one in their own
workspace (NAS share).

Questions:
1. Is it possible using scripts to define a personal upload_temp_dir?
If yes, how?
See:
http://uk2.php.net/manual/en/ini.php#ini.list
and
http://uk2.php.net/ini_set
and
http://uk2.php.net/manual/en/configuration.changes.php

upload_tmp_dir is marked as PHP_INI_SYSTEM which means you're limited as to
where you can change it, so it doesn't look like you can set it per directory
(or even per virtual host?).
>2. How PHP Parser works in above case (meaning will it performs usual
cleanup)?
n/a
>3. Can same be done for Session.SavePath?
This is even easier to set, being marked as PHP_INI_ALL which means it can be
changed within scripts, as well as in any other configuration file level.
>We are using Win2k3 Web Edition with SP1.
Presumably meaning you're running IIS, which makes per-directory configuration
overrides somewhat harder than on Apache.

--
Andy Hassall :: an**@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Oct 26 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Tim218 | last post by:
Hi Everyone This is my first day with PHP and, not surprisingly, I've run into a problem :-) I want to allow file uploads to the server without exposing the non-technical end-users to FTP...
1
by: Xenofon Papadopoulos | last post by:
When I was using /usr/tmp to keep the temp uploaded files, move_uploaded_file used to fail randomly. Since I created a directory owned by nobody:nobody (my apache user) and set upload_tmp_dir to...
0
by: Robert_Wr | last post by:
hello PHP Masters:) my privider set: safe_mode to ON and leave upload_tmp_dir blank I think that there is the reason for my trouble with upload files via POST method. If yes - I will ask my...
2
by: iulian.ilea | last post by:
I have a problem when I upload files: if try to upload files stored in the same directory whith upload script it is ok, it uploads them on the ftp. IF I select a file from another directory than...
26
by: Cliff Williams | last post by:
Can someone explain the pros/cons of these different ways of creating a class? // 1 function myclass() { this.foo1 = function() {...} } // 2a
1
by: howa | last post by:
Using Windows, PHP5.2 ini_set("upload_tmp_dir", "c:/temp"); echo ini_get('upload_tmp_dir'); // print out the default one no effect...
2
by: TheReckter | last post by:
I'm currently on a shared host, and upload_tmp_dir is set to none, I was wondering if I was required to change that value to allow for file uploads, and how I could go about doing that, as I cant...
1
by: howa | last post by:
Hi, I have not set the "upload_tmp_dir" in my php.ini, so I am assuming it is using /tmp/. From time to time, I noticed that some strange files appear in the / tmp, and when I viewed it, I...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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.