templates_c odd filenames
Re: templates_c odd filenames
I also found this:
http://phpinsider.com/smarty-forum/viewtopic.php?t=9853
Could the correct files end up being in the temp folder of the Windows folder?
http://phpinsider.com/smarty-forum/viewtopic.php?t=9853
Could the correct files end up being in the temp folder of the Windows folder?
Re: templates_c odd filenames
I would say that this confirms the problem of tempnam and not a bug of CMSMS as I had writtencb2004 wrote: I also found this:
Check permissions rw of www_user in this folder
Alby
Re: templates_c odd filenames
Which of my posts are you referring to alby?
Re: templates_c odd filenames
both but the first says to check permissionscb2004 wrote: Which of my posts are you referring to alby?
Alby
Re: templates_c odd filenames
I am stumped as to what to do. I dont think it is a permissions problem at all. Using the files from templates_c on another install I am getting green ticks on all items for the 2nd page of the install script.
Re: templates_c odd filenames
From lib/smarty/internals/core.write_file.phpcb2004 wrote: I am stumped as to what to do. I dont think it is a permissions problem at all. Using the files from templates_c on another install I am getting green ticks on all items for the 2nd page of the install script.
In your case maybe tempnam don't work and smarty use the workaround that you see in smarty forum$_tmp_file = tempnam($_dirname, 'wrt');
if (!($fd = @fopen($_tmp_file, 'wb'))) {
$_tmp_file = $_dirname . DIRECTORY_SEPARATOR . uniqid('wrt');
if (!($fd = @fopen($_tmp_file, 'wb'))) {
$smarty->trigger_error("problem writing temporary file '$_tmp_file'");
return false;
}
}
fwrite($fd, $params['contents']);
fclose($fd);
echo "-------------------------------------\n";
echo "_tmp_file: ". $_tmp_file ."\n";
echo "filename: ". $params['filename'] ."\n";
echo "-------------------------------------\n";
if (DIRECTORY_SEPARATOR == '\\' || !@rename($_tmp_file, $params['filename'])) {
// On platforms and filesystems that cannot overwrite with rename()
// delete the file before renaming it -- because windows always suffers
// this, it is short-circuited to avoid the initial rename() attempt
@unlink($params['filename']);
@rename($_tmp_file, $params['filename']);
}
After try to rename $_tmp_file in $params['filename']
Add red code and look in installer if you have a $_tmp_file or $params['filename']
But, repeat, it is not a bug of CMSMS but, maybe, a problem of smarty
Alby
Re: templates_c odd filenames
Hi Alby.
Apologies but I am not really sure what you mean. The only bit I understood was try the Smarty workaround. I tried that but no joy at all.
What are you suggesting after that?
Sorry I do not understand and thanks for your continued help.
Apologies but I am not really sure what you mean. The only bit I understood was try the Smarty workaround. I tried that but no joy at all.
What are you suggesting after that?
Sorry I do not understand and thanks for your continued help.
Re: templates_c odd filenames
If you want to know where is the point that creates problems, you must add the red code in that file and watch which of the two filenames that appear (_tmp_file: or filename:) are those that you see after in templates_c foldercb2004 wrote: What are you suggesting after that?
Alby
Re: templates_c odd filenames
Ok. _tmp_file is the correct file that is being created.
Re: templates_c odd filenames
You have problem with:cb2004 wrote: Ok. _tmp_file is the correct file that is being created.
@rename($_tmp_file, $params['filename']);
drop this character and look what say the error:
Alby// this, it is short-circuited to avoid the initial rename() attempt
@unlink($params['filename']);
@rename($_tmp_file, $params['filename']);
Re: templates_c odd filenames
Warning: rename(MYSERVER\tmp\templates_c\wrt411.tmp,MYSERVER\tmp\templates_c\%%C4^C43^C43F3191%%installer_start.tpl.php): Permission denied in MYSERVER\lib\smarty\internals\core.write_file.php on line 45
Re: templates_c odd filenames
Alby, thanks to you I got my head round this. Permission was denied as the modify permission was not given to the folders that you would have to chmod 777 on a Unix server. Maybe a check on install is needed. If a Windows server is used you should check that the modify permission is granted.
Just trying to install but I cant as the dev server is down and it is looking for the latest version file.
Many thanks.
Just trying to install but I cant as the dev server is down and it is looking for the latest version file.
Many thanks.