PHP session timeout is 0, but session still expiring

I am running Apache 2.2 with the latest build of PHP and mysql.

In my PHP.ini file, I can see the session timeout is set to 0, meaning the session stays live until the browser closes.

I have noticed however, that sometimes when coming in in the morning, and leaving the browser open and logged in overnight, the session seems to have expired.

Are there any other configuration settings that would be causing the session to expire? I just want to play around with the values and see what kind of time works best for my site.

Many thanks

Eds

Redirect HTTP to HTTPS on default virtual host without ServerName

On my apache server I'd like to be able to redirect all incoming http requests to the equivalent https request. The catch is that I'd like to be able to do this for my default virtual host without specifying the ServerName and have the redirect work with whatever server name appeared in the request url. I'm hoping for something like this:

NameVirtualHost *:80
<VirtualHost *:80>
    RedirectPermanent / https://%{SERVER_NAME}/
    ...
</VirtualHost>

Is this possible using Redirect or will I have to resort to Rewrite?

From Matlab to the web

I have big project in Matlab with some pretty complicated GUI. I'd like to put it on my apache server. The idea is: people should've access to it without downloading anything (I mean something like Java applet or web app). I've managed to create a .jar file by using the deploytool but I'm not sure it's the right way. I've read mathworks tutorial, but in the example: http://www.mathworks.com/help/toolbox/javabuilder/ug/bsqrikz-26.html they're using some piece of JavaCode which I don't really know where they got it from. In the end I've created a .war file but the apache sees it only as an archive, not as an application, so clearly I did something wrong.

So, could someone tell what I have to do step-by-step to create a web application from my Matlab code, please?

Thx!

CGI Error – Permission denied

I have a perl webapp that works fine on the server but not on my local machine.

Apache logs show (among other errors):

Permission denied at /home/mywebapp/dev/www/index.cgi line 318.
End of script output before headers: index.cgi

Line 318 in index.cgi:

our @gr;
eval('require Groups;');
#close STDERR; <<<< commented
open STDERR, '>1' or die $!;  <<<< line 318

I'd appreciate any help. Thanks!