How to run multiple sc website deployments together properly

The problem:
Suppose I want a dev (for development) and a prd (for production) environment on the same server, yet in a different directory.
Assume I am using apache (in my case Uniform server) on windows (for linux the solution is similar).
Then I have c:\uniform\www as my root dir with prd and dev as subdirs.
If you have the two environments together you can have a serious, the scenario:
I login on dev and then change the url to one with prd in it. That basically means that anyone can simply get into the other enronment.
This is of course not preferred. Another issue is that you can not login to dev AND prd on the same browser (different browser tab) and work on both
together. So there is a simple solution for this. scriptcase allows its own session management via databases and so on. But that is basically more work then the
solution below.

Scriptcase uses session_start to start a php session. Standard in php the session is stored in the PHPSESSID cookie. So what if I can store the info in a cookie
that depends on the path?
Well that seems quite possible. The solution to this is in the .htaccess files.
I add to c:\uniform\www\prd the following .htaccess file:
php_value “PRDSESSID”

and in c:\uniform\wwwdev the following .htaccess file:
php_value “DEVSESSID”

For this to work the root path c:/uniserver/www normally contains:
<Directory “c:/UniServer/www”>
# Possible values for the Options directive are “None”, “All”,
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
# Note that “MultiViews” must be named explicitly — “Options All”
# doesn’t give it to you.
# The Options directive is both complicated and important. Please see
# for more information.
#Options Indexes FollowSymLinks
Options Indexes Includes

# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
#   Options FileInfo AuthConfig Limit
AllowOverride All

# Controls who can get stuff from this server.
Require all granted


So for uniform this already works :slight_smile:
For some others you may need to explicitly set: AllowOverride All and Require all granted
If these are missing then you need to add them.
For more details look at:

That is basically it…

Thanks for sharing the link and your tips

Your SC 7.1 IDE works with UniformServer? What about the zend runtime?

No Reinhard, our development still runs on the Scriptcase Apache. This is about our hosting of our DTAP environtment on the same server. We develop an application on SC then deploy it to the T environment, test it than we move it to the acceptance environment to let the end-user test it. But all is running on the same server.

I also thought what I do wrong … :wink: