Jump to content
The Uniform Server Community

Definition of "portable"


toddz
 Share

Recommended Posts

Current XAMPP user here, looking for a production-class alternative. Uniform Server looks like it would fit the bill.

 

By "portable", am I to understand that I can install Uniform Server and develop a whole LAMP CMS-based website, or multiple sites, on an offline development machine, then simply copy the whole caboodle to a production server? No reinstallation, no recreating MySQL databases, no repopulating data, etc.?

 

This would be really swell but it's hard to believe it would actually be that simple...

Link to comment
Share on other sites

No No No... lol, i know right. hmm... an idea, but gonna be hard to do... dont even think its possible.... By portable, we mean you can move the server around and it will work. Unlike XAMPP, you can move it from folder to folder, computer to computer and it will still work! :lol:

Link to comment
Share on other sites

This is one of those interesting problems; UniServer is portable however application that run on it may not lend them selves to this.

 

For example when installing such an application on a production server you need to provide specific information such as a fully qualified domain name, location and access information for a database server there may be other specific information.

 

Net result, installation is unique to that domain, transfer this application onto your development server and it falls apart. Remember the domain name is now “local” as is the database server. The original installation may be accessing a database located the other side of the world certainly a different password and account name will have been used. That all sounds bleak and it is, especially if the database stores absolute path information (domain specific).

 

If you are confident that the database does not contain absolute path information then a potential solution is possible. It revolves around configuration files, normally two one for admin and one for general set-up (these are easy to find because you are asked to change the write permissions on these files) with these located it is just matter of configuration switching.

 

I have used this technique on a program named Zen Cart running on a service provider’s machine with development on UniServer. That said the ideal is to have both development and production servers identical with the advantage you can do a straight dump or partial dump of the entire data base information.

 

The following steps are involved:

 

Step 1: Follow the installation instructions for the application and install on the production server.

 

Locate and save the configuration files. Copy and name them remote_config_1.php and remote_config_2.php

 

Note: Their location.

 

Step 2: Repeat the above however perform the installation on your development servers. Again locate the configuration files copy and name them local_config_1.php and local_config_2.php

 

Step 3: On the local machine copy the files to their appropriate folders so each location will now contain three configuration files:

 

config.php

remote_config_1.php

local_config_1.php

 

OK config.php and local_config_1.php are identical the next step reveals why

 

Step 4: Write two batch files local.bat and remote.bat put these with the UniServer batch files.

 

a) local.bat -- outline what it performs

 

delete config.php

make a copy of local_config_1.php

rename copy_local_config_1.php to local_config.php

 

:lol: remote.bat ---- outline what it performs

 

delete config.php

make a copy of remote_config_1.php

rename copy_remote_config_1.php to config.php

 

Step 5: That completes the configuration all that remains is to use them:

 

Development: Run the local batch file and well do your development.

 

Deployment: Before you upload or dump the servers run the remote batch file first.

 

To continue with develop run the local batch file again.

 

That’s the general technique I knows this works for ZenCart it may work for other applications the only way to find out is to try it.

 

Have fun

:D

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...