Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#171 Uploading files with PHP open_basedir fail

open
nobody
None
5
2012-12-08
2005-04-27
No

In the case that PHP open_basedir is used, /tmp is NOT
included in the open_basedir and a file is uploaded -
uploading fails.

Reason: $tmpDir variable in tiki-setup.php is
overridden by PEAR

Solution: this is a temporary patch which simply adds a
$tmpDir = TikiInit::tempdir();
to the very end of the tiki-setup.php, so PEAR settings
are ignored.

Better solution (of which no patch is available):
a. get PEAR to make their tmpDir local ?
b. rename tmpDir in TikiWiki to something else ?
c. put the whole tmpDir declaration AFTER the PEAR
inclusion.

Attached is tiki-setup.php derived of revision
1.173.2.44 (TikiWiki 1.8.5) - the same solution applies
to TikiWiki 1.9 and up...

Discussion

  • tiki-setup.php for TikiWiki 1.8.5 (rev 1.173.2.44) patched

     
    Attachments