8. Appendix
C. Possible problems
B. Error messages
« Previous
D. Support
Next »

Appendix C. Possible problems

After update, my templates generate PHP errors

This may happen, if there were changes in the structure of the PHP code generated by OPT. We recommend to clean the template compilation cache (pointed by compileDir configuration option) after updating OPT and let the compiler rebuild it.

The script data are not displayed

OPT does not report such events like undefined template variable. Be sure that you do not make a mistake in the section/variable name both in the template and in the script. You can also change the default error reporting level for the template execution errorReporting:

$tpl->errorReporting = E_ALL | E_NOTICE;

However, in this case the templates might still display some internal notices.

After running a script with OPT I see the blank page.

In 99% cases the reason are some strange settings of Gzip compression in your web server. Try simply to disable such compression in OPT:

$tpl->gzipCompression = false;

I get a message "Exception thrown without a stack frame".

Neither OPT nor any other script that throws exceptions should be used in destructors. If the destructor is called during the finishing the script and some code throws an exception then, we get this message. There are two possible solutions:

public function __destruct()
{
    try
    {
        // Some dangerous code.
    }
    catch(Opt_Exception $e)
    {
        Opt_Error_Handler($e);
    }
} // end __destruct();
C. Possible problems
8. Appendix
« Previous
B. Error messages
Next »
D. Support