|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
jaketseng Smarty Rookie
Joined: 11 Dec 2010 Posts: 6
|
Posted: Sat Dec 11, 2010 1:23 pm Post subject: Upgrade to smarty 3 get the 'unable to write file' error |
|
|
when I upgraded my apps from smarty 2 to smarty 3, and i had received the error "unable to write file /tmp/wrtzXPSNo". i had find out where the problem is:
1. i use a custom stream wrappers for the smarty's compile_dir.
2. and the Smarty use the tempnam() when write_file, but tempnam() can not support custom stream wrappers registered(http://www.php.net/manual/en/function.tempnam.php#97086).
3. when the smarty 2, the write_file would check it if there is a problem in writing the file and reset the $_tmp_file in the hole path way. and that would be success write the file. ( internals/core.write_file.php line 30 )
4. but in smarty 3, the reset of the $_tmp_file codes was disappeared, so we got the error.
can you check it out ? and fix the problem?
PS: that is a PHP frameworks using the smarty as default , SpeedPHP. http://speedphp.com |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Sat Dec 11, 2010 1:56 pm Post subject: |
|
|
This has now been fixed in the SVN trunk version. |
|
Back to top |
|
jaketseng Smarty Rookie
Joined: 11 Dec 2010 Posts: 6
|
Posted: Sun Dec 12, 2010 12:37 pm Post subject: |
|
|
i had check out the version 3854, and find out there is a problem yet .
file "smarty_internal_write_file.php" line 34, the code:
$_tmp_file = $_dirname . DS . uniqid('wrt');
must be:
$_tmp_file = $_dirpath . DS . uniqid('wrt');
|
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Sun Dec 12, 2010 12:47 pm Post subject: |
|
|
Ups, this is fixed in the SVN now. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|