Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
smarty outputting blank page with no errors
  • I am using Smarty template engine to display pages. It is displaying just blank pages with no errors.None of the HTML or smarty variables are displaying. I have checked the permissions on the templates_c directory and I have the right permissions. Can somebody help with this.
  • You've got full error reporting on? If the template has a PHP error, the resulting view is empty.
  • Yes my error reporting is below:
    error_reporting(-1);
    ini_set('display_errors', 1);

    How do I get the PHP error to display so I can fix it?
  • If there is an error it should be recorded in your webserver logs.

    Views work by running their code, then capturing their output. If there is a fatal error, there's nothing to capture.
  • I walked through what is happening when I try to call this template and it does result in an PHP error. I looked at the values of the set_error_handler method of the bootstrap class and the $severity variable had a value of 2, the $message = (string) 'filemtime():  stat failed for depot/fuel/app/tmp/Smarty/templates_c/6c6c..3.file.layout.tpl.php' and the $filepath = /Smarty/libs/sysplugins/smarty_resource.php and the $line = 720.

    Can you help me figure out what this all means?
  • HarroHarro
    Accepted Answer
    "stat failed" usually means it can't read the file.

    From the looks of it, it might be sloppy programming: http://www.smarty.net/forums/viewtopic.php?p=79296
  • I found out the issue was a file permissions issue. I fixed it by chmod the template_c directory to 777. Thanks!

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion