Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

wtf>> probably me.. compiling blank templates

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Installation and Setup
View previous topic :: View next topic  
Author Message
webadept
Smarty Regular


Joined: 09 Mar 2004
Posts: 41

PostPosted: Mon Oct 25, 2004 7:29 am    Post subject: wtf>> probably me.. compiling blank templates Reply with quote

The server I work on here is ... well.. constantly changing.. so I probably changed something and can't remember what it was that would cause this, so maybe one of you will recognize the situation and point at something... more than likly.. something way too obvious for me to handle.

The templates run fine if I use the command line to compile them.

php -q test.php

Compiles, and runs great, but if I put in the php file
$smarty->force_compile = true;

then it complies a 0 length file. (empty.. ) as soon as I run it in the browser.

Apache is running as apache
PHP is running with globals turned off and about as open as i can get it right now, no secure running or anything odd.

The template and template_c directories are set at 777 and owned by apache:apache

All the directories leading too them are also running the same.

I did the phpinfo, and see that all is well, as much as i can tell right now, you can take a gander at it if you wish at http://www.webadept.net/phpinfo.php

I went through the output of the object listing, and can't see anything that would cause this.. (??) you can take a gander at that if you wish at http://www.webadept.net/test.php

The template is in the right spot, I know it is reading this template because I can force a smarty error out on the display by putting raw CSS code in there, so .. that is the file, and it is very basic ..

Code:

<html>
<head>
</head>
<body>
<p>{$smarty.server.SCRIPT_NAME} </p>
{html_select_date display_days=yes}
<p>{$smarty.server.SCRIPT_NAME} </p>
{html_select_date display_days=yes}
</body>
</html>


I can't get 'hello world' to work even.. :-/

The test.php is calling that template, and that code is this:
Code:

error_reporting(E_ALL | E_WARNING | E_PARSE | E_NOTICE);
/*===========================================================================//
//===========================================================================*/
function printthis($this)
{
 echo "<pre>";
 print_r($this);
 echo "</pre>";
} // end function printout
/*===========================================================================//
//===========================================================================*/
  define("SMARTY_DIR", "/web/Smarty/");
  require_once(SMARTY_DIR."Smarty.class.php");
  $smarty = new Smarty();
$smarty->force_compile = true;
$smarty->error_reporting = true;
$smarty->debugging = true;
printthis($smarty);
$smarty->display("testpage.tpl");


I get nothing.. even the debugging template comes out as a 0 length file. No pop, nothing.. it is really... kinda spooky really.

I do know that it is probably something I've done, because I've been using this server for the last year or so developing smarty stuff and having no problems at all, ... so... no worries if you can't think of something, but if you can, that would be very cool. Again, the templates compile from the browser as empty, but from the command line, they compile fine.

I've got another server here that I'm going to try to setup like this one, and see if I get the same result, if not, then I might have some type of rootkit running on this one (aak!) but we'll see how that checks out..

Thanks in advance.

ps, if the links don't work, I said the heck with it, and started a reload of the OS, so give it a bit. I'll post whatever I find out, and if I reload I'll save as much of the orginial setup as possible, ... really I'm very curious as to what could be cauesing this, more than anything else. I run, just about the same setup on my laptop, .. and it runs just fine, so.. what gives here?


--- "What state am I from? Upper Confusion" ---
Back to top
View user's profile Send private message
webadept
Smarty Regular


Joined: 09 Mar 2004
Posts: 41

PostPosted: Fri Oct 29, 2004 12:04 am    Post subject: Reply with quote

I don't know what to say to this. I couldn't get it to do this on my other server. I brought the one that was having the problem down, poked, prodded, reloaded. After the reload, it was fine, so I restored orgininal PHP, MySQL and Apache configs, and it still wouldn't do it.. poked, proded, threw my hands in the air and brought it back on line.. seems to work as advertised now... (??)


Who knows.. some weird pre-halloween spooke or something I don't know. .. Smarty Rocks! (heh) Smile . .well it does, but.. still would like to know what caused that so I can watch for it in the future.

Glenn
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Installation and Setup All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP