An error occurred while loading the smarty template for php in html-mac. Is it possible that it was set by php. ini?

Source: Internet
Author: User
Tags smarty template
The project was previously written in windows and can be uploaded to windows sever2008. However, I recently planned to use mac for development, but I found that the template cannot be parsed, in php, everything output with print_r is normal, but the html template output with smarty is always displayed as a blank page...

The project was previously written in windows and can be used normally after being uploaded to windows sever 2008. However, I recently planned to use mac for development, but I found that the template cannot be parsed.print_rOutput everything is normal, but usesmartyOutputhtmlThe template is displayed on a blank page, and no error is reported.

This problem has also occurred in the past in windows, but it is because the network fails to upload html files to the server using the FTP tool. This time the html file is good, and it should not be the reason.

Not because it is not enabled.php.iniIndisplay_errorsBecause it is open

Is it becausephp.iniWhy? Is there any setting related to this?

This permission is readable and writable, and both folders and files are. But I found that mac has the permission on files, not only for login users, but also for different applications? Will the permission to read php or Apache be disabled?

Reply content:

The project was previously written in windows and can be used normally after being uploaded to windows sever 2008. However, I recently planned to use mac for development, but I found that the template cannot be parsed.print_rOutput everything is normal, but usesmartyOutputhtmlThe template is displayed on a blank page, and no error is reported.

This problem has also occurred in the past in windows, but it is because the network fails to upload html files to the server using the FTP tool. This time the html file is good, and it should not be the reason.

Not because it is not enabled.php.iniIndisplay_errorsBecause it is open

Is it becausephp.iniWhy? Is there any setting related to this?

This permission is readable and writable, and both folders and files are. But I found that mac has the permission on files, not only for login users, but also for different applications? Will the permission to read php or Apache be disabled?

Chmod 777/Library/WebServer/Documents
It is indeed a permission issue. It is estimated that smarty has no permission to write files, so it failed, but did not report an error.
The above is the terminal command, followed by the project directory, just change it to your own.

This has nothing to do with php. ini settings. smarty is a php third-party package. Check the import path carefully.

Note Permissionschrow -R 755 /tmp

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.