Document Root is incorrect

Permalink
Hi all,

I have had to upgrade a old site from my local computer running MAMP (php 5.6).

After uploading the SQL dump and new site files to the server I get the following error

"An unexpected error occurred.
include(/Users/*myusername*/Sites/htdocs/localsite/packages/hivis/themes/hivis/elements/header.php): failed to open stream: No such file or directory"

I have searched the database tables for the the above 'Users' folder path and and deleted all cache files before uploading but I still can't figure out why the Document Root is pointing to the local computer path where I performed the upgrade scripts and not the server?

Any help greatly appreciated as this is driving me nuts!

 
hutman replied on at Permalink Reply
hutman
Have you tried deleting everything in application/files/cache? That usually fixes this.
pxkrunch replied on at Permalink Reply
Thanks for the reply.
I just seem to be going round in circles...

After deleting the cache files and the site just shows a blank page.

If I go to mysite/index.php/login I get the following error
An exception occurred while executing 'SELECT * FROM FileImageThumbnailPaths WHERE isBuilt = 0 LIMIT 1': SQLSTATE[42S02]: Base table or view not found: 1146 Table 'conc765.FileImageThumbnailPaths' doesn't exist

Theres a thread here about a similar problem
https://www.concrete5.org/community/forums/installation/update-probl...

The suggestion to use mystic/index.php/ccm/system/upgrade
doesn't work for me. I get a "Access Denied" message.

Not sure what else to try and do to get the site going again?
ConcreteOwl replied on at Permalink Reply
ConcreteOwl
What version did you upgrade from and what version did you upgrade to?
What was your upgrade process?
hutman replied on at Permalink Reply
hutman
What version did you upgrade from and what version did you upgrade to? Sometimes things get broken if proper upgrade steps aren't taken.
ConcreteOwl replied on at Permalink Reply
ConcreteOwl
Ha Ha, I just beat you to asking that question...
pxkrunch replied on at Permalink Reply
My ISP has deprecated 5.6, so I copied the site files and performed a SQL DUMP.

I used MAMP to access the site locally, which worked fine and upgraded from
5.7.5.1 ->5-8..2.1 -> 5-8.3.2 -> 5-8.4.5 -> 5-8.5.2

After each version upgrade I logged out and back into the site OK
I had all cache options off.

I then upload the local files & database back to my ISP.

I've used this workflow before to develop a site
stewblack23 replied on at Permalink Reply
stewblack23
Hey pxkrunch

Do you have a live link for the site? Also use your developer tools panel and see if there are any errors in the console panel.
pxkrunch replied on at Permalink Reply
I can see the following error in server logs
[Wed Oct 23 07:37:38.111292 2019] [autoindex:error] [pid 1825962:tid 47881503504128] [client 220.233.182.83:62181] AH01276: Cannot serve directory /home/id/public_html/packages/motif/themes/motif/css/: No matching DirectoryIndex (index.php,index.htm,index.html,index.shtml,index.cgi,default.htm,default.html,lithium.php) found, and server-generated directory index forbidden by Options directive, referer: http://site/


Not sure I understand what's going on here, this is the original unchanged theme from the server?
I also checked permissions on the directories & files
Gondwana replied on at Permalink Reply
Gondwana
Kinda feels like an apache (or equivalent) config error. I think DirectoryIndex is one of its things (in httpd.conf).
ConcreteOwl replied on at Permalink Reply
ConcreteOwl
Try adding these two lines to the top of your .htaccess file
#Alternate default index pages
DirectoryIndex index.php index.html index.htm
pxkrunch replied on at Permalink Reply
Thanks for the suggestion @ConcreteOwl
pxkrunch replied on at Permalink Best Answer Reply
Ok so I finally fixed the issues and the sites are back up.
Most of the problems were database related and seem to be caused during the upgrade scripts.

Errors fixed -
1. Deleting the Caches files fixed the Document Root issue
2. The errors on import "Specified key was too long; max key length is 767 bytes" were caused by the changes made to the databases at some stage during the upgrades, I'm not sure which one. The charset had been changed to utf8mb4 and the collation to utf8mb4_unicode_ci. This causes any Create table command to fail for any definitions of VARCHAR(255) with Innodb databases. I changed the charset back to utf8 and the collate back to utf8_unicode_ci.
3. The last error to fix was "FileImageThumbnailPaths' doesn't exist". When I checked the database it appeared the column name had been changed from Pascal Case to lowercase (why?). Changing this back to Pascal Case in the sql file and reimporting fixed the issue.

Hope this helps someone else.

Thanks to @hutman, @ConcreteOwl and @Gondwana for the suggestions.
ConcreteOwl replied on at Permalink Reply
ConcreteOwl
Well done for sorting it out...
I have marked your post as best answer.