SYMPTOMS
The site cannot be published to the specified location.The specified site location does not support modules data storage. SQLite version 2.x must be installed at the target server. Please contact the server administrator.
CAUSE
There is a special requirements list for publishing server exists - http://www.parallels.com/en/products/sitebuilder/reqsThis list includes sqlite (2.x, support UTF-8 encoding) support for PHP. If publishing side does not have appropriate SQLite 2.x extension installed for PHP you will get error message during publication.
RESOLUTION
There should be sqlite2 libraries itself installed on the server with appropriate sqlite 2.x UTF-8 encoding support.SQLite libraries package can be installed on the server directly using system automated update program. For example, with help of 'yum':
# yum install sqlite2
or it can be found on one of the RPM resources, as http://rpm.pbone.net or http://rpmfind.net/
As for sqlite 2.x UTF-8 encoding support for PHP appropriate php-sqlite package which includes necessary sqlite.so extension should be installed on the server. You can try to install it with help of 'yum' or 'apt-get' (on Debian and Ubuntu servers). For example, for php5:
# yum install php-sqlite
# apt-get install php5-sqlite (on Ubuntu and Debian servers)
If no suitable packages found extension can be also compiled from the SQLite sources. You can find some instuctions how to compile sqlite.so with UTF-8 encoding support below:
Note, following packages should be installed for this operation: tar, php, php-devel
These are just general instructions and they can differ depending on OS installation and configuration.
Step by step instructions are listed below:
- Download source package. You can get it from here: http://pecl.php.net/package/SQLite
# wget http://pecl.php.net/get/SQLite-1.0.3.tgz
or
# pear download sqlite - Unpack SQLite-1.0.3.tgz to SQLite-1.0.3 directory:
# tar -xzf SQLite-1.0.3.tgz
- Move into SQLite-1.0.3 directory
# cd SQLite-1.0.3
- You need to have UTF-8 encoding support for sqlite.so extension, so following modification should be done:
edit SQLite-1.0.3/libsqlite/src/main.c file and change this section
#ifdef SQLITE_UTF8
const char sqlite_encoding[] = "UTF-8";
#else
const char sqlite_encoding[] = "iso8859";
#endifto
//#ifdef SQLITE_UTF8
const char sqlite_encoding[] = "UTF-8";
//#else
//const char sqlite_encoding[] = "iso8859";
//#endifcomment all strings excluding one with UTF-8 encoding.
- Find phpize binary file and run it. Location for this file can be different. Standard path is /usr/bin/phpize. Make sure that you are still in SQLite-1.0.3 directory and run the following command:
# /usr/bin/phpize (path to phpize can be different)
If there is no such file, try to find it with following commands:
# whereis phpize
# locate phpize|grep bin - Find location for php-config file. It should be the same as for phpize file and run following commands:
# ./configure --with-sqlite --with-php-config=/usr/bin/php-config (path to php-config can be different) - Run 'make' command:
# make
If you meet something like that:
"error: `BYREF_NONE' undeclared"
you will need edit sqlite.c comment out the following line:
/* static unsigned char arg3_force_ref[] = {3, BYREF_NONE, BYREF_NONE, BYREF_FORCE }; */
And then change these lines
function_entry sqlite_functions[] = {
PHP_FE(sqlite_open, arg3_force_ref)
PHP_FE(sqlite_popen, arg3_force_ref)
to
function_entry sqlite_functions[] = {
PHP_FE(sqlite_open, third_arg_force_ref)
PHP_FE(sqlite_popen, third_arg_force_ref) - # make
- # make install
- # cp modules/sqlite.so /usr/lib/php/modules (path to modules folder can be different). Actually, 'make install' should copy the extension to appropriate place so this operation might be not required.
- You should create a file in /etc/php.d/ named sqlite.ini or add sqlite.so extension directly into php.ini file. Inside write this :
; Enable sqlite extension module
extension=sqlite.so - Restart apache service with
# /sbin/service/httpd restart
or
# /etc/init.d/httpd restart
Additional information
Related articles:Does Sitebuilder support SQLite 3.x?
Warning about UTF-8 encoding support for SQlite