473,383 Members | 1,963 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,383 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 1821
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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: 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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.