Fastcgi:sqlite3::exec (): Attempt to write a readonly database

Source: Internet
Author: User
Tags php and mysql
The database and Storage database directory chmod 777, and use sudo -u lighttpd php test.php no error after execution, only when using the browser to access test.php when the error occurs, what is the good?

Reply content:

The database and Storage database directory chmod 777, and use sudo -u lighttpd php test.php no error after execution, only when using the browser to access test.php when the error occurs, what is the good?

The problem of permissions generally divided into two kinds, operating system permissions and in-app permissions, to solve the idea:
1, check the operating system permissions, confirm the HTTP user, and then use this user access to see if there is a problem.
Another possibility is that there are multiple PHP or SQL databases installed in the system, using which PHP, which MySQL to verify that the PHP and MySQL used by the Web service are one. Another possibility is that your access path, such as the data directory has permissions, but the previous level of the directory does not have permissions, there will be problems.
2. Troubleshoot whether the database user has permission to specify a database.

  • 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.