GP32 Sqlite3 Database Engine On Gp2x


crusty

Still Fresh
Joined
Jan 2, 2006
Messages
64
Location
Barbados, West Indies
Website
Visit site
I have been successful in compiling and linking the sqlite3
database command line interpreter for use on the gp2x
shell. This is a precursor to using the sqlite3 library as
part of a front screen application.

This required downloading the source from www.sqlite.org
and modifying the Makefile and make.in files.

In addition, the libc-2.2.5.so and ld-2.2.5.so files on the
gp2x need to be copied into the devkitGP2X lib directory.

Coders interested in a copy of the makefiles should pm
me and I will send them to you.
 

esukf

Still Fresh
Joined
Mar 3, 2006
Messages
1
Will this make it possible to have a database driven php web server on the gp2x??
 

Redeeman

Member
Joined
Mar 3, 2006
Messages
179
it already is possible to have a database driven php site served on the gp2x..
for example yes, sqlite can be used, but there are also php-databases, which simply stores plaintext files and uses SQL, others are accessed with some implementation-specific api's
 

crusty

Still Fresh
Joined
Jan 2, 2006
Messages
64
Location
Barbados, West Indies
Website
Visit site
Will this make it possible to have a database driven php web server on the gp2x??
If you create a small php script:

<?php phpinfo()?>

and save it on the gp2x in the directory: /usr/gp2x/www

then you can use your browser to display details about what is
available within the thttpd-php executable. Just use the url:

http://xxx.xxx.xxx.xxx/test.php

where the x's identify your IP address for the gp2x and test.php
is the suggested file name for the script.

The plain text equivalent of the much more readable web page is
printed below.

In my opinion the existing web server is not configured for any
database work driven by php. Another web server, such as lighttpd
would be better suited since it can use a later version of php in cgi
mode. This would also need to be compiled for the gp2x, along with
whatever database server you care to also compile.

I like sqlite because it fast, small, sufficient, and public domain.
I still need to get lighttpd compiled and have not attempted that
yet.

-----------------------------
PHP Version 4.4.2

System Linux gp2x 2.4.25 #3390 2006. 04. 20. (¸ñ) 14:31:55 KST armv4l
Build Date Mar 15 2006 13:40:34
Configure Command './configure' '--with-thttpd=../thttpd-2.21b/' '--with-zlib'
'--disable-all' '--disable-mysql' '--disable-xml' '--disable-pear' '--disable-ipv6'
'--host=arm-linux' '--target=arm-linux' '--prefix=/hd/nk/update/release/usr' '--with-config-file-path=/etc'
Server API thttpd
Virtual Directory Support disabled
Configuration File (php.ini) Path /etc
PHP API 20020918
PHP Extension 20020429
Zend Extension 20050606
Debug Build no
Zend Memory Manager enabled
Thread Safety disabled
Registered PHP Streams php, http, ftp, compress.zlib

This program makes use of the Zend Scripting Language Engine:
Zend Engine v1.3.0, Copyright &copy; 1998-2004 Zend Technologies

PHP Credits

Configuration

PHP Core
Directive Local Value Master Value
allow_call_time_pass_reference On On
allow_url_fopen On On
always_populate_raw_post_data Off Off
arg_separator.input & &
arg_separator.output & &
asp_tags Off Off
auto_append_file no value no value
auto_prepend_file no value no value
browscap no value no value
default_charset no value no value
default_mimetype text/html text/html
define_syslog_variables Off Off
disable_classes no value no value
disable_functions no value no value
display_errors On On
display_startup_errors Off Off
doc_root no value no value
docref_ext no value no value
docref_root no value no value
enable_dl On On
error_append_string no value no value
error_log no value no value
error_prepend_string no value no value
error_reporting no value no value
expose_php On On
extension_dir /usr/local/lib/php/extensions/no-debug-non-zts-20020429 /usr/local/lib/php/extensions/no-debug-non-zts-20020429
file_uploads On On
gpc_order GPC GPC
highlight.bg #FFFFFF #FFFFFF
highlight.comment #FF8000 #FF8000
highlight.default #0000BB #0000BB
highlight.html #000000 #000000
highlight.keyword #007700 #007700
highlight.string #DD0000 #DD0000
html_errors On On
ignore_repeated_errors Off Off
ignore_repeated_source Off Off
ignore_user_abort Off Off
implicit_flush Off Off
include_path .: .:
log_errors Off Off
log_errors_max_len 1024 1024
magic_quotes_gpc On On
magic_quotes_runtime Off Off
magic_quotes_sybase Off Off
max_execution_time 30 30
max_input_time -1 -1
open_basedir no value no value
output_buffering 0 0
output_handler no value no value
post_max_size 8M 8M
precision 14 14
register_argc_argv On On
register_globals Off Off
report_memleaks On On
safe_mode Off Off
safe_mode_exec_dir /usr/local/php/bin /usr/local/php/bin
safe_mode_gid Off Off
safe_mode_include_dir no value no value
sendmail_from no value no value
sendmail_path /usr/sbin/sendmail -t -i /usr/sbin/sendmail -t -i
serialize_precision 100 100
short_open_tag On On
SMTP localhost localhost
smtp_port 25 25
sql.safe_mode Off Off
track_errors Off Off
unserialize_callback_func no value no value
upload_max_filesize 2M 2M
upload_tmp_dir no value no value
user_dir no value no value
variables_order no value no value
xmlrpc_error_number 0 0
xmlrpc_errors Off Off
y2k_compliance On On

standard
Regex Library Bundled library enabled
Dynamic Library Support enabled
Path to sendmail /usr/sbin/sendmail -t -i

Directive Local Value Master Value
assert.active 1 1
assert.bail 0 0
assert.callback no value no value
assert.quiet_eval 0 0
assert.warning 1 1
auto_detect_line_endings 0 0
default_socket_timeout 60 60
safe_mode_allowed_env_vars PHP_ PHP_
safe_mode_protected_env_vars LD_LIBRARY_PATH LD_LIBRARY_PATH
url_rewriter.tags a=href,area=href,frame=src,form=,fieldset= a=href,area=href,frame=src,form=,fieldset=
user_agent no value no value

zlib
ZLib Support enabled
Compiled Version 1.1.3
Linked Version 1.1.3

Directive Local Value Master Value
zlib.output_compression Off Off
zlib.output_compression_level -1 -1
zlib.output_handler no value no value

Additional Modules
Module Name
thttpd

Environment
Variable Value
PWD /usr/gp2x
CONSOLE /dev/console
LD_LIBRARY_PATH ./:/lib:/usr/local/lib:/usr/lib
PREVLEVEL N
SHLVL 2
_ /sbin/thttpd
HOME /
TERM linux
PATH /sbin:/usr/sbin:/usr/local/sbin:/bin:/usr/bin:/usr/local/bin
RUNLEVEL S
INIT_VERSION sysvinit-2.84

PHP Variables
Variable Value
_SERVER["PHP_SELF"] /test.php
_SERVER["SERVER_SOFTWARE"] thttpd/2.21b PHP/20030920
_SERVER["GATEWAY_INTERFACE"] CGI/1.1
_SERVER["REQUEST_METHOD"] GET
_SERVER["REQUEST_URI"] /test.php
_SERVER["PATH_TRANSLATED"] /usr/gp2x/www/test.php
_SERVER["SERVER_PROTOCOL"] HTTP/1.1
_SERVER["REMOTE_ADDR"] 169.1.1.5
_SERVER["REMOTE_HOST"] 169.1.1.5
_SERVER["SERVER_PORT"] 80
_SERVER["PATH_INFO"] /
_SERVER["SCRIPT_NAME"] /test.php
_SERVER["HTTP_HOST"] 169.1.1.3
_SERVER["HTTP_USER_AGENT"] Opera/8.54 (Windows NT 5.1; U; en)
_SERVER["HTTP_ACCEPT"] text/html, application/xml;q=0.9, application/xhtml+xml,
image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1
_SERVER["HTTP_ACCEPT_LANGUAGE"] en
_SERVER["HTTP_ACCEPT_ENCODING"] deflate, gzip, x-gzip, identity, *;q=0
_SERVER["argv"] Array
(
)
_SERVER["argc"] 0
_ENV["PWD"] /usr/gp2x
_ENV["CONSOLE"] /dev/console
_ENV["LD_LIBRARY_PATH"] ./:/lib:/usr/local/lib:/usr/lib
_ENV["PREVLEVEL"] N
_ENV["SHLVL"] 2
_ENV["_"] /sbin/thttpd
_ENV["HOME"] /
_ENV["TERM"] linux
_ENV["PATH"] /sbin:/usr/sbin:/usr/local/sbin:/bin:/usr/bin:/usr/local/bin
_ENV["RUNLEVEL"] S
_ENV["INIT_VERSION"] sysvinit-2.84

PHP License
This program is free software; you can redistribute it and/or modify it under
the terms of the PHP License as published by the PHP Group and included in the
distribution in the file: LICENSE

This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

If you did not receive a copy of the PHP license, or have any questions about
PHP licensing, please contact license@php.net.
 
Last edited by a moderator:
Top