Bug tracker

This ticket has been moved to our new tracker. Open Ticket PHPBB3-7111 now.

$tmp_path seems to be wrong in includes/functions_upload.php (fix completed in vcs)

Code: Select all
$tmp_path = (!@ini_get('safe_mode')) ? false : $phpbb_root_path . 'cache';
$filename = tempnam($tmp_path, unique_id() . '-');


Looks like there is a mistake in !@ini_get('safe_mode'). If we have safe_mode "Off" in php.ini, $tmp_path become "" and function.tempnam() trying to record temporary avatar-file in a default system temp path, which may be out of range because of the open_basedir restriction and cause such error:
[phpBB Debug] PHP Notice: in file /includes/functions_upload.php on line 745: tempnam() [function.tempnam]: open_basedir restriction in effect. File(/var/tmp) is not within the allowed path(s): (/home/web)

I suggest it must looks like this: @ini_get('safe_mode'), without "!".
Am I wrong and this is a feature?

Comments / History

Assigned ticket to user "Acyd Burn"

Action performed by Acyd Burn (Server Manager) on Mar 26th 2008, 12:35

Changed ticket status from "New" to "Fix in progress"

Action performed by Acyd Burn (Server Manager) on Mar 26th 2008, 12:35

Linked ticket with changeset: r8522

Action performed by Anonymous (I am too lazy to register) on Apr 21st 2008, 13:20

Changed ticket status from "Fix in progress" to "Fix completed in SVN"

Action performed by Acyd Burn (Server Manager) on Apr 21st 2008, 13:21

Ticket details

Related SVN changesets