Jump to content
DaveC

Upgrade and Update ProcessWire in PHP7.2 Host

Recommended Posts

Posted (edited)

I have an almost similar problem (to this one).

I have no knowledge of Processwire, I have extensive knowledge of Dreamweaver. The site www.Vivesport.co.uk was made by someone else whom I now cannot contact. I moved it to another host. It cannot then be viewed, displaying:

"Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Error has been logged."

A host engineer said:

"It seems the site was written for legacy php so you will likely need to update the site to make it compatible with php7.

 

The .htaccess file was also causing some trouble, we have disabled it and now you can view the .txt files on the site."

Processwire appears to be version

2.7.

I have extensively researched other post and help topics but I cannot make sense of them. I've downloaded both ProcessWireUpgrade-master & processwire-master. It is not clear what to do with them - I cannot access anything via the site because of the above message.

 

Any suggestions, please.

Edited by kongondo
DaveC: I moved your questions to their own thread here.

Share this post


Link to post
Share on other sites

Please don't answer yet, I've found a page which might be useful.

Share this post


Link to post
Share on other sites

Compare how is PHP running on both systems. If it runs as 'nobody' on one and not on the other, than file and folder ownership could be reason for Internal Server Error. 

Share this post


Link to post
Share on other sites
26 minutes ago, huseyin said:

Compare how is PHP running on both systems. If it runs as 'nobody' on one and not on the other, than file and folder ownership could be reason for Internal Server Error. 

Thanks for the reply but not sure what you mean.

Further information, I deleted index.php, .htaccess, & wire and replacing them with the latest version. Reloaded 6 times. Still nothing. Deleted and replaced with version 2.8. Same error message..

Share this post


Link to post
Share on other sites

Just spotted that 'gridhost.co.uk' should not be present, it's from the previous host.

Share this post


Link to post
Share on other sites

Deleted that, error log now reads:

"2020-05-19 10:45:19    ?   http://www.vivesport.co.uk/  Error:     Exception: SQLSTATE[HY000] [2002] Connection timed out (in /vhost/vhost21/v/i/v/vivesport.co.uk/www/wire/core/ProcessWire.php line 459"

[Apologies for repeated posts, but I cannot 'edit' - "post cannot be found".]

Share this post


Link to post
Share on other sites
33 minutes ago, DaveC said:

Deleted that, error log now reads:

"2020-05-19 10:45:19    ?   http://www.vivesport.co.uk/  Error:     Exception: SQLSTATE[HY000] [2002] Connection timed out (in /vhost/vhost21/v/i/v/vivesport.co.uk/www/wire/core/ProcessWire.php line 459"

[Apologies for repeated posts, but I cannot 'edit' - "post cannot be found".]

you should have a look at the /site/config.php and set the Database Credentials accordingly. 

Share this post


Link to post
Share on other sites

From config.php

****

/*** INSTALLER CONFIG ********************************************************************/

/**
 * Installer: Database Configuration
 *
 */
$config->dbHost = '***********';
$config->dbName = 'vivespor_live';
$config->dbUser = 'vivespor_live';
$config->dbPass = '*********';
$config->dbPort = '3306';

/**
 * Installer: User Authentication Salt
 *
 * Must be retained if you migrate your site from one server to another
 *
 */
$config->userAuthSalt = '6933cb8d955240f4d2b91bbddf381064';

/**
 * Installer: File Permission Configuration
 *
 */
$config->chmodDir = '0777'; // permission for directories created by ProcessWire
$config->chmodFile = '0666'; // permission for files created by ProcessWire

/**
 * Installer: Time zone setting
 *
 */
$config->timezone = 'Europe/London';


/**
 * Installer: HTTP Hosts Whitelist
 *
 */
$config->httpHosts = array('www.vivesport.co.uk/?/');

*****

dbHost & dbPass [presumably password] are correct.

What should dbName, dbUser, & httpHosts refer to, please?

Share this post


Link to post
Share on other sites

dbHost is the mysql server. Mostly is localhost.

dbPass is your DB password that your mysql server host provide to you.

dbName is the DB name that your host provide to you.

dbUser is the username thst can use the database server. It should be provided by your host.

httpHosts is the domain of your site like www.yourdomain.com

Gideon

Share this post


Link to post
Share on other sites
Posted (edited)
2 hours ago, DaveC said:

 

 

Thanks for the reply but not sure what you mean.

Further information, I deleted index.php, .htaccess, & wire and replacing them with the latest version. Reloaded 6 times. Still nothing. Deleted and replaced with version 2.8. Same error message..

 

Hello, 

Sorry for my english. I was not able explain well. 

PHP could be setup in 2 ways. Either it runs as "nobody" or it runs as the accounts user name. 

Depending on this the file and folder ownership and permissions will be different. So if PHP setup was different on your former host you will get errors on your new host. 

PHP will have problems reading and writing tonyour files... 

Please read following example (it is not related to Processwire, but could help to understand the PHP setup differences) ;

https://www.ndchost.com/wiki/cpanel/enable-suphp

 

Or this one

 

https://www.liquidweb.com/kb/file-upload-problems/

Edited by huseyin
Additional link

Share this post


Link to post
Share on other sites

Thanks for all the comments and help so far.

I've gone back to square 1! And a blank hosting workspace.

A database has been set up. I've installed PW 3.x. I've replaced the new 'site' folder with the original one. [Config.php in the site folder is configured correctly.]

Parts of some of the original website pages are working OK but most are not.

I've tried the .htaccess suggestion of amending it to see if Apache is reading it, and it is.

How do I get new website pages to be the same as the old website pages, please? [I have not fully grasped PWs use of the word 'page'.]

Or do I have to remake them all?

Share this post


Link to post
Share on other sites

@DaveC,

Moderator Note: I split and moved your questions (and the subsequent responses) to their own thread here.

Share this post


Link to post
Share on other sites
1 hour ago, DaveC said:

Or do I have to remake them all?

This occurs very rarely :-).

For your scenario, I'd probably do something like this:

  1. Download the database and assets from the old site to your computer.
  2. Work locally first! This means, set up two sites locally (MAMP/WAMP/Laragon, etc...whatever you use locally)
  3. Site #1: Replicate the old site in one install (running ProcessWire 2.7)
  4. Site #2: New ProcessWire install with the latest version of ProcessWire
  5. Check if there were modules installed on your old site that are no longer compatible (i.e. confirmed not working; not just by version numbers). If that's the case, you will need a few extra steps. Let us know first.
  6. Make sure the old site is working OK in your local test (Site #1)
  7. Now its time to Migrate things. The easiest is to your Adrian's Migrator tool (https://processwire.com/talk/topic/8660-migrator/).  Use it to migrate the old site to the new one
  8. If everything works, it's time to test on your remote server/host
  9. ...let us know how it goes 🙂

Share this post


Link to post
Share on other sites
1 hour ago, DaveC said:

Parts of some of the original website pages are working OK but most are not.

Please be more specific. What do you mean are not working? Are they not displaying at all (white page) or are some bits showing and not others? Any errors?

Share this post


Link to post
Share on other sites
On 5/22/2020 at 3:41 PM, kongondo said:

Please be more specific. What do you mean are not working? Are they not displaying at all (white page) or are some bits showing and not others? Any errors?

http://www.vivesport.co.uk/

Share this post


Link to post
Share on other sites
On 5/22/2020 at 3:39 PM, kongondo said:

This occurs very rarely :-).

For your scenario, I'd probably do something like this:

  1. Download the database and assets from the old site to your computer.
  2. Work locally first! This means, set up two sites locally (MAMP/WAMP/Laragon, etc...whatever you use locally)
  3. Site #1: Replicate the old site in one install (running ProcessWire 2.7)
  4. Site #2: New ProcessWire install with the latest version of ProcessWire
  5. Check if there were modules installed on your old site that are no longer compatible (i.e. confirmed not working; not just by version numbers). If that's the case, you will need a few extra steps. Let us know first.
  6. Make sure the old site is working OK in your local test (Site #1)
  7. Now its time to Migrate things. The easiest is to your Adrian's Migrator tool (https://processwire.com/talk/topic/8660-migrator/).  Use it to migrate the old site to the new one
  8. If everything works, it's time to test on your remote server/host
  9. ...let us know how it goes 🙂

Steep learning curve here! Thanks. [I've set up many static sites in the past but never progressed to dynamic ones.]

Share this post


Link to post
Share on other sites

OK. I have a quick look. There's multiple issues (I know, don't roll your eyes please 😄)

  1. Internal Server Error: It seems this is being caused due to a script that is supposed to be generating the footer menu of the site
  2. Missing fonts: It seems the site was using Adobe Fonts and some of these are not activated
  3. Missing image(s): your /site/templates/img/ folder is throwing a 403 meaning this is a permission issue 
  4. Our sessions: The accordion is not working but now errors are showing in the console. This suggest the JavaScript responsible for the accordion is probably missing?

How important is this site to you? I am asking since apart from it being broken, I see texts relating to ProcessWire on the home page. 

To debug further, we would need to see some template files, names of modules that were installed in the original site, e.g. the one that was used to generate the menu in the footer.

Share this post


Link to post
Share on other sites

3 hours of scouring the internet, I'll ask for help here again [didn't want to take up people's time if I could wort out the problem myself].

Installed WAMP, created SQL database, set PW2.7 installation going, 'Test Database & Save Configuration': many lines of 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'vstest.modules' doesn't exist' and 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'vstest.pages' doesn't exist'.

I now [after research] know how to set up tables, but I don't know specific tables for PW.

Share this post


Link to post
Share on other sites
21 hours ago, kongondo said:

OK. I have a quick look. There's multiple issues (I know, don't roll your eyes please 😄)

  1. Internal Server Error: It seems this is being caused due to a script that is supposed to be generating the footer menu of the site
  2. Missing fonts: It seems the site was using Adobe Fonts and some of these are not activated
  3. Missing image(s): your /site/templates/img/ folder is throwing a 403 meaning this is a permission issue 
  4. Our sessions: The accordion is not working but now errors are showing in the console. This suggest the JavaScript responsible for the accordion is probably missing?

How important is this site to you? I am asking since apart from it being broken, I see texts relating to ProcessWire on the home page. 

To debug further, we would need to see some template files, names of modules that were installed in the original site, e.g. the one that was used to generate the menu in the footer.

So best to start from scratch?

Share this post


Link to post
Share on other sites
2 hours ago, DaveC said:

So best to start from scratch?

Not necessarily. You have at least two other options.

  • If it's not a lot of work and you really need this to be sorted, you can grant someone here from the forums (not just anyone!) temporary superuser access either to the remote site or send them the original DB dump of the site before you started working on it. If you have very sensitive data in the dump/site, then this becomes a bit tricky.
  • If you have a budget, pay someone from the forums (post in the Job's board) to sort this out for you.
  • Like 1

Share this post


Link to post
Share on other sites
7 hours ago, DaveC said:

So best to start from scratch?

Kongondo is right, of course. Sounds like there is some sort of "custom code" implemented for your site which cannot run in the new server environment, or even worse, your host might have screwed up something which they just never confess. For example, once I had a clear clue in the logs that the hosting company ran their custom script to scan(?) the site for some sort of WordPress thingy and the script modified things it should not have. The support denied the fact that the scrip had been run, but the error message in the logs told me a different story...

 

Share this post


Link to post
Share on other sites

To give another perspective on this topic...

This is something that is much easier fixed by changing host than changing the website itself.

On 5/19/2020 at 8:41 PM, DaveC said:

A host engineer said:

"It seems the site was written for legacy php so you will likely need to update the site to make it compatible with php7.

A statement like that is a clear message that it's time to find a different host. I think it's outrageous for a host to change the PHP version on a live site without warning and then tell their customers that it's their problem to solve. If a host did that to me I would drop them just on principle.

Almost all shared cPanel hosting lets you pick the PHP version.

2020-05-25_094027.png.92723a9be91dc64ecad0e058640ffb01.png

So my suggestion would be to open a new account at a shared cPanel host of your choosing. This kind of hosting is as cheap as chips. Hopefully you made a backup of the site files and database before you started changing things. Set the PHP version to 5.4, create/import the database and upload the files and chances are everything will work as it did before. The host might even do the migration for you as a sweetener for new customers. You can use a subdomain (test.vivesport.co.uk) for testing the new hosting and later change the primary domain if everything is working.

  • Like 1

Share this post


Link to post
Share on other sites
10 hours ago, Robin S said:

To give another perspective on this topic...

This is something that is much easier fixed by changing host than changing the website itself.

A statement like that is a clear message that it's time to find a different host. I think it's outrageous for a host to change the PHP version on a live site without warning and then tell their customers that it's their problem to solve. If a host did that to me I would drop them just on principle.

Almost all shared cPanel hosting lets you pick the PHP version.

2020-05-25_094027.png.92723a9be91dc64ecad0e058640ffb01.png

So my suggestion would be to open a new account at a shared cPanel host of your choosing. This kind of hosting is as cheap as chips. Hopefully you made a backup of the site files and database before you started changing things. Set the PHP version to 5.4, create/import the database and upload the files and chances are everything will work as it did before. The host might even do the migration for you as a sweetener for new customers. You can use a subdomain (test.vivesport.co.uk) for testing the new hosting and later change the primary domain if everything is working.

The current host didn't upgrade without telling me. The site was devised and hosted elsewhere. The original company decided that they were no longer going to be involved with websites and said that my daughter had to move the site to somewhere else. I have various static sites hosted by Easyspace so I said that I would sort things out for her. The original firm now won't talk to me, in effect saying 'tough'. They have absconded all responsibilites.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...