Share » Forums » Install & configuration » ezOracle issue --allow-root-user...

ezOracle issue --allow-root-user parameter doesn't work when running script

ezOracle issue --allow-root-user parameter doesn't work when running script

Monday 31 January 2011 11:27:56 pm - 5 replies

Author Message

Gaetano Giunta

Tuesday 01 February 2011 9:55:28 am

Looks like you hit a bug. Can you file it in issues.ez.no?

The first error comes from the shell script not passing to the php scripts it generates the '--allow-root-user' param, which has been added in recent versions of eZP.

The second error comes from the oracle user not having enough permissions on the directory where you installed eZP. To fix it you should:

- either run chown -R oracle:oracle . on the eZP directory (after running initialize.sh you can chown back to www-data)

- or run the shell script with a user account that has both enough permissions to create/delete files and the proper oracle variables set up in his environment

Hope it helps

Gaetano (for the record: the maintainer of ezoracle)

ps: which version of ezoracle are you using?

Principal Consultant International Business
Member of the Community Project Board

Gaetano Giunta

Tuesday 01 February 2011 10:24:22 am

ps: I added a check for anough fs permissions for creating temp files in the latest svn version at http://svn.projects.ez.no/ezoracle/trunk/extension/ezoracle/bin/shell/ora-initialize.sh.

Can you please test?

Principal Consultant International Business
Member of the Community Project Board

Ash P

Tuesday 01 February 2011 6:02:19 pm

Thanks for your help Gaetano. So running the script (SVN) as user oracle, after chown -R on EZPUB directory I get:

$ ./ora-initialize.sh
Testing PHP [ Success ]
Testing Oracle installation
tnsnames.ora file: [ Success ]
The file tnsnames.ora has been found in /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin
LD_LIBRARY_PATH environment variable: [ Success ]
The environment variable $LD_LIBRARY_PATH is set to:
/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib
If you are using an Oracle Instant Client install, make sure that
the environment variable LD_LIBRARY_PATH includes the directory
where the instant client has been installed
Testing PHPs Oracle support [ Success ]
Looking for eZ Publish installation [ Failure ]
No eZ Publish directory found
Please enter full eZ Publish path: /var/www/htdocs
Checking eZ Publish installation [ Success ]
Testing eZOracle extension [ Failure ]
eZOracle extension is present but not enabled

2 things here. First, the script didn't find the ez Pub path. It did in the original script. Second, I did attempt to enable the extension. The README states:

Enable the extension in eZ Publish. To do this edit site.ini.append(.php) in the folder root_of_ezpublish/settings/override. In the 4.3.0-full (also using exoracle version that comes with it) package there was no 'override' directory under settings/ so I created it and then placed the site.ini.. file in there.

# cat settings/override/site.ini.append.php
[ExtensionSettings]
ActiveExtensions[]=ezoracle

Then ran ezpgenerateautoloads.php as documented. I'll put in a bug report tonight.

Ash P

Tuesday 01 February 2011 9:44:19 pm

Issue #017904 has been created. Although based on the SVN script you may have already resolved it.

I'm not a very patient individual so I decided to give the Manual installation a try based on:

http://doc.ez.no/var/doc/storage/generated/database_extension_2_0.pdf -- I was able to successfully create the first 2 functions with (i.e.): sqlplus username/password@XE @extension/ezoracle/sql/{SQL file}

I'm at Creating a clean database and this is what I get:

# php bin/php/ezsqlinsertschema.php --allow-root-user --type=oracle --user=orc**** --password=pass*** share/db_schema.dba XE
With great power comes great responsibility.
You have 10 seconds to break the script (press Ctrl-C).
Could not initialize database:
* Tried database 'XE' locally with user 'orc*****' and with a password
* No database handler was found for 'oracle'

I found issue http://issues.ez.no/IssueView.php?Id=15109 and it shows a fix for this in 2.0.1 of the extension. I think I'm running 2.0.3 with eZP 4.3-full. The same error above occurs when using "--type=ezoracle".

So I read your suggestions here: http://projects.ez.no/ezoracle/forum/general/pb_using_script_ezsqlinsertschema_php_to_install_oracle_11g

I have (and I tried the generate with different modifications of this file - see above):

# cat settings/override/site.ini.append.php
<?php
[ExtensionSettings]
ActiveExtensions[]
ActiveExtensions[]=ezoracle
?>

# php ./bin/php/ezpgenerateautoloads.php
Scanning for PHP-files.
Scan complete. Found 266 PHP files.
Searching for classes (tokenizing).
Found 102 classes, added 102 of them to the autoload array.

# cat var/autoload/ezp_extension.php | grep -i oracle
'eZDBFileHandlerOracleBackend' => 'extension/ezoracle/clusterfilehandlers/dbbackends/oracle.php',
'eZDFSFileHandlerOracleBackend' => 'extension/ezoracle/clusterfilehandlers/dfsbackends/oracle.php',
'eZOracleDB' => 'extension/ezoracle/ezdb/dbms-drivers/ezoracledb.php',
'eZOracleSchema' => 'extension/ezoracle/ezdb/dbms-schema/ezoracleschema.php',
'ezoracleInfo' => 'extension/ezoracle/ezinfo.php',

I think all my problems stem from not having the extension enabled properly. What am I missing here?

Gaetano Giunta

Sunday 13 February 2011 6:48:49 am

The 1st installation method assumes that you have a working eZP installation before you try to migrate the database. To achieve that you have to run the setup wizard first. That will create the settings/override/site.ini.override.php file that you miss.

If this is not clear enough by reading the docs on http://doc.ez.no/Extensions/eZ-Publish-Extension-for-Oracle-R-database/2.0/Installation (point 1), please say so and we'll try to improve them.

As for the 2nd installation method ("manual"), I think I always tried it after having run the installation wizard anyway - the difference with the automatic method being mostly that the db is reinitialized and not migrated.

If I have time I might look into testing setup without going through the setup wizard, but since nobody ever does that for mysql, I think the best option would be to enable the setup wizard to run on oracle instead...

Principal Consultant International Business
Member of the Community Project Board

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu