Req #60524 [Com]: specify temp dir by php.ini

2013-07-11 Thread mail+bugs dot php dot net at kazik dot de
Edit report at https://bugs.php.net/bug.php?id=60524&edit=1

 ID: 60524
 Comment by: mail+bugs dot php dot net at kazik dot de
 Reported by:mail+bugs dot php dot net at kazik dot de
 Summary:specify temp dir by php.ini
 Status: Closed
 Type:   Feature/Change Request
 Package:Filesystem function related
 Operating System:   *
 PHP Version:*
 Assigned To:stas
 Block user comment: N
 Private report: N

 New Comment:

The 5.5's pull request is here:
https://github.com/php/php-src/pull/262

It should be easy to patch 5.4 and 5.3 with that or a slightly modified version 
(there a older patches for 5.3 and 5.4 available).

Whether this should be backported or not is not for me to decide.

So, feel free to port.


Previous Comments:

[2013-07-09 12:07:46] mail at tomsommer dot dk

Any chance of getting this backported to 5.3 and 5.4?


[2013-01-29 06:58:31] s...@php.net

The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.

merged into 5.5 as 475a644bd84c071da04b4272b829a187a2c6d282


[2012-05-10 15:27:56] mail+bugs dot php dot net at kazik dot de

Added patch for 5.3.4, of course (and not 4.3.4)


[2012-05-10 15:25:59] mail+bugs dot php dot net at kazik dot de

Added patch for 4.3.4


[2011-12-14 14:33:53] mail+bugs dot php dot net at kazik dot de

Description:

This patch (against 5.3.8) adds a new php.ini directive to specify the path for 
the temporary files.

Why:
If, for security reasons, every user is only allowed to use their own home 
directories, it's not possible to specify their own tmp dir (e.g. 
"/home/user/tmp"). The directory for uploading and session can already be 
specified. Since all users may use the same php.ini (different [HOST=domain] 
entries, [1]) it's not possible to set the environment TMPDIR variable, because 
it would affect all users.

[1] http://php.net/manual/en/ini.sections.php

Test script:
---
ini: system_tmp_dir = "/home/user/tmp"

php: var_export(sys_get_temp_dir());

Expected result:

'/home/user/tmp'

Actual result:
--
'/tmp' (depends on system configuration)






-- 
Edit this bug report at https://bugs.php.net/bug.php?id=60524&edit=1


Bug #54710 [Com]: sys_get_temp_dir() does not respect upload_tmp_dir

2013-03-14 Thread mail+bugs dot php dot net at kazik dot de
Edit report at https://bugs.php.net/bug.php?id=54710&edit=1

 ID: 54710
 Comment by: mail+bugs dot php dot net at kazik dot de
 Reported by:royanee at yahoo dot com
 Summary:sys_get_temp_dir() does not respect upload_tmp_dir
 Status: Not a bug
 Type:   Bug
 Package:PHP options/info functions
 PHP Version:5.3.6
 Block user comment: N
 Private report: N

 New Comment:

This issue is handled in:
https://bugs.php.net/bug.php?id=60524

And it's available in php 5.5.0 Alpha 5 and up.


Previous Comments:

[2011-06-04 00:15:35] royanee at yahoo dot com

@iliaa: Please tell me how to set the location of the temporary directory using 
php_admin_value or php_value, as I do not see a way of setting the temporary 
directory at the vhost level in the documentation. If that is not currently 
possible, please reclassify this as a valid feature request. Thank you for your 
time.


[2011-05-30 18:00:05] il...@php.net

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

The function is designed to return the location of the temporary directory, not 
the file upload directory.


[2011-05-11 15:47:13] royanee at yahoo dot com

Additionally, enabling open_basedir results in FALSE and triggers the following 
warning:

PHP Warning:  tempnam(): open_basedir restriction in effect. File(/tmp) is not 
within the allowed path(s): (/www/myvhost/)


[2011-05-11 15:45:07] royanee at yahoo dot com

Description:

The only configuration option for setting the temporary directory for normal 
operations is the upload_tmp_dir option. As such, functions that rely on the 
temporary directory should respect the upload_tmp_dir option to ensure that 
true separation of concerns between virtual hosts can be achieved. This is 
particularly important when also using open_basedir.

Note that the following line is correctly located in the vhost config:

php_admin_value upload_tmp_dir "/www/myvhost/tmp"

Test script:
---


Expected result:

/www/myvhost/tmp/TuxDRhRIg

Actual result:
--
/tmp/TuxDRhRIg






-- 
Edit this bug report at https://bugs.php.net/bug.php?id=54710&edit=1


Req #60524 [Opn]: specify temp dir by php.ini

2012-05-10 Thread mail+bugs dot php dot net at kazik dot de
Edit report at https://bugs.php.net/bug.php?id=60524&edit=1

 ID: 60524
 User updated by:mail+bugs dot php dot net at kazik dot de
 Reported by:mail+bugs dot php dot net at kazik dot de
 Summary:specify temp dir by php.ini
 Status: Open
 Type:   Feature/Change Request
 Package:Filesystem function related
 Operating System:   *
 PHP Version:*
 Block user comment: N
 Private report: N

 New Comment:

Added patch for 5.3.4, of course (and not 4.3.4)


Previous Comments:

[2012-05-10 15:25:59] mail+bugs dot php dot net at kazik dot de

Added patch for 4.3.4


[2011-12-14 14:33:53] mail+bugs dot php dot net at kazik dot de

Description:

This patch (against 5.3.8) adds a new php.ini directive to specify the path for 
the temporary files.

Why:
If, for security reasons, every user is only allowed to use their own home 
directories, it's not possible to specify their own tmp dir (e.g. 
"/home/user/tmp"). The directory for uploading and session can already be 
specified. Since all users may use the same php.ini (different [HOST=domain] 
entries, [1]) it's not possible to set the environment TMPDIR variable, because 
it would affect all users.

[1] http://php.net/manual/en/ini.sections.php

Test script:
---
ini: system_tmp_dir = "/home/user/tmp"

php: var_export(sys_get_temp_dir());

Expected result:

'/home/user/tmp'

Actual result:
--
'/tmp' (depends on system configuration)






-- 
Edit this bug report at https://bugs.php.net/bug.php?id=60524&edit=1


Req #60524 [Opn]: specify temp dir by php.ini

2012-05-10 Thread mail+bugs dot php dot net at kazik dot de
Edit report at https://bugs.php.net/bug.php?id=60524&edit=1

 ID: 60524
 User updated by:mail+bugs dot php dot net at kazik dot de
 Reported by:mail+bugs dot php dot net at kazik dot de
 Summary:specify temp dir by php.ini
 Status: Open
 Type:   Feature/Change Request
 Package:Filesystem function related
-Operating System:   All
+Operating System:   *
-PHP Version:Irrelevant
+PHP Version:*
 Block user comment: N
 Private report: N

 New Comment:

Added patch for 4.3.4


Previous Comments:

[2011-12-14 14:33:53] mail+bugs dot php dot net at kazik dot de

Description:

This patch (against 5.3.8) adds a new php.ini directive to specify the path for 
the temporary files.

Why:
If, for security reasons, every user is only allowed to use their own home 
directories, it's not possible to specify their own tmp dir (e.g. 
"/home/user/tmp"). The directory for uploading and session can already be 
specified. Since all users may use the same php.ini (different [HOST=domain] 
entries, [1]) it's not possible to set the environment TMPDIR variable, because 
it would affect all users.

[1] http://php.net/manual/en/ini.sections.php

Test script:
---
ini: system_tmp_dir = "/home/user/tmp"

php: var_export(sys_get_temp_dir());

Expected result:

'/home/user/tmp'

Actual result:
--
'/tmp' (depends on system configuration)






-- 
Edit this bug report at https://bugs.php.net/bug.php?id=60524&edit=1


[PHP-BUG] Req #60524 [NEW]: specify temp dir by php.ini

2011-12-14 Thread mail+bugs dot php dot net at kazik dot de
From: 
Operating system: All
PHP version:  Irrelevant
Package:  Filesystem function related
Bug Type: Feature/Change Request
Bug description:specify temp dir by php.ini

Description:

This patch (against 5.3.8) adds a new php.ini directive to specify the path
for the temporary files.

Why:
If, for security reasons, every user is only allowed to use their own home
directories, it's not possible to specify their own tmp dir (e.g.
"/home/user/tmp"). The directory for uploading and session can already be
specified. Since all users may use the same php.ini (different
[HOST=domain] entries, [1]) it's not possible to set the environment TMPDIR
variable, because it would affect all users.

[1] http://php.net/manual/en/ini.sections.php

Test script:
---
ini: system_tmp_dir = "/home/user/tmp"

php: var_export(sys_get_temp_dir());

Expected result:

'/home/user/tmp'

Actual result:
--
'/tmp' (depends on system configuration)

-- 
Edit bug report at https://bugs.php.net/bug.php?id=60524&edit=1
-- 
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=60524&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=60524&r=trysnapshot53
Try a snapshot (trunk):  
https://bugs.php.net/fix.php?id=60524&r=trysnapshottrunk
Fixed in SVN:
https://bugs.php.net/fix.php?id=60524&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=60524&r=needdocs
Fixed in release:
https://bugs.php.net/fix.php?id=60524&r=alreadyfixed
Need backtrace:  
https://bugs.php.net/fix.php?id=60524&r=needtrace
Need Reproduce Script:   
https://bugs.php.net/fix.php?id=60524&r=needscript
Try newer version:   
https://bugs.php.net/fix.php?id=60524&r=oldversion
Not developer issue: 
https://bugs.php.net/fix.php?id=60524&r=support
Expected behavior:   
https://bugs.php.net/fix.php?id=60524&r=notwrong
Not enough info: 
https://bugs.php.net/fix.php?id=60524&r=notenoughinfo
Submitted twice: 
https://bugs.php.net/fix.php?id=60524&r=submittedtwice
register_globals:
https://bugs.php.net/fix.php?id=60524&r=globals
PHP 4 support discontinued:  
https://bugs.php.net/fix.php?id=60524&r=php4
Daylight Savings:https://bugs.php.net/fix.php?id=60524&r=dst
IIS Stability:   
https://bugs.php.net/fix.php?id=60524&r=isapi
Install GNU Sed: 
https://bugs.php.net/fix.php?id=60524&r=gnused
Floating point limitations:  
https://bugs.php.net/fix.php?id=60524&r=float
No Zend Extensions:  
https://bugs.php.net/fix.php?id=60524&r=nozend
MySQL Configuration Error:   
https://bugs.php.net/fix.php?id=60524&r=mysqlcfg