Archive for the ‘Apex’ Category.

You don’t have permission to access /rpts/apex on this server.

Hi.
I had a problem with expired passwords. We are using APEX 2.2.0 with Oracle 10g. This morning the APEX_PUBLIC_USER accounts passwords expired.
When the passwords expired Now we are unable to access our application.
We get the following error message:

Forbidden
You don’t have permission to access /pls/apex/f on this server.

Solution:
1) You must to change password for user APEX_PUBLIC_USER in database.
ALTER USER APEX_PUBLIC_USER IDENTIFIED BY password;

Refer to the section on setting up a HTTP Server for APEX. Depending on your setup there will be a file that contains the DAD entry for APEX and includes a line for the apex_public_user_password that should have the old password and can be changed to the new password.

In the dads file:

<Location /pls/apex>
Order deny,allow
PlsqlDocumentPath docs
AllowOverride None
PlsqlDocumentProcedure wwv_flow_file_mgr.process_download
PlsqlDatabaseConnectString localhost:1521:orcl SIDFormat
PlsqlNLSLanguage AMERICAN_AMERICA.AL32UTF8
PlsqlAuthenticationMode Basic
SetHandler pls_handler
PlsqlDocumentTablename wwv_flow_file_objects$
PlsqlDatabaseUsername APEX_PUBLIC_USER
PlsqlDefaultPage apex
PlsqlDatabasePassword “password
Allow from all
</Location>

Regards,
Tom

How to use DBMS_LDAP package on Oracle

1) create wallet by Oeacle Wallet manager ( owm )
2) import certificate from certification authority
3) and there is part from example script from oracle

– Please customize the following variables as needed
ldap_host  := ‘<hostname>‘ ;
ldap_port  := ‘<port>‘;
ldap_user  := ‘uid=<user>,ou=<people>,dc=<company>,dc=com‘;
ldap_passwd:= ‘12345′;

– end of customizable settings

DBMS_OUTPUT.PUT(’DBMS_LDAP Search Example ‘);
DBMS_OUTPUT.PUT_LINE(’to directory .. ‘);
DBMS_OUTPUT.PUT_LINE(RPAD(’LDAP Host ‘,25,’ ‘) || ‘: ‘ || ldap_host);
DBMS_OUTPUT.PUT_LINE(RPAD(’LDAP Port ‘,25,’ ‘) || ‘: ‘ || ldap_port);

– Choosing exceptions to be raised by DBMS_LDAP library.
DBMS_LDAP.USE_EXCEPTION := TRUE;

my_session := DBMS_LDAP.init(ldap_host,ldap_port);

DBMS_OUTPUT.PUT_LINE (RPAD(’Ldap session ‘,25,’ ‘)  || ‘: ‘ ||
RAWTOHEX(SUBSTR(my_session,1,8)) ||
‘(returned from init)’);

– Establish SSL connection to the directory
retval := DBMS_LDAP.open_ssl(my_session,
‘file:<path to wallet directory>‘,
<wallet password>‘,
2); — NO_AUTH     : 1
– ONE_WAY_AUTH: 2
– TWO_WAY_AUTH: 3

DBMS_OUTPUT.PUT_LINE(RPAD(’open_ssl Returns ‘,25,’ ‘) || ‘: ‘
|| TO_CHAR(retval));

– bind to the directory
retval := DBMS_LDAP.simple_bind_s(my_session,
ldap_user, ldap_passwd);

OUTPUT
======

SQL> @sslbind.sql
DBMS_LDAP Search Example to directory ..
LDAP Host                : myldap.server.cz
LDAP Port                : 636
Ldap session             : 01000000(returned from init)
open_ssl Returns         : 0
simple_bind_s Returns    : 0
unbind_res Returns       : 0
Directory operation Successful .. exiting

PL/SQL procedure successfully completed.

You can get following error:

Error Message : ORA-31202: DBMS_LDAP: LDAP client/server error: UnKnown Error

Solution:
Check path, password and wallet name
path should ended by directory where is wallet saved
wallet name must be ewallet.p12

Regards,

Tom

Configure Apex at Middle Tier (Application Server)

0. APEX in installed and running on database tier
How to install APEX
1.Unlock APEX_PUBLIC_USER Account & change password
- Connect to db as sys user
- alter user apex_public_user account unlock;
- alter user apex_public_user identified by NEW_PASSWORD;

2. Configure HTTP Server
2.0: Install Oracle HTTP Server ( OHS_SERVER )
Oracle HTTP Server (Apache 2.0) (10.1.3.3.0) for Linux x86

The following information is available in:
/opt/ohs/10133/install/setupinfo.txt
—————————————–
Use the following URL to access the Oracle HTTP Server and the Welcome Page:
http://apex.myweb.cz:7777

2.1: Copy APEX Images
- Copy images from database tier to middle tier
tar cvf images.tar images/
unpack on new server

2.2: Adding DAD entry to connect to APEX
Alias /i/ “/opt/ohs/10133/ohs/images/”
AddType text/xml xbl
AddType text/x-component htc

<Location /pls/apex>
Order deny,allow
PlsqlDocumentPath docs
AllowOverride None
PlsqlDocumentProcedure wwv_flow_file_mgr.process_download
PlsqlDatabaseConnectString hostname.domainname:db_port:SID ServiceNameFormat
PlsqlNLSLanguage AMERICAN_AMERICA.AL32UTF8
PlsqlAuthenticationMode Basic
SetHandler pls_handler
PlsqlDocumentTablename wwv_flow_file_objects$
PlsqlDatabaseUsername APEX_PUBLIC_USER
PlsqlDefaultPage apex
PlsqlDatabasePassword APEX_PUBLIC_USER_PASSWORD
#PlsqlRequestValidationFunction wwv_flow_epg_include_modules.authorize
Allow from all
</Location>

Make sure these values are properly set before saving this file.

- IMAGE_LOC Value
- hostname:port:SID => eg: localhost:1521:ORCL
- APEX_PASSWORD => eg: password_you_had_selected_on_step_1

3: Start HTTP Server

/opt/ohs/10133/opmn/bin/opmnctl startproc ias-component=HTTP_Server

4: Access the admin page of APEX

http://hostname:port/pls/apex/apex_admin
http://apex.myweb.cz:7777/pls/apex

Regards,

Tom

TOPlist