Xampp Sqlite

Xampp Sqlite

The use of SQLite starts by installing the software and creating a database. The installation is require on his own server or on a local desktop. To use it on a shared hosting, you can skip the installation and go directly to the verification section.

XAMPP comes with built-in support for SQLite, making it easy to get started building database-powered applications with PHP. This guide will walk you through the process of creating and populating a new SQLite database using XAMPP, then accessing the data within it using PHP.

Xampp sqlite command

Installing SQLite is simple and to check this first step has been achieved correctly, we have just to create a new database like in the script below.

Xampp Sqlite

XAMPP provides developers with an easy and comfortable way to test dynamic webpages without access to the Internet. It also includes the newest versions of Mercury and Tomcat. With XAMPP, you can manage MySQL and SQLite databases and you can create a remote host using FileZilla FTP server (also included in the package). XAMPP comes with built-in support for SQLite, making it easy to get started building database-powered applications with PHP. This guide will walk you through the process of creating and populating a new SQLite database using XAMPP, then accessing the data within it using PHP. SQLite is famous for its great feature zero-configuration, which means no complex setup or administration is needed. This chapter will take you through the process of setting up SQLite on Windows, Linux and Mac OS X. Browse other questions tagged php mysql sql sqlite xampp or ask your own question. The Overflow Blog Level Up: Creative coding with p5.js – part 3. Introducing The Key. Featured on Meta Stack Overflow for Teams is now free for up to 50 users, forever. Announcing “The Key™”.

Why use SQLite

You can choose to use either SQLite or MySQL on a website.

Advantages of SQLite:

  • It does not require a MySQL database on the server, you use your own storage, a SQLite file.
  • It can be saved easily simply by saving the file of the base!
  • It can be used locally with programs written in C or PHP or other languages.
  • It may be used for running Web applications offline in HTML 5.

In return:

  • Access to a SQLite database may slow down if the size becomes very important.
  • Multiple users can not simultaneously modify a database.
  • The SQLite extension is not activated on all shared hosts.

More infos: Appropriate uses for SQLite.

Installing SQLite for PHP

The SQLite library is not included by default, it is necessary to modify the PHP.INI file in the directory of PHP and activate two lines, by removing the semicolon in prefix:

You can run SQLite in Using PHP and SQL locally with XAMPP .

To verify that SQLite works, put the script sqlite-check.php (it is in the archive) in a subfolder of www in Wamp, and run it in localhost.

Or upload it on the server and launch the page, for example: http://www.scriptol.code/sqlite-check.php

The script for SQLite 3 (since PHP 5.4)

The script for SQLite 2:

This code creates the database named base. If the extension is not available, the variable $base will be false.
If it works, a file named base appears in the directory of the script.


  • The complete source code of the scripts in a ZIP archive and the source code for the SQLite 3 version.
  • SQLite Tutorial: Summary.
  • First part: Getting stated with SQLite.
  • Second part: Creating and using a table.
  • Third part: How to find and modify a record.

Xampp Sqlite Windows 10

This is still confusing for so many people. They just started to use Linux and they get confused when told about LAMP instead of XAMPP. Let me explain this to you. LAMP stands for Linux Apache MySQL and PHP. ie, it is a stack of Apache, MySQL, and PHP in a Linux environment.

Now, what is XAMPP? Well, it is something similar, but it's like an all in one package, you get a lot of things ( that includes those packages you need and you don't need )

For example, the XAMPP version 1.83 has the following packages:

Xampp Sqlite Free

  • Apache 2.4.7
  • MySQL 5.6.14
  • PHP 5.5.6
  • PEAR + SQLite 2.8.17/3.7.17 + multibyte support (mbstring)
  • Perl 5.16.3
  • phpMyAdmin 4.0.9
  • OpenSSL 1.0.1e
  • ProFTPD 1.3.4c
  • GD 2.0.35
  • Freetype2 2.4.8.

Now, should I go with XAMPP or LAMP? That depends, if you are lazy and wants to get everything in a few clicks, go with XAMPP. (That works for a desktop machne) But, if you want to go bit more deep, and you need a light environment, go with LAMP.


Step 1 : Let's start with Apache:

Open up a terminal in your Centos 7 machine and type

General motors xm1 tank. That was painless. Phew.

Now, start the server by issuing the following command

You can check if Apache is working by visiting http://your_server_ip. You can find out the IP of your server using

Or if you're doing this on a local machine, you can open up You will be greeted with the default page.

Before doing any modification to the configuration, it is advised that you backup the configuration file, so that in case you mess things up, you could easily revert back to the original configuration.

A word about Firewall: If you are setting it up on a server and have some sort of Firewall enabled (and you should), make sure you open up port 80 so that you can access it over the internet. If you are setting it up on a local machine, don't worry about it.

Step 2: Installing MySQL ( MariaDB )

Xampp Sqlite Editor

What is MariaDB?, you may ask. Well, MariaDB is a community fork of MySQL. It's the truly open source version of MySQL.
It works exactly like MySQL. When Oracle acquired MySQL, the original developers of MySQL itself forked MariaDB and released under GPL license, so that it stays open source. Anyway, let's install it

Now let's start the service and set it to run at system startup.

Now that our MySQL ( MariaDB ) server is installed, let's secure it. Run the following command.

This will ask you a couple of questions, like

  • To change the MySQL root password : You should use a strong password
  • Remove anonymous users : You should remove anonymous users ( type yes )
  • Remove test databases : You should remove it

Once that's done, MySQL should be all set and running. You can login to your MySQL server using the following command

It will ask you for the MySQL root password, type it and press enter. That's it.!

Step 3: Installing PHP

Aaannd PHP is installed. Restart httpd so that it loads php

To test if PHP was installed properly, create a test file under your document root ( /var/www/html )

Now, in your browser, open the page : http://your_ip_here/test.php and you should see the phpinfo page

You should delete the test.php file once you made sure that everything is working.

And, that's it. Your server is all set ( well, basically ) Now, get to work 😉