Answer the question
In order to leave comments, you need to log in
How to use sqlite if hosting does not have it?
There is a CMS written in php, it works with mysql, I would like to add support for sqlite.
But not all hosters have it in the box, is it possible to download and use sqlite on their own?
Answer the question
In order to leave comments, you need to log in
@psrafo unfortunately you didn't get the gist of SQLite. It is not a DBMS in the usual sense. It doesn't need to be set. Generally. At all.
This is an embedded database and in order to work with it you need to:
1.
create a database file on disk
2. work with the database from your program
additional functions were built in to work with the database file in SQLite format. That is, the provider of requests to the database file is essentially either.
That is why everyone is talking so hard to you about a certain extension for PHP. In fact, by installing it, or perhaps it is already installed on your hosting, you can work with the SQLite database.
Most likely, you have this lib locally (PHP of the new version), but you don’t have this lib on the hosting (PHP is old). If so, then either you find this lib as a set of *.php files or install from pecl or pear (xs where it is). If the last operation is prohibited by your host, then do nothing.
It all depends on the host and on the tariff to which you are connected. The Hoster itself can connect whatever your heart desires, but only for a fee. If you want to install it yourself, then again you need to find out from the hoster how.
From the documentation:
"As of PHP 5.0, this extension is available by default. As of PHP 5.4, the SQLite extension is only available through PECL."
Actually, what does "use it yourself" mean? Without support from PHP, you won't succeed.
As mentioned above, the sqlite extension in versions greater than 5.0 and less than 5.4 should be built in by default, although the hoster could disable it. If it is enabled, then there are no special problems, you understand. Just upload the database file, set up the connection and use it.
psrafo, don't be stupid. sqlite is not some kind of separate program, it's a stupidly ordinary file with its own structure (like Excel's XLS, if it's not clear). From php, this file can be accessed via the PHP extension. The extension must be connected to the PHP hoster.
http://www.sqlite.org/download.html
Install locally on your computer, transfer your cms locally and test.
Locally I use it, everything is ok, but the hoster does not have it, except for an additional fee. Is there any lib in php that made a request like exec("sqlite > $sql"); ?
Again, by, in php there is, but there is no subd in the server. you can upload sqlite to the server yourself, and use ?
No, you didn't understand the question. I need sqlite itself, not the php extension.
Thanks @howeal , but it was already explained to me here, and I realized that I was stupid. Is it possible to do this without the php extension. Are there any written in php?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question