View Full Version : Moving from PC installation to the Web
pigasus
5th of May 2002 (Sun), 08:40
Hi Pekka,
I now have EE truly up and running on my PC (and I'm one happy bunny). Soon (probably after your next upgrade version) I will be setting up my gallery on a web site. I have some questions about transferring my data from PC to web site.
Is this correct? I will upload all the files in my gallery directory (with all my data), including the setup file, to the web server and then run setup. Then all I should have to do is reset the paths for my thumbs and microthumbs. At this point I'll have the same gallery on the web as on my PC.
Once my web site is going, I'd like to update my data locally, on my PC, and then upload the modified files to the web server. This way I effectively have a duplicate of all the web data on my PC. This seems remarkably straightforward. Is it really this simple or am I missing something? And if it does work this way, would it be sensible to remove the input folder from the web site?
When I set up my second EE exhibition on my PC, I created a new set of folders to hold the photos, microthumbs and thumbs. They are all on the gallery root. In your notes on installation you said:
"also, when you create your own microthumb and thumb folders you must chmod them to 0777 - also their parent folders if they are not on gallery root."
Do you mean that I'll _always_ need to chmod to 0777 the microthumb/thumb folders or only if they are not on gallery root?
And one last question. I'm cleaning up my folders and removing any unnecessary ones. What is the purpose of the folders /gallery/thumb and /gallery/microthumb? Can I remove them? Are there any other folders/files (in addtion to those relating to your photos) which I don't really need to keep?
Thanks,
pigasus
Pekka
5th of May 2002 (Sun), 14:08
pigasus wrote:
Hi Pekka,
I now have EE truly up and running on my PC (and I'm one happy bunny). Soon (probably after your next upgrade version) I will be setting up my gallery on a web site. I have some questions about transferring my data from PC to web site.
Is this correct? I will upload all the files in my gallery directory (with all my data), including the setup file, to the web server and then run setup. Then all I should have to do is reset the paths for my thumbs and microthumbs. At this point I'll have the same gallery on the web as on my PC.
Once my web site is going, I'd like to update my data locally, on my PC, and then upload the modified files to the web server. This way I effectively have a duplicate of all the web data on my PC. This seems remarkably straightforward. Is it really this simple or am I missing something? And if it does work this way, would it be sensible to remove the input folder from the web site?
Hi,
Well, at that stage you'll have just EE installed. Keeping mirrors is not so straightforward, until I write an utility for it. Here's a long reply, please take some time to read and understand it:
I want to mirror EE between two servers, how is that done?
Let's say we have "Server 1" which is localhost, and "Server 2" which is the online www server.
1. Get phpMyAdmin utiltity from http://phpwizard.net/projects/phpMyAdmin/ and install it on both machines.
2. "Server 1": Launch phpMyAdmin and use its dump feature to save a dump of the database.
3. "Server 2" Launch phpMyAdmin and use its dump feature to load a dump of the database.
4. Keep folder structure and their contents identical with any ftp program.
5. Always do a FULL dump, see settings: http://photography-on-the.net/ee/support/dump.gif
Now you ask, what about counter values? They will reset in full dump won't they? What if I edited Server 2 exhibitions, the edits are gone, aren't they?
If you do editing in Server 1 and then need to preserve Server 2's counters and comments on mirroring, it gets much more complicated. You'll have to understand how the database works to really cope that properly.
This workflow is possible: when you add or delete ANY items (photos, camera, lights, workflows, defaults, users...), add them on Server 2, then dump ALL tables to Server 1 to detailed editing and then dump the edited stuff without ee_counter and ee_exhibition_feedback back to Server 2. So, if you don't delete or create ANYTHING on Server 1 (just edit data) you're fine.
But I would not recommend dumping anything but full dumps without good knowledge of what you're doing.
So, the mirroring rule should be: Do ALL edits on one server only and dump only full dumps on others.
Why? Here's one example of many:
Counters are stored per photo, and linked to specific photo id's. This means that to keep counter values intact on "live" server (Server 2) you normally would avoid dumping the ee_counter table from Server 1 to Server 2 because all counters would be 'reset'. If you obey the "rule", it's fine, but if not you have there one very serious pitfall: if ee_counter's photo_id's don't match with ee_photo's counter_id's you'll have a non-functional database and it will render EE useless (i.e. no listings are possible because search query conditions fail). You can easily come to this situation if you dump a database from Server 1 without ee_counter to Server 2, and you have created some new photos in Server 1.
Other example: "ee_exhibition_feedback" is the comment table in the database. If you need to preserve feedbacks in Server 2, you could leave that out from dump. But, one day you change the names of exhibitions, and exhibition id 1 comes id 2 and id 2 comes id 1. Now, all comments for 1 go for 2 and 2 go for 1. You'd need to edit the database by hand to resolve this.
Same kind of mismatches can easily happen on any data unit on EE, all is very tightly id-based and mismatches between id's will manifest as SQL error + PHP error and unviewable pages. If a certain lens_id is missing, no images are shown which need that certain lens_id. EE prevents any mismatches to happen internally, but dumping of partial database data can not be controlled by it at all. EE shows full power of well-normalized relative database structure, but this also makes it react very strongly to database errors.
I intend to write a "intelligent dump utility", and "photo export/import utility", but they're not on my main priority list.
When I set up my second EE exhibition on my PC, I created a new set of folders to hold the photos, microthumbs and thumbs. They are all on the gallery root. In your notes on installation you said:
"also, when you create your own microthumb and thumb folders you must chmod them to 0777 - also their parent folders if they are not on gallery root."
Do you mean that I'll _always_ need to chmod to 0777 the microthumb/thumb folders or only if they are not on gallery root?
You'll need to check that all thumb folders and files in there are writeable. How this behaves, I think this depends on system configuration.
And one last question. I'm cleaning up my folders and removing any unnecessary ones. What is the purpose of the folders /gallery/thumb and /gallery/microthumb? Can I remove them? Are there any other folders/files (in addtion to those relating to your photos) which I don't really need to keep?
They are there for example. If you don't use them zap them.
pigasus
5th of May 2002 (Sun), 14:53
Wow,
I'll have to get my friend the database expert involved again, I see. Thanks for the fulsome answer. I'm sure he'll understand it all. I knew it couldn't be that easy.
Pekka wrote:
Well, at that stage you'll have just EE installed.
Are you saying that at this point, at least, I'll have two identical sites? In other words, the initial installation to the web site will put up all the data I now have created (in the same way as the package I downloaded from you installed with your example data)? That at least would be a small blessing. I guess in the short run I'll settle for a working web site and do backups.
Any idea when your next version of EE, with the PHP amendments, will be out?
Again, thanks for being there!
pigasus
Pekka
5th of May 2002 (Sun), 17:13
pigasus wrote:
Wow,
I'll have to get my friend the database expert involved again, I see. Thanks for the fulsome answer. I'm sure he'll understand it all. I knew it couldn't be that easy.
Pekka wrote:
Well, at that stage you'll have just EE installed.
Are you saying that at this point, at least, I'll have two identical sites? In other words, the initial installation to the web site will put up all the data I now have created (in the same way as the package I downloaded from you installed with your example data)? That at least would be a small blessing. I guess in the short run I'll settle for a working web site and do backups.
After you have installed EE by instructions you have - eh- installed EE. If you have one at home and have done something into it, do the full dump procedure I outlined - after that you have two indentical EE's.
Any idea when your next version of EE, with the PHP amendments, will be out?
I have now made it work with PHP safe mode "on" and RegisterGlobals "off" and there's still some testing and some added features to do. It has to be tested more thoroughly than just and update, as all variable handling code and variable passing code from froms and between pages is rewritten.
I'd say two-three days if all goes well.
Pekka
pigasus
6th of May 2002 (Mon), 08:29
Ah, now I see. I didn't realise how the database data was getting installed via running setup.php. You included various data dumps in it. Penny drops.
Thanks,
pigasus
vBulletin® v3.6.12, Copyright ©2000-2009, Jelsoft Enterprises Ltd.