Sitemap
Links
+++ erd.trabant +++

+++ erd.trabant +++

blablabla

blablabla

php-pgblob - save files as large objects (blobs) to postgresql

//** 2002-2004
//** lo blob test by volker augustin
//** version 0.001
//** www.multiartstudio.com, www.erdtrabant.de, www.mcms09.de, www.hulug.de
//** contact me at kalle at erdtrabant.de
//** this script demonstrates the use of large objects (blobs) with postgres
//** tested with pgsql 7.1
//** only a test and a personal study, not well documented
//** feel free to copy and use where you want

//** 15/04/2004:
//** edited to use with safe_mode=on and register_globals=off

//** Installation:
//1. create a directory e.g. lo somewhere in your webservers vhost-root-directory
//2. edit config section below
//2b. !!! dont forget , you have to set dbname, user, password, port , and host also in the Class below or you cant connect to your database !!!! //
//3. create database-user and database
//4. create table to store filenames and details
// --if you use other tablenames and fieldnames, dont forget to change them below in config section
//remember: postres does not store blobs in this table, but in a global large object table, only oids are stored in our table
/*
CREATE SEQUENCE \"media_id_seq\" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ;
CREATE TABLE \"media\" (
\"id\" integer DEFAULT nextval('\"media_id_seq\"'::text) NOT NULL,
\"media_oid\" oid NOT NULL,
\"name\" character varying NOT NULL,
\"created\" text NOT NULL,
\"mimetype\" character varying NOT NULL,
\"size\" bigint,
Constraint \"media_pkey\" Primary Key (\"id\")
);
*/


if you run into trouble, let me now. use on own risk!!!! kalle at erdtrabant.de

Download Script: Files/devel/php-pgblob-0.001.tgz

Contents:
./php-pgblob-0.001/
./php-pgblob-0.001/data/
./php-pgblob-0.001/data/willy_079.png
./php-pgblob-0.001/data/isomt2.jpg
./php-pgblob-0.001/data/zcow01.gif
./php-pgblob-0.001/data/phpinfo.php
./php-pgblob-0.001/data/test.txt
./php-pgblob-0.001/db_pgsql.inc
./php-pgblob-0.001/index.php
./php-pgblob-0.001/lo_conf.inc
./php-pgblob-0.001/lo_del.php
./php-pgblob-0.001/lo_put.php
./php-pgblob-0.001/lo_read.php
./php-pgblob-0.001/lo_save.php
./php-pgblob-0.001/lo_upload.php

>>PopUP / Drucken / Print<<
blablabla