Adding MIME type (.tpl extension) in CPANEl

Hi ,
I have successfully installed a script, but it shows a blank page upon opening the website. The script uses template files with extension .tpl and uses smarty engine. What i realised is that i need to add .tpl extension in MIME types in CPANEL.

In MiME type what should I enter for .tpl extension file
Who is Participating?
Rik-LeggerConnect With a Mentor Commented:
I don't think you need to do that,
the .tpl will be most likely being parsed by a template engine.

I guess there is something else going wrong,
but maybe the errors are not being written to the browser.

You can force this by editing the index.php file and put this on top:


Let us know if you are getting some helpfull errors now.
bitlaAuthor Commented:
yes now I can see the errors, but dont know what to do.

The same script is working correctly on other hosting.
bitlaAuthor Commented:
no no i made a mistake in placing your given code. When i placed in index.php it still showed blank page.
Actually I pressed Enter after placing the above code so it was showing header error, cache and session errors, once i remove the empty line it is showing blank page.

I found a error_log  in the script folder and it shows this

[25-Mar-2011 03:08:04] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20090626/php_bz2.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20090626/php_bz2.dll: cannot open shared object file: No such file or directory in Unknown on line 0

Open in new window

Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

Ok so you are missing an needed extension,
can you install Bzip2?
bitlaAuthor Commented:

Bz2 (Bzip2) is installed on server.
Are you migrating this from a Windows server by any chance? The error you're getting is indicating that a DLL file is missing (Windows) but your hosting is Linux (according to the info.php you provided -- be sure to remove that info.php file when you're done, it's a security risk to have it publicly available).

A .tpl.php file (which may have the extension .php hidden on your local machine, depending on what OS you are running and how it's configured) should never be served directly by a web server. It's used by Drupal in the creation of the overall page.


bitlaAuthor Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.