Page 1 of 2

templates_c odd filenames

Posted: Wed Sep 17, 2008 1:02 pm
by cb2004
All the files being created in here have the file extension .tmp therefore the CMS is not looking in the right place.

Any ideas?

Re: templates_c odd filenames

Posted: Wed Sep 17, 2008 1:13 pm
by alby
cb2004 wrote: All the files being created in here have the file extension .tmp therefore the CMS is not looking in the right place.
Strange, in this folder smarty has own files and should be .inc and .php and not .tmp

Alby

Re: templates_c odd filenames

Posted: Wed Sep 17, 2008 1:14 pm
by cb2004
I know. Windows server.

Any ideas?

Re: templates_c odd filenames

Posted: Wed Sep 17, 2008 1:18 pm
by alby
cb2004 wrote: Any ideas?
Check content of these files and check phpinfo() for settings in this folder (upload folder, save session, ...)

Alby

Re: templates_c odd filenames

Posted: Wed Sep 17, 2008 1:20 pm
by cb2004
The contents seem absolutely fine. Its just the filenames and file extensions which are screwy.

What deails do you need from the phpinfo();?

Re: templates_c odd filenames

Posted: Wed Sep 17, 2008 1:25 pm
by alby
cb2004 wrote: The contents seem absolutely fine. Its just the filenames and file extensions which are screwy.
then what's inside?

cb2004 wrote: What deails do you need from the phpinfo();?
search for templates_c in this page

Alby

Re: templates_c odd filenames

Posted: Wed Sep 17, 2008 1:33 pm
by cb2004
This is inside one of the files:

Code: Select all

<?php /* Smarty version 2.6.18, created on 2008-09-17 13:32:07
         compiled from header.tpl */

$this->_cache_serials['MYSERVER\tmp\templates_c\%%F7^F7F^F7F34188%%header.tpl.inc'] = '7d428e5bfe7a93eb0c52c1a9d021a8a0';

?><?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'lang_install', 'header.tpl', 5, false),)), $this); ?>
<?php
function _smarty_tplfunc_7d428e5bfe7a93eb0c52c1a9d021a8a0_0(&$this)
{
$_cache_attrs =& $this->_smarty_cache_attrs('7d428e5bfe7a93eb0c52c1a9d021a8a0','0');echo smarty_lang(array('a' => 'install_title','1' => $this->_tpl_vars['current_page']), $this);
}


function _smarty_tplfunc_7d428e5bfe7a93eb0c52c1a9d021a8a0_1(&$this)
{
$_cache_attrs =& $this->_smarty_cache_attrs('7d428e5bfe7a93eb0c52c1a9d021a8a0','1');echo smarty_lang(array('a' => 'install_system'), $this);
}


function _smarty_tplfunc_7d428e5bfe7a93eb0c52c1a9d021a8a0_2(&$this)
{
$_cache_attrs =& $this->_smarty_cache_attrs('7d428e5bfe7a93eb0c52c1a9d021a8a0','2');echo smarty_lang(array('a' => 'install_thanks'), $this);
}



?>
As you see whats inside is fine. Its just not creating the correct filename or file extension. I have my phpinfo(); screen up which is placed in templates_c. What shall I be looking for?

I think if we fix this we will fix loads of problems with other peoples Windows problems. I see no end of errors when I search for fetch. I have been using the template files from a Unix server and I am just copying over the template files. Maybe Calguy or Ted would be interested in this post?

Re: templates_c odd filenames

Posted: Wed Sep 17, 2008 2:00 pm
by Russ
Mmm, nice and weird, I think having a look at the PHP info is the next step. Does this only happen on Windows Web Servers?

Re: templates_c odd filenames

Posted: Wed Sep 17, 2008 2:07 pm
by cb2004
Yeah only on a Windows server I am installing on.

What shall I look for in the PHP info?

The files are names like wrtFC.tmp and so on.

Re: templates_c odd filenames

Posted: Wed Sep 17, 2008 2:26 pm
by Russ
As Alby said
"phpinfo() for settings in this folder (upload folder, save session, ...)" and "search for templates_c in this page"

What PHP you on, CMS Version, Apache Server or other wbe server? Windows OS/Version?

Re: templates_c odd filenames

Posted: Wed Sep 17, 2008 2:37 pm
by cb2004
PHP: 4.3.10
CMSMS: 1.4.1
Server: IIS 6

Re: templates_c odd filenames

Posted: Wed Sep 17, 2008 2:38 pm
by alby
cb2004 wrote: Yeah only on a Windows server I am installing on.

What shall I look for in the PHP info?

The files are names like wrtFC.tmp and so on.
smarty use tempnam php function
Windows could overwrite behavior of this function and write another filename
I do not think to "abnormal" behavior but a "strange" behavior of Windows (IIS in particulary)  ::)

Alby

Re: templates_c odd filenames

Posted: Wed Sep 17, 2008 2:48 pm
by cb2004
Is there anything I could do or get the server admin to do?

Re: templates_c odd filenames

Posted: Wed Sep 17, 2008 2:57 pm
by alby
cb2004 wrote: Is there anything I could do or get the server admin to do?
You should make a test with the code of the file: lib/smarty/internals/core.write_file.php

Alby

Re: templates_c odd filenames

Posted: Wed Sep 17, 2008 3:00 pm
by cb2004
I found this:

http://www.phpinsider.com/smarty-forum/ ... php?t=7183

The posts towards the bottom are interesting.