phptemplate_init(themes/greenthing/template.php)

uglyduckling - June 12, 2005 - 21:44

I have seen questions regarding this error and/or ones similar to it posted several times but none of the solutions that were offered have worked for me.

I am working with the phptemplate greenthing theme and getting two errors at the top of screen

phptemplate_init(themes/greenthing/template.php): failed to open stream: No such file or directory in /home/sharapk/public_html/themes/engines/phptemplate/phptemplate.engine on line 41.

and

warning: phptemplate_init(): Failed opening 'themes/greenthing/template.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php:/home/sharapk/public_html/modules/marksmarty/') in /home/sharapk/public_html/themes/engines/phptemplate/phptemplate.engine on line 41.

Line 41 in phptemplate.engine is :

if ($file = $engine_code[dirname($template->filename) . '/template.php']) {

part of this function:

function phptemplate_init($template) {
require_once(realpath('themes/engines/phptemplate/template.php'));
//tried the below per http://drupal.org/node/23407
//require_once('themes/engines/phptemplate/template.php');
$engine_code = variable_get('phptemplate_extra_logic', array());

if ($file = $engine_code[dirname($template->filename) . '/template.php']) {
include_once($file);
}
}

The template.php file resides in the themes/engines/phptemplate directory -- note that the error indicates it is being looked for in the themes/greething directory.

I tried moving template.php to the themes/greenthing directory but then I got a fatal error and nothing else on the page - so I have put it back in the themes/engines/phptemplate directory.

Can anyone suggest why phptemplate.engine is looking for template.php to be in themes/greething instead of themes/engines/phptemplate and what setting or reference I may have set incorrectly?

I also checked

uglyduckling - July 31, 2005 - 20:33

I checked every file to make sure there wasn’t an extraneous line or character after the closing ?> php tag

 
 

Drupal is a registered trademark of Dries Buytaert.