Cloning dolphin

I'm looking for a way to work on a 'test' dolphin without affected the 'production' one. My first idea was to install a private git repository in order to distribute the code among my team. Done. But I faced an unexpected issue, while I'm trying to make the sources codes working on a local server. Indeed, I tried with a Mamp at the beginning, but it has been impossible to get a result. Then I installed a full AMP (apache mysql php) by hand on my machine (mac/maverick) but its not working as well. I came to think that the systems was too different and tried an installation on a CentOs server that I have setup at home. Same thing, nothing happen even after having a cautious look on every configuration files, like http.conf, php.ini, header.inc.php

Practically, my browser tell me he can't connect to the new site.

I'm very in a trouble with that because I need a solution to continue to work on the features of the platform without have an impact to the production one. Moreover, I manage a team of developers which give time to help us and I'm afraid they will just be stuck by the difficulty to work on our project.

So, my new idea is to clone the CentOs server which host our current platform and replace my actual centOs by this one. Ideally I would like to have a disk image which I can distribute to my team, what will make easy for them to copy it on a virtual machine with all the git-stuff installed.

I'm quite in a rush and I have to find a solution very fast, but I would like to have your opinion on this idea. I would like to know if someone does not have an easier, lighter and quicker solution to achieve my goal. And, in the case of you think it's a good solution, maybe some of you have experience with the kind of clonage. Then I'm looking for advice on the soft I may use (r-sync, tar, cp...) and process I should follow. 

version of dolphin : 7.0.9

linux version : CentOS release 6.3

apache : 2.2.15

php : 5.3.3

mysql : 5.1.69

Quote · 2 Nov 2013

If you have a live production site running on a server, then just put your test site on that server.  You copy all the site files, and the database.  Then use either another domain name or a subdomain of your production site, such as test.mysite.com.  You edit the header.inc.php file to have Dolphin use the subdomain and the new Dolphin test root.

In apache you would create a new vhost.  You set the root of that vhost to the path of your test site.  Oh, no need to clone the OS, the same server will serve more than one site.

Let's say you have a path such as var/www/public_html; instead of using public_html as the root of the website, you use it to hold each public website; you have var/www/public_html/site_one, and var/www/public_html/site_two and so on while site_one would be a name you recognise for each site.

The first vhost will have the site root as /var/www/public_html/site_one

The second vhost will have the site root as /var/www/public_html/site_two

When you type test.mysite.com Apache knows to go to /var/www/public_html/site_two and you set Dolphin up to know that is the path to the site.  You clone the database by making a new database, test_site and you import all the tables and data into that database and set Dolphin to use it in header.inc.php.

Geeks, making the world a better place
Quote · 2 Nov 2013

why not just create a sub folder on the live server   /demo  or something and copy the site over to that folder and work from there ?

https://dolphin-techs.com - Skype: Dolphin Techs
Quote · 2 Nov 2013

thx for your answer geek girl, dolphin jay! that what I would have done if I did not have encounter several bugs using two platforms side by side. Due to some incompatibilities between third part modules, I assume, very strange bugs appears and I fear that is not playable to have a 'very experimental site' close to the production site. http://www.boonex.com/forums/#topic/White-square-on-the-bottom-of-the-page.htm 

As a very small team, working on our project night and week-end and for the most of us, absolutely beginners in development area, we make errors and bad codes sometimes - often (even if we improve ourselves day by day). I said that to underline the 'very experimental platform' concept ;)

then, I was speaking with one developer I work with sometimes (a real developer) and he suggests the git option, which is pretty cool actually : I love the idea to be able to follow in real time every modification introduced on the code and to 'push' new commit, as they are validated, into the production site by typing one command...

I took a break on my work to concentrate on my dolphin site company during several days, but I'll going back to work very soon and I need to ensure that the system won't break for no reason, as it does currently with two platform installed side by side.

Your solution sounds still cool because it's easy to setup. If I have no choice (by example no the skill required to make such a clone I talking about - virtual clone I mean), I will definitely choose this way. But it's my hope to find a way to install right now a 'scalable' organisation of developers, to let everyone work as he wants without compromising the stability of the production.

that's why I have exposed the idea to distribute the code and invite all developers to work locally, on their own and push functionalities when ready to go. But I literally broke my nose on the duplication of dolphin within a local web server. I'm still searching why...

Quote · 2 Nov 2013

The problem most likely is differences between source and destination servers. There are certain permissions that need to be setup during dolphins install process.

On some servers such as those running FastCGI or SuPHP. The permissions are normally 755 for folders and 644 for files. Thats all files and folders. So installing dolphin on one of those is a piece of cake because your normally do not have to set any permissions except for ffmpeg. Installing on a server running in apache mode on the other hand is not as easy because all the permissions need to be set.

Servers that are running php as an apache module need the proper permissions as per the detailed install doc. http://www.boonex.com/trac/dolphin/wiki/DetailedInstall

Also the path and url need to be setup in inc/header.inc.php and the proper database information. If no domain name is available, then the ip address can be used in the url instead.

Also when Copying a site you do not, i repeat, do not copy the contents of the cache, cache_public and tmp folders. Those folders need to be empty with the exception of the .htaccess file they contain on the destination server.

Also. You could run into file ownership problems as well. So copying a site that has user content uploaded will be a problem if the destination server is running php as an apache module. That is because under that mode of operation, uploaded files such as photos, avatars, ect are owned by the apache server, but when you copy them, they are then owned by the user account that copied them, so when a user attempts to delete a photo for example, it will fail due to permissions.

So it can be easy to clone a site if both source and destination are the same and are running FastCGI and/or suPHP. But can be very difficult if the servers are different and one of them, especially the destination is running php as an apache module instead of FastCGI.

So using GIT or as i prefer SVN will not be as easy as you would have hoped. If that's your plan, then all sites running it will need to be setup the same, same user account id's so the ownership matches, and also the same php mode. FastCGI will be the easiest to deal with under those circumstances.

NOTE: CentOS out of the box default installs run php as an apache module in case you did not know.

https://www.deanbassett.com
Quote · 2 Nov 2013

That exactly what I came to think Daeno

Here is a detail of my recent road. To duplicate dolphin, I

1) copied the whole site into a folder on the server. I made this folder a GIT one

2) made a GIT folder on my computer. Inside I cloned the site sources

3) made a Mamp, I copied the files located in my local GIT repo and pasted into the Mamp directory

4) suppressed the content of cache and cache_public (and omit .htaccess) -- I forgot tmp tough

5) copied the original database, made a new one and a new user and import everything

6) edited inc/header.inc.php at different lines (url, root directory, database name, username and passwd)

7) verified that the .htaccess embed in my GIT repo led to index.php

8) launched my browser and got an error

9) I tried to put a page index.html at the root of dolphin and discover that

  • to let 'localhost' in url leads to a 'not found' msg
  • put 'localhost/index.php' lead to the same issue
  • put 'localhost/index.html' lead to the right html page

10) understood that I have to deal with php, apache modules, etc.

11) installed a full AMP (apache, mysql, php) in order to have total control

12) activated the Apache PHP module and configured php.ini

13) configured my root document, /etc/apache2/users/[me].conf and http.conf using

14) configured hosts file (at this time I was hopping to use the dolphin as a remote web serveur xD), reboot...

15) ...and had the same error on browser, namely 'not found'.

16) though that I had to minor the compatibility issues and decided to install dolphin in my CentOs server, which is very close to the centOS which work on the platform server

17) I configured everything properly and faced an error

18) copied httpd.conf and php.ini from the production platform server to my cent os for test

19) each time, the problem stays, namely 'not found' result - sometimes, /mysite/index.php is searching and searching again... firefox does not block it, but safari stops and says ''Could not open the page, too many redirects"...

21) I imagined to install a new dolphin and, then, replace every files by my own... but I face a permission issue : everything was in red in the installator first page... :/

22 I've considered the possibility to change every permission by hand... but I found this helpful tutorial http://www.boonex.com/trac/dolphin/wiki/DetailedInstall

23) but, a bit discouraged, I also have the idea to clone the whole server and make an image disk, in order as you say Daeno, to minimise "the differences between source and destination servers"...

and then I came to ask ;)

the point is it looks like a network problem ('not found' message) but it is not as index.html was accessible. It could be a redirection issue, but the htaccess has been preserved and apache file configured... I'm just lost...

 

 

Quote · 2 Nov 2013

At this time, I've no knowledge on what is FastCGI

I'm going to check

but the CentOS on which we have already a platform us php as an apache mod. So... 

Quote · 2 Nov 2013

I am not sure about some of the things Deano said as my site is running Nginx and I have cloned the site several times; however, Nginx does not own the site files, including member's content, PHP is running PHP-FPM; so no Nginx PHP mode thingy as with Apache.

I have not really cloned any sites under Apache but have set up several Dolphin sites on the same server without issue.

Geeks, making the world a better place
Quote · 2 Nov 2013

Could not open the page, too many redirects

That could indicate you do not have the url properly setup in inc/header.inc.php.

You also need to configure apache so it looks for index.php as the first index file.

So before copying dolphin over. Just put a index.php file in and make sure the browser loads it using just http://localhost or http://ip.address

Start basically by making sure the server is setup properly.

Have you done a fresh install on your home server to make sure dolphin runs on it and does not detect any problems?


https://www.deanbassett.com
Quote · 2 Nov 2013

@geek_girl : as I'm not on the way to find any solution, I will temporarily doing that. In fact, I think to install 3 dolphin sites : one for production, one for test and one for developpement. Goal is to minimize time where experimental versions are working together. My conception is : 

  • first, we develop new mod on development site
  • second, as the mod is finish, we deinstall it from development site and push it on test site (where others beta testing mod run together)
  • third, if everything goes well with the previous step, we push it on production

It would be quite heavy to manage, I assume, but at least it's a rational way to do the trick.

@daeno : that's a good way to process. I just tried it on the dolphin installed on my mac/maverick with a full AMP handed made. The index.php 'hello world' works, but the installation of dolphin fail on the last step, at http://innov24.local/install/index.php.

Just after 'Permission reversal', I click on skip (because letting inc writable is not an issue at this time) and I get... a white page. If I refresh, I'm beginning again to install... I remember now that it is NOT the first time I had this issue.

"You also need to configure apache so it looks for index.php as the first index file." --> this has been done.

"That could indicate you do not have the url properly setup in inc/header.inc.php." --> I tried many possibilities but, yes it could.

Quote · 3 Nov 2013
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.