sqlite issue?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers sqlite issue?
# 1  
Old 07-23-2004
sqlite issue?

i'm on freebsd 5.2.1, and from a fresh installation i've used pkg_add for the latest ported version of apache, as well as installing php 5. supposedly php5 comes with native support for sqlite (in the binary package), and this is what i added.

i am trying to install a site engine (the 'gyrator' engine, from http://www.gyrate.org) and am encountering an annoying issue. there is an sqlite database setup script, and running it via the php results in the script dying after attempting to write to the sqlite database (though it can recognize and play with the database file without issues).

i was under the impression that this is a permissions issue, but chmod 777 on the directories and files in question squashed that suspician.

if anybody is interested in looking at the gyrator engine, or whatever, let me know and i'll post more information (if it's necessary).
 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Manipulating UNIX and sqlite db

Hi there, I have multiple rows of data. For example: S/N | Name| Age I would like to store them into sqlite database after doing some grepping in CSV and output them into console/html format. Will it be possible? (1 Reply)
Discussion started by: alvinoo
1 Replies

2. Shell Programming and Scripting

Using sqlite query to build script...

Okay, so this one is a bit above my knowledge level so I'm hoping for some pointers. Here's the scenario: I have a backup system on my network that makes single file images of the machines it's backing up and uses an sqlite database to keep track of everything. As is pretty typical with... (2 Replies)
Discussion started by: NyxPDX
2 Replies

3. UNIX and Linux Applications

ruby/SQLite database interface

Hello, I'm not sure this is quite the right place, but there do seem to be allot of posts with folks using ruby to play nicely with databases so I thought I would give it a go. I am starting a long process of developing a database application bases on SQLite and ruby. This will run on various... (1 Reply)
Discussion started by: LMHmedchem
1 Replies

4. Shell Programming and Scripting

[ask]sqlite with shell script

hlow all i have file like this : BDG0100.2011091620162100CF5341.DAT BDG0100.2011091720175500CF5342.DAT BDG0100.2011091820192900CF5343.DAT BDG0100.2011091920210600CF5344.DAT but now i want make file like this 20110916.DAT 20110919.DAT 20110918.DAT 20110919.DAT so what i can do that... (3 Replies)
Discussion started by: zvtral
3 Replies

5. Linux

Using squid_db_auth to authenticate squid users against SQLite

Hi guys, Can we use squid_db_auth to authenticate squid users against SQLite database? I googled but all configurations are in MySQL. (0 Replies)
Discussion started by: majid.merkava
0 Replies

6. Shell Programming and Scripting

hell and sqlite

Hi everyone, I have a requirement that requires me to fill an sqlite database with 100,000 entries (no duplicates). I will start out by giving the command that will insert the values necessary to populate the database: # sqlite /var/local/database/dblist "insert into list... (2 Replies)
Discussion started by: ogoy
2 Replies

7. Shell Programming and Scripting

Perl - SQLite question

Hello All, I am trying to write a Perl script that is using 'SQLite' as the application needs a very light weight Database. I wanted to know how to catch exceptions when I run queries in SQLite. Without this the Perl script comes to a halt everytime an exception occurs. Please help. Regards,... (4 Replies)
Discussion started by: garric
4 Replies

8. HP-UX

sqlite database in HP-UX vs Linux

Hi everybody, We have a cgi application which accesses sqlite database. It works fine in Linux environment but the same code doesn't enter data into the database when done in HP-UX environment. Should the codes vary depending on whether it is Linux or HP-UX. Regards Ruma (1 Reply)
Discussion started by: perlprg
1 Replies
Login or Register to Ask a Question
PDO.SQLITECREATEFUNCTION(3)						 1					       PDO.SQLITECREATEFUNCTION(3)

PDO
::sqliteCreateFunction - Registers a User Defined Function for use in SQL statements SYNOPSIS
public bool PDO::sqliteCreateFunction (string $function_name, callable $callback, [int $num_args]) DESCRIPTION
Warning This function is EXPERIMENTAL. The behaviour of this function, its name, and surrounding documentation may change without notice in a future release of PHP. This function should be used at your own risk. This method allows you to register a PHP function with SQLite as an UDF (User Defined Function), so that it can be called from within your SQL statements. The UDF can be used in any SQL statement that can call functions, such as SELECT and UPDATE statements and also in triggers. PARAMETERS
o $function_name - The name of the function used in SQL statements. o $callback - Callback function to handle the defined SQL function. Note Callback functions should return a type understood by SQLite (i.e. scalar type). o $num_args - Hint to the SQLite parser if the callback function accepts a predetermined number of arguments. RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 PDO.sqliteCreateFunction(3) example <?php function md5_and_reverse($string) { return strrev(md5($string)); } $db = new PDO('sqlite:sqlitedb'); $db->sqliteCreateFunction('md5rev', 'md5_and_reverse', 1); $rows = $db->query('SELECT md5rev(filename) FROM files')->fetchAll(); ?> In this example, we have a function that calculates the md5 sum of a string, and then reverses it. When the SQL statement executes, it returns the value of the filename transformed by our function. The data returned in $rows contains the processed result. The beauty of this technique is that you do not need to process the result using a foreach loop after you have queried for the data. Tip You can use "PDO::sqliteCreateFunction" and "PDO::sqliteCreateAggregate" to override SQLite native SQL functions. Note This method is not available with the SQLite2 driver. Use the old style sqlite API for that instead. SEE ALSO
"PDO::sqliteCreateAggregate", sqlite_create_function(3), sqlite_create_aggregate(3). PHP Documentation Group PDO.SQLITECREATEFUNCTION(3)