R
R
Rafael Hovhannisyan2013-11-26 13:24:20
CMS
Rafael Hovhannisyan, 2013-11-26 13:24:20

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

10 answer(s)
L
Leonid, 2013-11-26
@hosembafer

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

A
Alexey Vikhrev, 2013-11-26
@VortexAll

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.

E
evnuh, 2013-11-26
@evnuh

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.

R
Roman Makarov, 2013-11-26
@vollossy

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.

H
howeal, 2013-11-29
@howeal

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.

A
Alexey, 2013-11-26
@ScorpLeX

http://www.sqlite.org/download.html
Install locally on your computer, transfer your cms locally and test.

R
Rafael Hovhannisyan, 2013-11-26
@hosembafer

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"); ?

R
Rafael Hovhannisyan, 2013-11-26
@hosembafer

Again, by, in php there is, but there is no subd in the server. you can upload sqlite to the server yourself, and use ?

R
Rafael Hovhannisyan, 2013-11-26
@hosembafer

No, you didn't understand the question. I need sqlite itself, not the php extension.

R
Rafael Hovhannisyan, 2013-11-29
@hosembafer

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 question

Ask a Question

731 491 924 answers to any question