Protect your SQLite database (SQLite database security cheats) _sqlite

Source: Internet
Author: User
Tags parse error sqlite sqlite database
SQLite has no restrictions on licensing protocols and supports most of the standard SQL 92 statements, I believe more and more people will use this database.
The combination of PHP and SQLite is just like the ASP and access in the same year, access can encounter malicious download, SQLite is also not spared, because SQLite is also a binary file, as long as the web can be accessed, can be downloaded.
Access can use tricks to prevent users from downloading, and SQLite can. Here are a few common ways to prevent SQLite from being downloaded
1, put SQLite in the Web can not access to the place.
Some virtual hosts will also provide a separate directory for users to put some do not want to be downloaded or access to files, so it is safe to put in this directory. Ilia also provides another way of doing something similar to access.
is to change the SQLite database file name extension to. php and create a table in the database using the following methods:
CREATE table ' so that anyone who accesses the file will have a PHP parse error message that prevents the user from downloading.
2. If PHP is running as a separate process for CGI or Apache
Then you can modify the permissions of the SQLite database file, such as 0600.
3. If the Web server is Apache and supports custom. Htaccess, you can include the following in the. htaccess file:
Deny from all
Where. SQLite is the extension of your database file.
4, put your database name set the complex point, not easy to be guessed by others

Related Article

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.