diff -u -r pgwebforum-0.5/find.php pgwebforum/find.php
--- pgwebforum-0.5/find.php	Fri Mar 24 01:23:24 2000
+++ pgwebforum/find.php	Fri May 12 00:33:58 2000
@@ -41,7 +41,7 @@
 	{
 	if ($tokens[$i] != "or" && $tokens[$i]!= "and" && $tokens[$i]!= ")" &&  $tokens[$i]!= "(" && $tokens[$i]!= "") 
 		{
-		$query.= " $field~*'" . $tokens[$i]. "' ";
+		$query.= " $field like '%" . $tokens[$i]. "%' ";
 		}
 	else
 		{
@@ -59,7 +59,7 @@
 
 /* The query is prepared */
 
-$conn=Pg_Connect("dbname=webforum");
+$conn=OCILogon("dbo", "manager", "DBNAME");
 if (!$conn)
 	{
 	echo "<h1>Database Error!</h1>";
@@ -67,16 +67,23 @@
 	}
 
 
-$result=Pg_Exec($conn,$query);
+
+$stmt=OCIParse($conn,$query);
+$result=OCIExecute($stmt);
 
 if (!$result)
 	{
 	echo "<h1>Database Error!</h1>";
 	}
 
-for ($i=0;$i<$num1=pg_numrows($result);$i++)
+$nrows = OCIFetchStatement($stmt, $result);
+for ($i=0;$i<$num1=$nrows;$i++)
 	{
-	$arr = pg_fetch_array($result,$i);
+	reset($result);
+	while ( $column  = each($result) ) {   
+		   $data = $column['value'];
+                   $arr[strtolower($column['key'])] = $data[$i];
+        }
 	echo "<p><b>Time:</b> " . $arr['msgtime'] ."\n";
 	echo "<br><b>Author:</b> ". $arr['author'] ."\n";
 	echo "<br><b>E-mail:</b> ". $arr['email'] ."\n";
@@ -85,17 +92,24 @@
 	echo "<pre>" . $arr['message'] . "</pre>";
 	echo "<hr>";
 	}
+OCIFreeStatement($stmt);
 
 $query=ereg_replace(" main "," replies ",$query);
 $query.="ORDER BY msgtime DESC";
 
 
 
-$result=Pg_Exec($conn,$query);
+$stmt=OCIParse($conn,$query);
+$result=OCIExecute($stmt);
 
-for ($i=0;$i<$num2=pg_numrows($result);$i++)
+$nrows = OCIFetchStatement($stmt, $result);
+for ($i=0;$i<$num2=$nrows;$i++)
 	{
-	$arr = pg_fetch_array($result,$i);
+	reset($result);
+	while ( $column  = each($result) ) {   
+		   $data = $column['value'];
+                   $arr[strtolower($column['key'])] = $data[$i];
+        }
 	echo "<p><b>Time:</b> " . $arr['msgtime'] ."\n";
 	echo "<br><b>Author:</b> ". $arr['author'] ."\n";
 	echo "<br><b>E-mail:</b> ". $arr['email'] ."\n";
@@ -104,9 +118,10 @@
 	echo "<pre>" . $arr['message'] . "</pre>";
 	echo "<hr>";
 	}
+	OCIFreeStatement($stmt);
 
 echo "</table>\n";
-Pg_Close($conn);
+OCILogoff($conn);
 if ($num1+$num2==0)
 	echo "<h2>There was not found anything that matches with the query.</h2>";
 ?>
diff -u -r pgwebforum-0.5/index.php pgwebforum/index.php
--- pgwebforum-0.5/index.php	Fri Mar 24 01:56:22 2000
+++ pgwebforum/index.php	Fri May 12 00:33:58 2000
@@ -31,7 +31,7 @@
 #Define here the number of messages to show on the first page
 $nummsg=5;
 
-$conn=Pg_Connect("dbname=webforum");
+$conn=OCILogon("dbo", "manager", "DBNAME");
 if (!$conn)
 	{
 	echo "<h1>Database Error!</h1>";
@@ -40,7 +40,8 @@
 
 $query="SELECT code,msgtime,subject,author,nreps from main ORDER BY msgtime DESC";
 
-$result=Pg_Exec($conn,$query);
+$stmt=OCIParse($conn,$query);
+$result=OCIExecute($stmt);
 
 if (!$result)
 	{
@@ -58,10 +59,16 @@
 echo "</tr>\n";
 
 
-for ($i=0;($base+$i)<pg_numrows($result) && $i< $nummsg;$i++)
+$nrows = OCIFetchStatement($stmt, $result);
+for ($i=0;($base+$i)<$nrows && $i< $nummsg;$i++)
 	{
 	echo "<tr>";
-	$arr = pg_fetch_array($result,($i+$base));
+	reset($result);
+	while ( $column  = each($result) ) {   
+		   $data = $column['value'];
+                   $arr[strtolower($column['key'])] = $data[$base+$i];
+        }
+
 	$subjch = explode (" ",chop($arr['subject']));
 	$subjch = implode ("%20",$subjch);
 	echo "<td class=\"msgs\" width=\"25%\">". $arr['msgtime'] ."</td>\n";
@@ -71,12 +78,14 @@
 	echo "</tr>\n";
 	}
 echo "</table>\n";
-Pg_Close($conn);
+reset($result);
+OCIFreeStatement($stmt);
+OCILogoff($conn);
 
 $prevbase=$base+$i;
 $nextbase=$base-$nummsg;
 
-if ($prevbase >= pg_numrows($result))
+if ($prevbase >= $nrows)
 	echo "<p align=center>Prev |";
 else
 	echo "<p align=center><a href=\"index.php?base=". $prevbase  ."\">Prev</a> |";
diff -u -r pgwebforum-0.5/misc.sql pgwebforum/misc.sql
--- pgwebforum-0.5/misc.sql	Fri Mar 24 01:23:24 2000
+++ pgwebforum/misc.sql	Fri May 12 00:33:58 2000
@@ -1,22 +1,8 @@
--- Installing the PL/pgql
--- If you have already installed the pl/pgsql you can comment the next two lines
-CREATE FUNCTION plpgsql_call_handler () RETURNS OPAQUE AS '/usr/local/pgsql/lib/plpgsql.so' LANGUAGE 'C';
-CREATE TRUSTED PROCEDURAL LANGUAGE 'plpgsql' HANDLER plpgsql_call_handler LANCOMPILER 'PL/pgSQL';
-
 CREATE SEQUENCE serial MINVALUE -2147483647;
 
-CREATE FUNCTION inc_main () RETURNS OPAQUE AS
-	'BEGIN
-	UPDATE main SET nreps = nreps+1 WHERE code = new.code;
-	RETURN new;
-	END;' 
-LANGUAGE 'plpgsql';
-
-CREATE TRIGGER tinc_main AFTER INSERT ON replies FOR EACH ROW EXECUTE PROCEDURE inc_main();
+CREATE OR REPLACE TRIGGER tinc_main AFTER INSERT ON replies FOR EACH ROW 
+	BEGIN
+	UPDATE main SET nreps = nreps+1 WHERE code = :new.code;
+	END; 
 
-CREATE USER nobody;
 
--- Permissions to user nobody, supposing this is the apache user
-GRANT SELECT,INSERT,UPDATE ON main TO nobody;
-GRANT SELECT,INSERT ON replies TO nobody;
-GRANT UPDATE ON serial TO nobody;
\ No newline at end of file
Only in pgwebforum: ociwebforum
diff -u -r pgwebforum-0.5/search.php pgwebforum/search.php
--- pgwebforum-0.5/search.php	Fri Mar 24 01:23:25 2000
+++ pgwebforum/search.php	Fri May 12 00:33:58 2000
@@ -42,9 +42,8 @@
 $query=ereg_replace("(message~\*'[[:alnum:]]*') *(message~\*'[[:alnum:]]*')","\\1 or \\2",$query);
 
 /* The query is prepared */
-echo $query;
 
-$conn=Pg_Connect("dbname=webforum");
+$conn=OCIConnect("dbo", "manager", "DBNAME");
 if (!$conn)
 	{
 	echo "<h1>Database Error!</h1>";
@@ -52,16 +51,22 @@
 	}
 
 
-$result=Pg_Exec($conn,$query);
+$stmt=OCIParse($conn,$query);
+$result=OCIExecute($stmt);
 
 if (!$result)
 	{
 	echo "<h1>Database Error!</h1>";
 	}
 
-for ($i=0;$i<pg_numrows($result);$i++)
+$nrows = OCIFetchStatement($stmt, $result);
+for ($i=0;$i<nrows;$i++)
 	{
-	$arr = pg_fetch_array($result,0);
+	reset($result);
+	while ( $column  = each($result) ) {   
+		   $data = $column['value'];
+                   $arr[strtolower($column['key'])] = $data[$i];
+        }
 	echo "<p><b>Time:</b> " . $arr['msgtime'] ."\n";
 	echo "<br><b>Author:</b> ". $arr['author'] ."\n";
 	echo "<br><b>E-mail:</b> ". $arr['email'] ."\n";
@@ -70,17 +75,23 @@
 	echo "<pre>" . $arr['message'] . "</pre>";
 	echo "<hr>";
 	}
+OCIFreeStatement($stmt);
 
 $query=ereg_replace(" main "," replies ",$query);
 $query.="ORDER BY msgtime DESC";
 
 
+$stmt=OCIParse($conn,$query);
+$result=OCIExecute($stmt);
 
-$result=Pg_Exec($conn,$query);
-
-for ($i=0;$i<pg_numrows($result);$i++)
+$nrows = OCIFetchStatement($stmt, $result);
+for ($i=0;$i<nrows;$i++)
 	{
-	$arr = pg_fetch_array($result,$i);
+	reset($result);
+	while ( $column  = each($result) ) {   
+		   $data = $column['value'];
+                   $arr[strtolower($column['key'])] = $data[$i];
+        }
 	echo "<p><b>Time:</b> " . $arr['msgtime'] ."\n";
 	echo "<br><b>Author:</b> ". $arr['author'] ."\n";
 	echo "<br><b>E-mail:</b> ". $arr['email'] ."\n";
@@ -88,9 +99,10 @@
 	echo "<pre>" . $arr['message'] . "</pre>";
 	echo "<hr>";
 	}
+OCIFreeStatement($stmt);
 
 echo "</table>\n";
-Pg_Close($conn);
+OCILogoff($conn);
 
 ?>
 
diff -u -r pgwebforum-0.5/send.php pgwebforum/send.php
--- pgwebforum-0.5/send.php	Fri Mar 24 01:23:25 2000
+++ pgwebforum/send.php	Fri May 12 00:33:58 2000
@@ -16,7 +16,7 @@
 	echo "<p>Click on the Back button and try again";
 	exit;
 	}
-$conn=Pg_Connect("dbname=webforum");
+$conn=OCILogon("dbo", "manager", "DBNAME");
 if (!$conn)
 	{
 	echo "</h2>There was an error with your message!!<br> Possibly the server is down</h2>" ;
@@ -27,14 +27,15 @@
 
 if ($code=="")
 	{
-	$query="INSERT INTO main VALUES (NEXTVAL('serial'),'now','$subject','$author','$email','$message',0)";
+	$query="INSERT INTO main VALUES (serial.NEXTVAL,sysdate,'$subject','$author','$email','$message',0)";
 	}
 else
 	{
-	$query="INSERT INTO replies VALUES ('$code','now','$subject','$author','$email','$message')";
+	$query="INSERT INTO replies VALUES ('$code',sysdate,'$subject','$author','$email','$message')";
 	}
-$result=Pg_Exec($conn,$query);
 
+$stmt=OCIParse($conn,$query);
+$result=OCIExecute($stmt);
 
 if ($result)
 	{
@@ -45,7 +46,8 @@
 	echo "</h2>There was an error with your message!!<br> Possibly the server is down</h2>" ;
 	echo "<p>Contact the administrator";
 	}
-Pg_Close($conn);
+OCICommit($conn);
+OCILogoff($conn);
 ?>
 
 <p align=center><a href="index.php">Main</a></p>
diff -u -r pgwebforum-0.5/table_def.sql pgwebforum/table_def.sql
--- pgwebforum-0.5/table_def.sql	Fri Mar 24 01:23:25 2000
+++ pgwebforum/table_def.sql	Fri May 12 00:33:58 2000
@@ -1,20 +1,20 @@
 CREATE TABLE main (
-	code int4 NOT NULL,  	 -- code used to link table main to table replies
-	msgtime datetime NOT NULL,
+	code integer NOT NULL,  	 -- code used to link table main to table replies
+	msgtime date NOT NULL,
 	subject char(50) NOT NULL , 
 	author char(30),
 	email char(30),
-	message text,
-	nreps int4,    		-- number of replies
+	message varchar2(4000),
+	nreps integer,    		-- number of replies
 	PRIMARY KEY (code));
 
 CREATE TABLE replies (
-	code int4 NOT NULL,
-	msgtime datetime NOT NULL,
+	code integer NOT NULL,
+	msgtime date NOT NULL,
 	subject char(50) NOT NULL,
 	author char(30),
 	email char(30),
-	message text,
+	message varchar2(4000),
 	PRIMARY KEY (msgtime));
 
 
diff -u -r pgwebforum-0.5/viewmsg.php pgwebforum/viewmsg.php
--- pgwebforum-0.5/viewmsg.php	Fri Mar 24 01:23:25 2000
+++ pgwebforum/viewmsg.php	Fri May 12 00:33:58 2000
@@ -18,7 +18,7 @@
 
 echo "<p><a href=\"sendform.php?subject=". $subjch . "&code=" . $code ." \">Reply</a></p><hr>\n";
 
-$conn=Pg_Connect("dbname=webforum");
+$conn=OCILogon("dbo", "manager", "DBNAME");
 if (!$conn)
 	{
 	echo "<h1>Database Error!</h1>";
@@ -26,27 +26,40 @@
 	}
 
 $query="SELECT * from main where code='$code'";
-$result=Pg_Exec($conn,$query);
+$stmt=OCIParse($conn,$query);
+$result=OCIExecute($stmt);
 
 if (!$result)
 	{
 	echo "<h1>Database Error!</h1>";
 	}
 
-$arr = pg_fetch_array($result,0);
+$nrows = OCIFetchStatement($stmt, $result);
+reset($result);
+while ( $column  = each($result) ) {   
+	   $data = $column['value'];
+           $arr[strtolower($column['key'])] = $data[0];
+}
 echo "<p><b>Time:</b> " . $arr['msgtime'] ."\n";
 echo "<br><b>Author:</b> ". $arr['author'] ."\n";
 echo "<br><b>E-mail:</b> ". $arr['email'] ."\n";
 echo "<br><b>Message:</b>\n";
 echo "<pre>" . $arr['message'] . "</pre>";
 echo "<hr>";
+reset($result);
 
 $query="SELECT * from replies where code='$code' ORDER BY msgtime DESC";
-$result=Pg_Exec($conn,$query);
+$stmt=OCIParse($conn,$query);
+$result=OCIExecute($stmt);
 
-for ($i=0;$i<pg_numrows($result);$i++)
+$nrows = OCIFetchStatement($stmt, $result);
+for ($i=0;$i<$nrows;$i++)
 	{
-	$arr = pg_fetch_array($result,$i);
+	reset($result);
+	while ( $column  = each($result) ) {   
+		   $data = $column['value'];
+                   $arr[strtolower($column['key'])] = $data[$i];
+        }
 	echo "<p><b>Time:</b> " . $arr['msgtime'] ."\n";
 	echo "<br><b>Author:</b> ". $arr['author'] ."\n";
 	echo "<br><b>E-mail:</b> ". $arr['email'] ."\n";
@@ -54,8 +67,9 @@
 	echo "<pre>" . $arr['message'] . "</pre>";
 	echo "<hr>";
 	}
+OCIFreeStatement($stmt);
 echo "</table>\n";
-Pg_Close($conn);
+OCILogoff($conn);
 ?>
 
 <p align=center><a href="index.php">Main</a></p>
