|
|
|
Aw: Re: Installaton fails with oracle db [message #166563 is a reply to message #166495] |
Tue, 17 January 2012 11:20 |
|
ThomasF
Messages: 6 Registered: December 2011
Karma: 0
|
Junior Member |
|
|
i finally succeeded in getting the forum to run on an oracle database. I don't know, if i'm unique with my kind of problems, in case i'm not the following lines may be helpfull.
First of all my environment: I did this on a Solaris 10 machine, with PHP 5.2.17 (compiled against the oracle 11.2 instant-client) and Oracle 11gr2.
1) It might be a good idea to run install.php from commandline instead using the webbased installation. Don't forget to create an install.ini, because you'll have to restart install.php several times and it will be boring to type values for root-directories, etc. again and again.
2) The first time i ran into problems was the moment, the installation routine tries to import "seed data" in your database. The installation was aborted at
CREATE TABLE fud30_fl_3 (id INT);
with
ORA-00911 invalid character
The invalided character turned out as the suffixed ";" in the create-statement shown above. You can come arround this by deleting it before executing the statement, i.e. insert an appropriate "str_replace" as its shown in the following
if ($q) {
try {
$q = str_replace(';', '', $q);
q($q);
} catch (Exception $e) {
3) The next thing which happens is the "ORA-04098: Trigger"-error described in my first message. I'm not a database expert, and therefore i don't know for what these triggers are needed, but during the installation it seems that there were created 3-4 invalid ones. The good news are, that you (for me, my colleague the database-expert can repair the triggers manually (and also build the corresponding sequences). The bad news are, that the triggers will be destroyed again, once you'll restart the installation routine.
The only workarround i've found for this was to add some kind of read-statment before the "import seed-data"-block, i.e.
$handle = fopen("php://stdin","r");
echo "Press Return to continue...\n";
$name = fgets($handle, 255);
/* Import seed data. */
to stop the installation-routine, repair all defect triggers, create all missing sequences and continue with the installation afterwards.
4) Don't quail - there is already light at the end of the tunnel The last thing to solve is
ORA-01400: cannot insert NULL
while the installation attempts to add the 3 webcrawlers Google, Yahoo and Bing. The error is thrown at
$uid = db_li('INSERT INTO '. (...)'\')', $ef, 1);
and i assume $ef contains the irritating NULL, but at last i didn't find out which table i could reconfigure, allowing NULL-values to be inserted.
While, inside our forum, we don't allow anonymous-actions and self-registration only against a central LDAP-directory, i decided to comment the whole block out, living my future forum-live without webcrawlers.
Having done this, the installation finished without further interrupts, and up to now the forum works fine for me. Nevertheless you should note the following post-install-notes:
- If you want so send e-mails by forum-functions, you'll have to fix the following inside email.php.t: Replace
if (!($email = q_singleval('SELECT email FROM {SQL_TABLE_PREFIX}users WHERE alias='. _esc(htmlspecialchars($_
POST['tx_name'])) .' AND (users_opt & 16) > 0')))
by
if (!($email = q_singleval('SELECT email FROM {SQL_TABLE_PREFIX}users WHERE alias='. _esc(htmlspecialchars($_PO
ST['tx_name'])) .' AND bitAND(users_opt, 16) > 0')))
while Oracle denies the '&' for bit-shifting, using the function 'bitAND' instead. Don't forget to rebuild your themes afterwards.
- In case you want umlauts in the names and descriptions of your forums, make sure to set correct values for NLS_LANG and LANG in your Apache environment.
Have fun - Thomas
[Updated on: Tue, 17 January 2012 11:21] Report message to a moderator
|
|
|
|