Jump to content

Some installation help please


Gazley
 Share

Recommended Posts

Hi there,

After developing a site locally, I'm now going through the motions of installing onto an Ubuntu 12.04 VPS. Here are some of the issues I'm having; any advice around this first remote install would be greatly appreciated :)

I have a VirtualHost pointing to a document root that includes 'ProcessWire'. In this case, 'wire' and 'site' appear as the folders in the document root. I assume this is OK?

If a specify the domain name, I see my own .html file. Is I add index.php to the domain name, I see "Unable to complete this request. The error has been logged...". The errors.txt file contains the following message:

2012-11-11 18:23:10 ? http://www.gazley.co.uk/?/ Compile Error Cannot redeclare class FormBuilder (line 22 of /srv/www/gazley.co.uk/ProcessWire/site/modules/FormBuilder/FormBuilder.module)

To start with, any ideas what is going wrong in my setup?

Cheers!

Link to comment
Share on other sites

Got a bit further with this. cloning from ProcessWire and running the installer, I manager to get Admin and Site running, albeit the PW default. I restored my data into the DB on the remote server. I copied my local "site" folder into remoted "htdocs" alongside of the latest "wire" folder. When I try to load the site, I'm now seeing:

2012-11-11 21:49:08 guest http://www.gazleyco.uk/ Error Exception: Field does not exist: summary_on_home (in /srv/www/gazley.co.uk/htdocs/wire/core/PageFinder.php line 244)

"summary_on_home" is one my fields. The site works perfectly on localhost. Any ideas how I can resolve this?

Thanks.

Link to comment
Share on other sites

Hi there,

So far, no luck at all. I did a manual backup of my local DB instead of using pgpMyAdmin. I copied the file to the remote server and restored. All worked as expected. When I hit the home page, I get a PW error. The error log tells me that the field "summary_on_home" doesn't exist. The line of code that throws the error is:

if(!$field = $this->fuel('fields')->get($field)) throw new WireException("Field does not exist: $fields[$n]");

I'm not familiar with the DB schema but I can clearly see that there is a table that matches this field. The casing of the table name is all lowercase. Everything looks OK.

I'm pretty stuck now and have no idea why this isn't working. Any help would be appreciated.

Thanks.

Link to comment
Share on other sites

Sounds strange. Does demo install work on your server and does it throw any warnings? Have you tried the profile export? What version of PHP and what version of MySQL is running?

Is the summary_on_home also on fields table?

Link to comment
Share on other sites

Hey apeisa,

Thanks for showing up! :)

The "fields" table on the server only has a handful of records by comparison to the local DB instance. I don't understand why that would be? I'm going to look at the backup file now to see what's in there but it looks like you are on to something! Hurray! :)

Cheers :)

Link to comment
Share on other sites

Thanks to apeisa's advice, the data restore has fixed the missing field issue. However, I am back to square one again with the error message which is:

2012-11-13 21:52:30 ? http://www.gazley.co.uk/?/ Compile Error Cannot redeclare class FormBuilder (line 22 of /srv/www/gazley.co.uk/htdocs/site/modules/FormBuilder/FormBuilder.module)

Dunno?

Link to comment
Share on other sites

>Does demo install work on your server and does it throw any warnings?

It works fine.

>Have you tried the profile export?

Not sure what that is?

>What version of PHP

5.3.10

>and what version of MySQL is running?

5.5.28

Link to comment
Share on other sites

@WillyC - form builder is only in site/modules.

Thanks everyone for your help and advice. I'll try all suggestions tomorrow as it's getting pretty late now. I'll let you know whether anything has helped.

I really appreciate all your input! You are all very cool! :)

Link to comment
Share on other sites

Gazley, sorry I'm about a day behind on messages here. The error you are getting indicates the FormBuilder module is getting included twice somehow. I'm not sure how this would happen, so definitely a mystery. But since there was corruption in your fields table, it certainly seems possible there could be corruption in your modules table too (maybe 2 entries for FormBuilder?). And if there's corruption in one place, then there's very likely a bigger problem. Any idea how things started getting corrupted here? You might want to start with a fresh copy from your local server, because clearly something was lost in the migration. What version of PHP and MySQL is the new server running? I also think WillyC's suggestions are good, but they are plugging holes rather than finding what's creating the holes. I wouldn't be comfortable knowing that somehow the data in tables was changing after doing a simple export/import. Whatever is causing that is very likely the source of the problem. First thing I'd do is look at the DB dump file to see if it contains a proper entry for your 'summary_on_home' field. If it does, then the problem is likely occurring during import to your new server. If it doesn't, then the problem is likely with the export from your local server.

Link to comment
Share on other sites

Hello Ryan

Many thanks for chiming in.

I must admit, this really floored me because I thought the biggest hassle would be building and hardening the server itself. When I tried to load the site and got the PW error message, I wondered what the hell I'd done wrong! :)

The site works perfectly, locally. After the initial problem, I git cloned from Processwire and ran the default site. All worked as expected on my remote VPS. So, it seems that it's something to do with my data/setup, but obviously it's confusing because it all works fine locally.

Apeisa suggested to use the Profile export module so I will try that when I get home but I have no idea what it actually does. I'll check the modules table too, and see whether there is any duplication of entry around FormBuilder. As to the versions, see below.

>What version of PHP

5.3.10

>and what version of MySQL is running?

5.5.28

It's reassuring to know that you have noticed this issue because I was running out of ideas. I'll report back later when I have had a chance to play with some of the suggestions.

Thanks again :)

Link to comment
Share on other sites

Gazley, any chance you tried to import data to a pre-populated database with no "drop table ..." statements in your dump? Then some create/insert statements from the beginning of the dump would have been run successfully, until an error due to duplicate key somewhere would have stopped the import leaving the database somewhat broken.

Well, as you managed to get over that missing field already, I'm probably not on the right track with this. Just thinking aloud here. :)

Link to comment
Share on other sites

Hi nik,

What you suggest might have happened. I don't know for certain. I did a regular phpMyAdmin backup so I am unsure whether it drops the tables out of the box. Thereafter, I simply used mysqldump using the --databases flag. I understand from the docs that if you specify the target DB as an argument to this flag, it automatically adds DROP TABLE statements and this may be why it succeeded on subsequent restores. However, the error reported around FormBuilder does seem to be something else.

Thanks for you suggestion; it does sound extremely plausible indeed.

Cheers! :)

Link to comment
Share on other sites

Hi nik,

I've been working at my "day job" so won't be able to try any of the suggestions until I get home. I would really love to do PHP/PW full time!

I'll definitely try the suggestion later and report back.

Cheers!

Link to comment
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
 Share

×
×
  • Create New...