File: 014_sane_error_on_missing_db_module.diff

package info (click to toggle)
phpbb2 2.0.21-6
  • links: PTS
  • area: main
  • in suites: etch-m68k
  • size: 4,224 kB
  • ctags: 12
  • sloc: sh: 476; makefile: 108; perl: 29; php: 21
file content (68 lines) | stat: -rw-r--r-- 1,995 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
diff -ur phpBB2.old/db/mysql4.php phpBB2/db/mysql4.php
--- phpBB2.old/db/mysql4.php	2004-11-18 21:02:11.000000000 +0100
+++ phpBB2/db/mysql4.php	2005-02-09 13:53:10.000000000 +0100
@@ -24,6 +24,14 @@
 
 define("SQL_LAYER","mysql4");
 
+if (!function_exists('mysql_connect')) {
+   die("The database module for the database you are using, MySQL, is not
+   available. Please (re)install the php4-mysql package or if it's already
+   installed, add <tt>extension=mysql.so</tt> to the relevant
+   <tt>/etc/php/&lt;sapi&gt;/php.ini</tt> and restart the webserver if
+   appropriate.");
+}
+
 class sql_db
 {
 
diff -ur phpBB2.old/db/mysql.php phpBB2/db/mysql.php
--- phpBB2.old/db/mysql.php	2004-11-18 21:02:11.000000000 +0100
+++ phpBB2/db/mysql.php	2005-02-09 13:52:16.000000000 +0100
@@ -24,6 +24,14 @@
 
 define("SQL_LAYER","mysql");
 
+if (!function_exists('mysql_connect')) {
+   die("The database module for the database you are using, MySQL, is not
+   available. Please (re)install the php4-mysql package or if it's already
+   installed, add <tt>extension=mysql.so</tt> to the relevant
+   <tt>/etc/php/&lt;sapi&gt;/php.ini</tt> and restart the webserver if
+   appropriate.");
+}
+
 class sql_db
 {
 
@@ -332,4 +340,4 @@
 
 } // if ... define
 
-?>
\ No newline at end of file
+?>
diff -ur phpBB2.old/db/postgres7.php phpBB2/db/postgres7.php
--- phpBB2.old/db/postgres7.php	2004-11-18 21:02:11.000000000 +0100
+++ phpBB2/db/postgres7.php	2005-02-09 13:55:33.000000000 +0100
@@ -24,6 +24,14 @@
 
 define("SQL_LAYER","postgresql");
 
+if (!function_exists('pg_connect')) {
+   die("The database module for the database you are using, PostgreSQL, is not
+   available. Please (re)install the php4-pgsql package or if it's already
+   installed, add <tt>extension=pgsql.so</tt> to the relevant
+   <tt>/etc/php/&lt;sapi&gt;/php.ini</tt> and restart the webserver if
+   appropriate.");
+}
+
 class sql_db
 {
 
@@ -394,4 +402,4 @@
 
 } // if ... defined
 
-?>
\ No newline at end of file
+?>