Java zip, miracles do happen

From June 1999 we were waiting…
See http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4244499 to process zips from inside Java.

Note: quote ‘Miracles happen’ is from Martin Hilpert

And finally, unzippin’ bizarre character filenames in java se7, jdk7, jee1.7 or do we call it just java7 , is there.

Oracle owns Java now (well, Sun before) and runs a JVM inside, unfortunately I don’t think this bugfix will be available within the Oracle database JVM soon (or at all). More on that later!

php upload_max_filesize when uploading images

After installing a new server, I got the upload_max_filesize message from WordPress (from php) after I tried to upload a large image file:

Of course I forgot to edit the /etc/php5/apache2/php.ini file at line 877:

; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize = 2M

Just 2Mb is not much… Can be altered though!

VNC on openSUSE 11 was 10.3

As some other colleagues, I ran into some trouble upgrading from openSuse 10.3 to openSuse 11 when using VNC.

My server is located in a data-center, so I usually use ssh to logon. In rare occasions I want to graphically take control (when it’s time for a new kernel). And from openSuse 11 this isn’t that simple anymore.

Lot’s of Google hits on this problem, but it depends on your configuration. I’ve got 2. First:
-edit /etc/xinetd.d/vnc and set depth to 32 bits
-remove any IPv6 reference in your /etc/hosts file

But I know for sure that I’ve accomplished something else when I created my first openSuse 11 (vmware) installation way-back in 2009. I’ve forgotten how I’ve managed that one, but it still has its IPv6 references. So, I’ll get back on that one!

For now, my new (fallback) host is configured for remote access. I’ll get back in touch when I’ve discovered the other solution.

Print stylesheet for zoom

While Opera, Firefox and Safari print html pages very nice and have shrink to fit features, IE often seems to corrupt the margins.

A reminder to myself, use in header part:

<style type="text/css" media="print">
  body { zoom: .65; }
</style>

The zoom property is only used by IE.

APEX Runtime only

If you have an Apex export from your development environment to install into your production environment, you might run into troubles when your production is Apex runtime only.

For an import to be successful, it is required to have a workspace. Create it using the following:

set serveroutput on size 1000000
set feedback off
-- This script can be run in sqlplus as the owner of the Oracle Apex owner.
begin
  wwv_flow_api.set_security_group_id(p_security_group_id=>1046129509285998);
end;
/
----------------
-- W O R K S P A C E
-- Creating a workspace will not create database schemas or objects.
-- This API will cause only meta data inserts.
prompt  Creating workspace ABC...
begin
wwv_flow_fnd_user_api.create_company (
  p_id                      => 1046207189286079,
  p_provisioning_company_id => 1046129509285998,
  p_short_name              => 'ABC',
  p_first_schema_provisioned=> 'ABC',
  p_company_schemas         => 'ABC',
  p_expire_fnd_user_accounts=> '',
  p_account_lifetime_days=> '',
  p_fnd_user_max_login_failures=> '');
end;
/

Now, note the security group id / provisioning company id. Check your export file(s) from your development environment and before importing into production change the identifier in the export file(s).

Once this is done it is safe to import the application using only an SQL prompt.

In this example, in production a workspace ABC is created identified by nr. 1046129509285998 and has corresponding database schema ABC, which is not required but more clear.