Moving site from localhost to server. Getting HTTP ERROR 500

Permalink 1 user found helpful
I followed all the steps at the link below but its not working and I have no idea what is causing the problem.

http://documentation.concrete5.org/developers/installation/moving-a...

CollinDaugherty
 
hutman replied on at Permalink Reply
hutman
What errors do you see in the PHP Error Log on the server?
CollinDaugherty replied on at Permalink Reply
CollinDaugherty
Sorry, I'm not sure where to find that info.
hutman replied on at Permalink Reply
hutman
I would suggest you contact your host and see if they can help you find it. That would certainly give you a clue as to what is going wrong.
CollinDaugherty replied on at Permalink Reply
CollinDaugherty
The only error log I could find says this:

[Tue Jan 03 13:03:57.179779 2017] [:error] [pid 1043356:tid 140672923305728] [client 206.51.238.159:40432] File does not exist: /home/anflawzt/public_html/license.php.suspected
hutman replied on at Permalink Reply
hutman
Well that's certainly an odd error since there is no license.php in Concrete5, did you have another site hosted in this location previously?
CollinDaugherty replied on at Permalink Reply
CollinDaugherty
Just my current static html site. I'm trying to put the Concrete5 site on a subdomain I use for testing so I don't understand why the error doesn't originate from the test subfolder.
hutman replied on at Permalink Reply
hutman
Files with a .suspected extension would usually be files that your web hosts had identified as possibly being malicious and renamed so they can not be run. The web host may also change the permissions so that they can not accessed by you or software running on the website. Have you contacted your web host to see if they know anything about them?
CollinDaugherty replied on at Permalink Reply
CollinDaugherty
I just submitted a support ticket with them.

I also found an error log file in my test subfolder and this is what it says:

[03-Jan-2017 15:29:32 America/New_York] PHP Warning: require(/home/anflawzt/public_html/test/updates/concrete5-8.0.3/concrete/dispatcher.php): failed to open stream: No such file or directory in /home/anflawzt/public_html/test/concrete/bootstrap/configure.php on line 52
[03-Jan-2017 15:29:32 America/New_York] PHP Fatal error: require(): Failed opening required '/home/anflawzt/public_html/test/updates/concrete5-8.0.3/concrete/dispatcher.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/anflawzt/public_html/test/concrete/bootstrap/configure.php on line 52
[03-Jan-2017 15:29:34 America/New_York] PHP Warning: require(/home/anflawzt/public_html/test/updates/concrete5-8.0.3/concrete/dispatcher.php): failed to open stream: No such file or directory in /home/anflawzt/public_html/test/concrete/bootstrap/configure.php on line 52
[03-Jan-2017 15:29:34 America/New_York] PHP Fatal error: require(): Failed opening required '/home/anflawzt/public_html/test/updates/concrete5-8.0.3/concrete/dispatcher.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/anflawzt/public_html/test/concrete/bootstrap/configure.php on line 52
hutman replied on at Permalink Reply
hutman
Does this file exist on your server? /home/anflawzt/public_html/test/updates/concrete5-8.0.3/concrete/dispatcher.php
CollinDaugherty replied on at Permalink Reply
CollinDaugherty
Looks like a few things were missing there. I uploaded all the missing files.

Now when I try to visit the test site I get this:

Third party libraries not installed. Make sure that composer has required libraries in the concrete/ directory.
CollinDaugherty replied on at Permalink Reply
CollinDaugherty
nvm, fixed that and I actually get a bit of the Concrete UI showing up now but with this error:

An unexpected error occurred.
Creating default object from empty value
hutman replied on at Permalink Reply
hutman
I would strongly suggest you turn on the debugging information so that you can see the full error messages.
CollinDaugherty replied on at Permalink Reply
CollinDaugherty
I was able to get the site up and working for the most part but when I try to upload files, I get this error message:

An unexpected error occurred. An exception occurred while executing 'INSERT INTO FileVersions (fvID, fvFilename, fvPrefix, fvDateAdded, fvActivateDateTime, fvIsApproved, fvAuthorUID, fvSize, fvApproverUID, fvTitle, fvDescription, fvExtension, fvType, fvTags, fvHasListingThumbnail, fvHasDetailThumbnail, fID) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params [2, "lpmn.png", "281480014711", "2017-01-04 11:44:31", "2016-11-24 20:11:52", 0, 1, "288034", 1, "Collin Daugherty", "", "png", 1, "", 1, 0, 1]: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`anflawzt_conc986`.`FileVersions`, CONSTRAINT `FK_D7B5A13AE3111F45` FOREIGN KEY (`fID`) REFERENCES `files` (`fID`)) < Back to Home


And I get this error when I try to edit the SEO settings for a page:

An exception occurred while executing 'INSERT INTO CollectionAttributeValues (cID, cvID, akID, avID) VALUES (?, ?, ?, ?)' with params ["167", "3", 1, null]: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`anflawzt_conc986`.`CollectionAttributeValues`, CONSTRAINT `FK_BB9995FCB6561A7E` FOREIGN KEY (`akID`) REFERENCES `attributekeys` (`akID`))

Thanks so much for your help so far!
hutman replied on at Permalink Reply
hutman
It sounds to me like your database dump/restore didn't work properly and you're missing rows in some of your tables. Or there are different settings on your live server than there were on your development server.
CollinDaugherty replied on at Permalink Reply
CollinDaugherty
okay, looks like the easiest way to fix this is to start with a clean db and just recreate what I had which thankfully won't take much time.

Thanks again for the help!
axelhahn replied on at Permalink Reply
axelhahn
Hi,

maybe the topic is closed ... but I had the similiar error and found this thread with a search engine.

After copying files of concrete5 8.2 to my hoster and importng the sql dump I had 2 effects:

(1)
The admin gui does not work - some pages were white (http response code 200 (OK); but 0 byte in body). With enabled debug I saw the include directories poited to my local pathes. --> Clear the cache helped. I made it in my local environment and reimported the new mysql dump.

(2)
Changing content in pages has shown:
An unexpected error occurred. An exception occurred while executing 'INSERT INTO CollectionAttributeValues (cID, cvID, akID, avID) VALUES (?, ?, ?, ?)' with params [1233, 3, 2, 1474]: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`DB2877676`.`CollectionAttributeValues`, CONSTRAINT `FK_BB9995FCB6561A7E` FOREIGN KEY (`akID`) REFERENCES `attributekeys` (`akID`)) < Back to Home


This is a same problem like above. The problem here is in the tablename
"...FOREIGN KEY (`akID`) REFERENCES `attributekeys` ..."

It is the wrong table - it has no capital letter: the right table name is "AttributeKeys".

I remember I changed the tablenames from lowercase to camelcase in Mysql (there are a few threads about it) ... but now I see the constraints are still wrong.
In my mysql dump I see these 2 wrong constraints ...

DROP TABLE IF EXISTS `CollectionAttributeValues`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CollectionAttributeValues` (
  `cID` int(10) unsigned NOT NULL,
  `cvID` int(10) unsigned NOT NULL,
  `akID` int(10) unsigned NOT NULL,
  `avID` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`cID`,`cvID`,`akID`),
  KEY `IDX_BB9995FCB6561A7E` (`akID`),
  KEY `IDX_BB9995FCA2A82A5D` (`avID`),
  CONSTRAINT `FK_BB9995FCA2A82A5D` FOREIGN KEY (`avID`) REFERENCES `attributevalues` (`avID`),
  CONSTRAINT `FK_BB9995FCB6561A7E` FOREIGN KEY (`akID`) REFERENCES `attributekeys` (`akID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;


I rewrite the dump and import it again to fix it.

regards,
Axel
mobius2000 replied on at Permalink Reply
The above comment helped me perfectly... Simple find/replace in text editor fixed this issue for me.