summaryrefslogtreecommitdiff
path: root/create_firebird_database.php
diff options
context:
space:
mode:
authorlsces <lester@lsces.co.uk>2012-08-05 18:06:38 +0100
committerlsces <lester@lsces.co.uk>2012-08-05 18:06:38 +0100
commitffb0c434e4f58b5933f7b1b1a0544e0d8efc4f1f (patch)
treefc8f9a13e657642be0a1df099129d767e68fda0c /create_firebird_database.php
parentfb7c3c4b8364f7ed8d69207a3514b2a621d3be4b (diff)
downloadinstall-ffb0c434e4f58b5933f7b1b1a0544e0d8efc4f1f.tar.gz
install-ffb0c434e4f58b5933f7b1b1a0544e0d8efc4f1f.tar.bz2
install-ffb0c434e4f58b5933f7b1b1a0544e0d8efc4f1f.zip
Tidy firebird installation on Linux
Diffstat (limited to 'create_firebird_database.php')
-rw-r--r--create_firebird_database.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/create_firebird_database.php b/create_firebird_database.php
index 5c65334..38a35d5 100644
--- a/create_firebird_database.php
+++ b/create_firebird_database.php
@@ -13,7 +13,7 @@
Set tabs to 4 for best viewing.
Added by Lester Caine to provide an in-line generation of Firebird(/Interbase) database
- Firebird requires the database to exist before it can be connected to as part of it's
+ Firebird requires the database to exist before it can be connected to as part of it's
security system
Still need to be extended to allow selection of OS tmp directory,
and path to Firebird bin directory
@@ -36,7 +36,11 @@
$sql = str_replace("\r\n", "\n", $sql);
$sql .= "\n";
- $tmp_name = $_ENV["TMP"].'/'.uniqid('').'.sql';
+ if( isset($_ENV["TMP"])) {
+ $tmp_name = $_ENV["TMP"].'/'.uniqid('').'.sql';
+ } else {
+ $tmp_name = '/tmp/'.uniqid('').'.sql';
+ }
if ($fp = fopen ($tmp_name, 'a')) {
fwrite($fp, $sql);