HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Moving from SubFolder to Root of Domain

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#38891 (In Topic #8730)

Non-joined user

How easily can one move it?

Hi,

Have installed as a test on a subfolder called "oc". It seems to be working OK so now I would like to stick it as the main domain, ie

mydomain.index.php, rather than mydomain/oc/index.php

From what I can see under 'configuration' it does look like it is possible to just alter some settings and do this automatically?

Is that correct or will it mess things up completely? Do I need to reinstall on the root, can I just copy all the files to the root or better still, can I just edit that root configuration thing, click save and find the site on the root of the domain?

I'd hate to spend ages transferring files if I can do this with a few settings but don't want to mess the thing up either!



Keyword
Back to the top
 
Posted
Rating:
#38892

Non-joined user

Well I tried changing that 'base url' setting and it messed the site up completely.

Back to the top
 
Posted
Rating:
#38893

Non-joined user

OK, if I just download the site into a folder, change, upload it to my root directory and if, presuming I can still get to it, I can change the base url setting, would that work?

The tutorial says to not install it on the new server and gives note of potential permission issues on different servers but this is the same server and user. I just want to move it from a folder to the root.

Would that work or do I need to reinstall and start again?


K.
Back to the top
 
Posted
Rating:
#38895

Non-joined user

The volume of answers is overpowering! One at a time please.


K.
Back to the top
 
Posted
Rating:
#38897

Non-joined user

Great, I tried reinstalling it and now it has totally screwed up. I have a huge error message at the top of the screen saying it cannot find sources/global.php - despite the fact that via ftp I can look straight at that file, between galleries2.php and global2.php?

deja vu
Back to the top
 
Posted
Rating:
#38898

Non-joined user

Oh, and I try to back-track and it says the installer is locked.

Nice.

Back to the top
 
Posted
Rating:
#38899

Non-joined user

$b)?$a:$b); } if (!file_exists($FILE_BASE.'/sources/global.php')) { $a=strrpos($FILE_BASE,'/'); $b=strrpos($FILE_BASE,'\'); $RELATIVE_PATH=substr($FILE_BASE,(($a>$b)?$a:$b)+1); $FILE_BASE=substr($FILE_BASE,0,($a>$b)?$a:$b); } else { $RELATIVE_PATH=''; } @chdir($FILE_BASE); global $NON_PAGE_SCRIPT; $NON_PAGE_SCRIPT=1; global $FORCE_INVISIBLE_GUEST; $FORCE_INVISIBLE_GUEST=0; if (!file_exists($FILE_BASE.'/sources/global.php')) exit('
ocPortal startup error
The second most basic ocPortal startup file, sources/global.php, could not be located. This is almost always due to an incomplete upload of the ocPortal system, so please check all files are uploaded correctly.

Once all ocPortal files are in place, ocPortal must actually be installed by running the installer. You must be seeing this message either because your system has become corrupt since installation, or because you have uploaded some but not all files from our manual installer package: the quick installer is easier, so you might consider using that instead.

ocProducts maintains full documentation for all procedures and tools, especially those for installation. These may be found on the ocPortal website. If you are unable to easily solve this problem, we may be contacted from our website and can help resolve it for you."


 O_o

Back to the top
 
Posted
Rating:
#38900

Non-joined user

Just tried re-uploading the data.ocp thing, reinstalled, exact same problem.

I perhaps it was a pre-existing .htaccess file but there isn't one.
Back to the top
 
Posted
Rating:
#38902

Non-joined user

Thanks for all the help and everything, no really, brings a tear to one's eye.
Back to the top
 
Posted
Rating:
#38904
Avatar

I will try and answer your questions. But please understand that you haven't given anyone else an incentive to answer your questions, or set an example by answering others - I can only answer stuff myself as a staff member during small periods of time outside my main full time job.

I do appreciate that you're having some difficulties here, but they are not ones that have been reported to us before so it will take some time for us to diagnose the problems, and we'll also need to have full and clear explanations of them and be given good time to respond. Most difficulties are server-specific, or a result of doing things in a way we perhaps didn't foresee, so we do rely on others to let us know what we need to change. If any bugs, usability or documentation problems become apparent in this topic we'll fix them. If you look at past topics in the forum you'll see that when given the opportunity I do go to great lengths to try and resolve all difficulties like this, so it's not like we just ignore them - the fact that any problems remain after this continual stabilisation process is just testament to the wide range of server configurations and usage patterns out there.

OK, if I just download the site into a folder, change, upload it to my root directory and if, presuming I can still get to it, I can change the base url setting, would that work?

You'd need to set your file/directory permissions again. The easiest way to do it is just to use FTP, or a web hosting file manager, to actually move the files directly on the hosting. Both these things can usually perform this function.

Well I tried changing that 'base url' setting and it messed the site up completely.

If you also cleared the caches using the force_upgrade script, this shouldn't be the case. But it's quite hard to help as I don't know the specifics of what went wrong (e.g. broken images, or PHP errors).

The tutorial says to not install it on the new server and gives note of potential permission issues on different servers but this is the same server and user. I just want to move it from a folder to the root.

I think it's likely what you're reading is talking about switching forums, not servers. Switching servers is fine, as long as file permissions are correctly set, info.php updated, and the caches cleared.

Great, I tried reinstalling it and now it has totally screwed up. I have a huge error message at the top of the screen saying it cannot find sources/global.php - despite the fact that via ftp I can look straight at that file, between galleries2.php and global2.php?

I've not seen an error like this before except when the file was actually missing, and after reviewing the code, the only causes I could see would be:
  • the file actually isn't there. FTP programs often cache file directory contents, so possibly what you were seeing was what was there but the file had gone. Or perhaps you were looking in an old directory (easy mistake to make). After looking at your next posts I can see that the file really must be there because the quick installer was used and hence there was no scope for human error.
  • the 'sources' directory somehow did not have view permissions for the web server, so ocPortal's startup scripts could not see it. 'sources/global.php' is the first file to load after the index script, so that makes a lot of sense.
  • as above, but PHP 'safe mode' is on the server, and the 'sources' directory is owned by the wrong user

Oh, and I try to back-track and it says the installer is locked.

The installer needs to lock after a website is installed for security reasons, however you can regain access by deleting the 'install_locked' file mentioned in the error message.

Just tried re-uploading the data.ocp thing, reinstalled, exact same problem.

If you open a support ticket with FTP access details I would be happy to diagnose the problem for you.
Please just be realistic though about the time it takes to work through this kind of thing - it might be about 3 days until I've had enough time to set aside to really analyse it. I can't exaggerate enough how difficult it is to write software that works as intended on all the different permutations of server software, software versions, configurations, operating systems, and even common bugs in server software - what you're experiencing is not incompetence or inertia on our part, it is an extreme complexity that is experienced by any organisation distributing PHP software - looking around at other software developer's website and you'll see such problems everywhere. We do resolve nearly all of the problems brought to us when we're given the time and access to do so.

I'd just like to stress that even if every person we helped registered (and only a small fraction do), the amount of revenue we make is only enough to fund one hour of support time. So the fact that we actually go out to resolve every problem brought to us is quite a statement of our willingness to improve the product and engage our users, even though it puts us 'in the red'. Expecting a same-day staff response to new problems is not something that can be realistically achieved, so please do be patient with us.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#38905

Non-joined user

I'm the impatient type

Sorry for being impatient but the site in question is an old and well-established site that has sat idle and stagnant for awhile. In a fit of enthusiasm I decided to give it a new lease of life via a forum and contacted my old mailing list and those of others that have related organisations, including paid advertising. A forum alone was a bit boring though and I had the fun of watching visitors piling up but only a few posting. All that posted said it needed more than a forum. At one point it showed 412 visitors, one user. So I figured "I know, OCportal!"

Installed it, it worked but then trying to get it to show on the homepage meant destroying the earlier forum then the original install lost all images and the main index,php was one huge error message.

So basically I told around 10,000 people there was a super-duper site and then presented them with an error message. I've placed a cover html page leading to the original install (working OK after resetting the url thing but all data and work on it gone). Needless to say not a single sign-up. You can only whip up that kind of enthusiasm once.

May I suggest that in a future version you allow for a more automated means of doing as I did, ie testing an install in a folder and then if happy, moving it to the root, as there seems no specific means of that that?

No, I wasn't reading about a forum, I was reading the "moving servers" thingy plus the warning message while reinstalling.

You'd need to set your file/directory permissions again. The easiest way to do it is just to use FTP, or a web hosting file manager, to actually move the files directly on the hosting. Both these things can usually perform this function.

My impression, looking back, is that the only issue in moving to a different folder or root, is that one cannot reinstall the database, as this would wipe out the original. Perhaps an "install but use a pre-existing database" option would help?

However the problem with global.php does, by the sound of it, seem to be permission based. The file was certainly there, I had downloaded the (3000 odd files, 170MB) original installation as well, if only on the off-chance some of the content I had entered could be saved. I was able to find the file and uploaded it via FTP - "File exists! Replace Y/N?" It was defintely there.

Uploading that lot again and picking through them to figure out what needed what permission sounds like a VERY large task, not to mention the files being splattered among the 2000 or so original html files on the server. I just don't have time, that's why the site hasn't been updated so long (about 4 years).

Another weird this is that underneath the huger error message the site appeared to be running OK, could log in as admin etc. The error message seemed to be more of a problem than the file itself.

Regarding the locked installer I found the locking file via ftp and deleted it.

You're welcome to the ftp details and to have a poke around, as there are no visitors now anyway and I'd be grateful for the help. One thing I noticed during both installs was the odd "out of memory" error but the first install seemed to work just by clicking refresh and continuing.

One thing I was wondering is if it would help reinstalling but using a different database name/user? Obviously I'd lose all my setting and so on again but would that improve it's chances of installing properly? I'm just wondering if the fact it recognised the existing database (hence the "Don't install, use the upgrade thingy" message, is what caused the problem?

Everything I'd filled in on the wiki and so on is gone now anyway, so a new clean install would be better than having to put an html index with a link before visitors can find it.

I'll PM you the login details. :thumbs:



:thumbs:K.
Back to the top
 
Posted
Rating:
#38917
Avatar

My impression, looking back, is that the only issue in moving to a different folder or root, is that one cannot reinstall the database, as this would wipe out the original. Perhaps an "install but use a pre-existing database" option would help?

It shouldn't really be a problem. ocPortal was written to adapt to different URLs with minimal changes. Obviously something went wrong for your case though.

One thing I noticed during both installs was the odd "out of memory" error but the first install seemed to work just by clicking refresh and continuing.

Renaming recommended.htaccess to .htaccess will usually fix this.

I'll now see if I can trace the problem with the details you've sent.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#38919
Avatar

Right, this was very strange.

Whilst it looked like you were getting an error message about that missing file, you weren't. The actual problem was that there was the contents of the themes/default/templates/TOP.tpl file had mysteriously been replaced with the contents of uninstall.php. What you were actually seeing was uninstall.php's code put into your site output where TOP.tpl's HTML should have been.

Reinstalling would not fix this problem because it would not try and overwrite existing files (there's a reason for this but I don't want to go off on a tangent). We'll consider providing some kind of added intelligence to that in the future.

I've rectified the TOP.tpl file on your server.

One possible cause of this could be disk corruption. It's a strange thing to happen, and not something we've seen before.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#38930

Non-joined user

Ooer, that does sound strange?

Thank you for your help on that :)

I now have 2 copies of ocportal on the same site, using the same database. Obviously I'll delete the 1st installation once the 2nd one is up to speed and configured properly. What if any issues are likely to occur, can I just go ahead and fiddle with the 2nd one until I'm happy with it and then delete the .html page, to effectively open the new index.php version?

Am I right in thinking the database is only used by the forum?

Basically will having that original copy corrupt or mangilate the newer one or can I leave it there while configuring the new one?

And thanks again for the help :thumbs:



K.
Back to the top
 
Posted
Rating:
#38931

Non-joined user

I just answered my own question - I can log in but when I click 'admin' I get a 500 internal server error.

Let's see if the same happens on the original site..

No, that one seems to be working.

OK, thank you for the help. At this stage I'm going to leave things as they are and will fiddle with it later. As I say I'm very pushed for time right now.

If the well-behaved one continues to behave itself I'll be paying for it. Then I'll really be a pest ;)


K.
Back to the top
 
Posted
Rating:
#38938
Avatar

What if any issues are likely to occur, can I just go ahead and fiddle with the 2nd one until I'm happy with it and then delete the .html page, to effectively open the new index.php version?

Possibly, I'm not sure to be honest. It's not something we designed for specifically.

Am I right in thinking the database is only used by the forum?

The database is used by many different things.

Basically will having that original copy corrupt or mangilate the newer one or can I leave it there while configuring the new one?

It shouldn't cause major damage, although if you upload things then the resources that own the file you uploaded would only work right on the copy you uploaded it to.

I get a 500 internal server error.

This is a general purpose error from Apache. I wish that Apache had a decent error mechanism, but this could be caused by many things, and happens on a level beneath ocPortal.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#38944
Avatar

Community saint

I wish that I had seen your post earlier. Very seldom do I use the root of my domain for an application. What I do is put it into a subfolder like you did then in the root I put the following php file and name it index.php

<?php
    $goto = "http://www.mywebsite/subdirectory";
    Header("Location: $goto");
    exit;
?>

Then I just put the link to the subdomain that I want it to go to. If at any time you want to redirect your domain elsewhere for any reason just change the link in the PHP file and off it goes to that location.

Rick Henson

OCP 4.3.2 & 5.0.1
PHP 5.2.5
MySQL 5.0.51a
FireFox 3.6.8
Back to the top
 
Posted
Rating:
#38946

Non-joined user

*blink*

 :$

hehehe

Thank you for that, will give it a try!


K.
Back to the top
 
Posted
Rating:
#38947

Non-joined user

Worked perfectly, thanks again!

I'm not too convinced regarding SEO but what the heck. it works!

 :lol:

K.
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: