diff options
| author | lsces <lester@lsces.co.uk> | 2026-04-05 15:29:16 +0100 |
|---|---|---|
| committer | lsces <lester@lsces.co.uk> | 2026-04-05 15:29:16 +0100 |
| commit | 516dfc95fcd3558e4dc205f2a2b87b44bf47c4a8 (patch) | |
| tree | 4e5bff0c166142bcd0f1841a3ad6ff14bcd1c260 /create_firebird_database.php | |
| parent | a285cd4a2b73315a874627faa9d28ddb538f26da (diff) | |
| download | install-516dfc95fcd3558e4dc205f2a2b87b44bf47c4a8.tar.gz install-516dfc95fcd3558e4dc205f2a2b87b44bf47c4a8.tar.bz2 install-516dfc95fcd3558e4dc205f2a2b87b44bf47c4a8.zip | |
It does help if you stage changes from the right machine. This is the rework of the installer for namespace and php8.4
Diffstat (limited to 'create_firebird_database.php')
| -rwxr-xr-x[-rw-r--r--] | create_firebird_database.php | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/create_firebird_database.php b/create_firebird_database.php index 7a98240..fe7e91a 100644..100755 --- a/create_firebird_database.php +++ b/create_firebird_database.php @@ -29,26 +29,20 @@ // if ($s_create_charset != 'NONE') { // NONE is the default character set -// $sql .= ' DEFAULT CHARACTER SET '.$s_create_charset; + $sql .= ' DEFAULT CHARACTER SET UTF8'; // } $sql .= ';'; $sql = str_replace("\r\n", "\n", $sql); $sql .= "\n"; - if( isset($_ENV["TMP"])) { - $tmp_name = $_ENV["TMP"].'/'.uniqid('').'.sql'; - } else { - $tmp_name = '/tmp/'.uniqid('').'.sql'; - } + $tmp_name = ( isset( $_SERVER["TMP"] ) ) ? $_SERVER["TMP"] . '/' . uniqid( '' ) . '.sql' : '/tmp/' . uniqid( '' ) . '.sql'; - if ($fp = fopen ($tmp_name, 'a')) { + if ($fp = fopen ($tmp_name, 'a+')) { fwrite($fp, $sql); fclose($fp); } - $command = sprintf('"%s" -i %s', $fbpath, $tmp_name ); + $command = sprintf('"%s" -u $user -p $pass -i %s', $fbpath, $tmp_name ); $result = exec($command); - } - -?>
\ No newline at end of file + }
\ No newline at end of file |
