Copying 3.2.0 from local to hosted server environment

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
User avatar
EoN604
Registered User
Posts: 90
Joined: Sat Jun 12, 2004 4:34 pm

Copying 3.2.0 from local to hosted server environment

Post by EoN604 »

Hi all,

A while ago I took a copy of my entire hosted website (files, database and all), including a phpBB 3.0.4 forum and recreated it on my local environment (macOS). I then went through the process of upgrading it to 3.2.0. I took this approach because the forum was many gb's in size, far too big to upgrade on the live hosted server without timeouts etc. In the end this was successful and entirely working on my local environment.

I have recently uploaded and updated my hosted server environment with a full restore of my local database, and full restore of my local file system. The problem is I am now getting the following error:

Code: Select all

[05-Jan-2020 21:43:38 Australia/Sydney] PHP Warning:  include(/Applications/MAMP/htdocs/mysite/include/functions.php): failed to open stream: No such file or directory in /home/virtual/mysite/public_html/forum/cache/production/twig/29/29270794c057e23bb9013defd7164c1d8a9f0d7bf1ddb37f977388f67fb945b0.php on line 24
[05-Jan-2020 21:43:38 Australia/Sydney] PHP Warning:  include(): Failed opening '/Applications/MAMP/htdocs/mysite/include/functions.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/virtual/mysite/public_html/forum/cache/production/twig/29/29270794c057e23bb9013defd7164c1d8a9f0d7bf1ddb37f977388f67fb945b0.php on line 24
[05-Jan-2020 21:43:38 Australia/Sydney] PHP Warning:  require(/Applications/MAMP/htdocs/mysite/phpAds/config.inc.php): failed to open stream: No such file or directory in /home/virtual/mysite/public_html/forum/cache/production/twig/29/29270794c057e23bb9013defd7164c1d8a9f0d7bf1ddb37f977388f67fb945b0.php on line 25
[05-Jan-2020 21:43:38 Australia/Sydney] PHP Fatal error:  require(): Failed opening required '/Applications/MAMP/htdocs/mysite/phpAds/config.inc.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/virtual/mysite/public_html/forum/cache/production/twig/29/29270794c057e23bb9013defd7164c1d8a9f0d7bf1ddb37f977388f67fb945b0.php on line 25
I believe this is due to some cached file content still referring to my local ROOT_PATH dir rather than my hosted server root dir. I attempted to delete (archive) the forum/cache/production folder to no avail.

Given that I have updated the database and file structure on the server, is there a way I can easily 'reset' or re-point the server install to the correct paths? At this point I desperately want to prevent having to do another 'upgrade' and want to know the easiest way to 'copy' my working install of phpBB 3.2.0 from my local environment to the server environment.

Many thanks,
EoN

User avatar
Mick
Support Team Member
Support Team Member
Posts: 22056
Joined: Fri Aug 29, 2008 9:49 am
Location: Watching cricket.

Re: Copying 3.2.0 from local to hosted server environment

Post by Mick »

"The more connected we get the more alone we become" - Kyle Broflovski

Please read: “Am I In The Right Place?” before posting.

User avatar
warmweer
Jr. Extension Validator
Posts: 3886
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium

Re: Copying 3.2.0 from local to hosted server environment

Post by warmweer »

EoN604 wrote:
Sun Jan 05, 2020 10:48 am
Given that I have updated the database and file structure on the server, is there a way I can easily 'reset' or re-point the server install to the correct paths? At this point I desperately want to prevent having to do another 'upgrade' and want to know the easiest way to 'copy' my working install of phpBB 3.2.0 from my local environment to the server environment.
First of all, since you have problems updating online, I would continue the update proces to 3.2.8 on localhost before uploading everything to online.

And secondly, your config.php which you used on localhost should be edited to reflect your online situation. I suspect you have done that (seeing the errors) but check just to make sure.
Also, you config_table (which you uploaded with the database) has some items pointing to your localhost installation.
The most important one = force_server_vars which should be set to 0, otherwise it will use the dat form your localhost.
Also, you should use the correct cookie_domain (and preferably) a different cookie_name when using your host services.
We should embrace problems, without which there wouldn't be any solutions.

User avatar
EoN604
Registered User
Posts: 90
Joined: Sat Jun 12, 2004 4:34 pm

Re: Copying 3.2.0 from local to hosted server environment

Post by EoN604 »

Thank you for your posts, much appreciated. So after reviewing, I note that:

* Hosted envrionment already has force_server_vars = 0
* The /forum/config.php file has correct settings for the hosted environment.
* I tried deleting (archiving) the /forum/cache/ folder.
* On accessing mysite.com/forum/ I'm still getting the same error.

It appears to me that the /forum/cache/ folder is not being rebuilt correctly, or there is still some reference to my old local paths that is not being flushed. I read somewhere that perhaps the /forum/vendor/ folder needs to be deleted/archived however when I try this it tells me an error related to composer:

Code: Select all

Fatal error: Composer dependencies have not been set up yet, run 'php ../composer.phar install'
Could you provide any further suggestions or assistance?

Kind regards,
EoN

User avatar
Prosk8er
Registered User
Posts: 1477
Joined: Sun Mar 12, 2006 3:30 am
Location: Rochester, NY
Name: Tyler
Contact:

Re: Copying 3.2.0 from local to hosted server environment

Post by Prosk8er »

EoN604 wrote:
Sun Jan 05, 2020 10:43 pm
Thank you for your posts, much appreciated. So after reviewing, I note that:

* Hosted envrionment already has force_server_vars = 0
* The /forum/config.php file has correct settings for the hosted environment.
* I tried deleting (archiving) the /forum/cache/ folder.
* On accessing mysite.com/forum/ I'm still getting the same error.

It appears to me that the /forum/cache/ folder is not being rebuilt correctly, or there is still some reference to my old local paths that is not being flushed. I read somewhere that perhaps the /forum/vendor/ folder needs to be deleted/archived however when I try this it tells me an error related to composer:

Code: Select all

Fatal error: Composer dependencies have not been set up yet, run 'php ../composer.phar install'
Could you provide any further suggestions or assistance?

Kind regards,
EoN
if you delete the old vendor folder make sure you upload the vendor folder from the phpbb package that your up to date with

User avatar
3Di
Former Team Member
Posts: 14810
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: Copying 3.2.0 from local to hosted server environment

Post by 3Di »

Prosk8er wrote:
Sun Jan 05, 2020 10:47 pm
I tried deleting (archiving) the /forum/cache/ folder.
only the production folder that lies inside of cache should be deleted, it will be re build on runtime.
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
:studio_microphone: Premium extensions @ The Studio

User avatar
EoN604
Registered User
Posts: 90
Joined: Sat Jun 12, 2004 4:34 pm

Re: Copying 3.2.0 from local to hosted server environment

Post by EoN604 »

Actually I just discovered the issue - it was my fault, I discovered i had a variable still being assigned to my old local path in the following file:

Code: Select all

/forum/styles/mysite/template/overall_header.php
This was because I couldn't seem to find a way to have these my 'rootWeb' and 'rootDir' variables defined based on the phpbb versions of these variables

It's now resolved - thanks again for your help. This is a great, and very helpful community!

User avatar
warmweer
Jr. Extension Validator
Posts: 3886
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium

Re: Copying 3.2.0 from local to hosted server environment

Post by warmweer »

EoN604 wrote:
Sun Jan 05, 2020 10:43 pm
* I tried deleting (archiving) the /forum/cache/ folder.
The /forum you are talking about is the directory (on your host) in which you copied all the phpBB files and directories I presume
so you would have a structure yourhost/forum/ and in this /forum the directories /adm etc.. and config.php
Cache can be emptied via the ACP, but also via FTP by deleting everything in /cache except for index.htm and .htaccess.
Did you edit any files? (meaning are you working with a pristine phpBB 320 fileset or have some customisations for styles?)
When you updated, did you use autoupdate?
EoN604 wrote:
Sun Jan 05, 2020 10:43 pm
It appears to me that the /forum/cache/ folder is not being rebuilt correctly, or there is still some reference to my old local paths that is not being flushed. I read somewhere that perhaps the /forum/vendor/ folder needs to be deleted/archived however when I try this it tells me an error related to composer:

Code: Select all

Fatal error: Composer dependencies have not been set up yet, run 'php ../composer.phar install'
The /vendor folder should not be deleted.
Should you have done that: recopy the whole folder from a clean phpBB fileset (same version).

It would help if you provided a url to your host install or even better post the SRT

Added:
ah OK, solved it seems.
Still, If you haven't updated to 328, you should really (certainly if you're planning on using some extensions).
We should embrace problems, without which there wouldn't be any solutions.

User avatar
EoN604
Registered User
Posts: 90
Joined: Sat Jun 12, 2004 4:34 pm

Re: Copying 3.2.0 from local to hosted server environment

Post by EoN604 »

warmweer wrote:
Sun Jan 05, 2020 11:05 pm
Added:
ah OK, solved it seems.
Still, If you haven't updated to 328, you should really (certainly if you're planning on using some extensions).
Yeah now that things seem to be stable, I will do just that, and update to 3.2.8. Cheers.

Post Reply

Return to “[3.2.x] Support Forum”