简体   繁体   中英

Amazon EC2 Server Display Error

I have configured Amazon EC2 Server and install PHP and MySQL . I have uploaded my website on it. it is in smarty .

Problem is when I update any .tpl file, then the server return white page as output in Firefox and Chrome return 500 Internal Server Error . I have surfed everywhere on internet but got nothing.

When I update any .php file then the code work nicely. problem is only with .tpl file.

I'm willing to bet that your templates_c directory is not writable by Apache (identified as apache or httpd, and you can check in your httpd.conf file), or it hasn't been configured correctly during Smarty initialization.

You can try temporarily setting your templates_c directory to 777 permissions to test this hypothesis.

If this ends up being the case, then you'll want to assign group ownership of templates_c to apache, and set the folder permissions to 775. ( They explain this in their documentation. )

An HTTP status of 500, with no page content (Chrome is just being nice and rendering a default error message for you) means that PHP encountered a Fatal Error.

You will need to find out where PHP is configured to log to (usually a file called php_errors.log ) and see what the error was.

Alternatively, you could temporarily allow PHP to output errors to screen, using the error_reporting setting.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM