Migration Problems, Blank Screen of Death

Permalink
I'm migrating a site from shared to dedicated hosting at Joyent. I've copied over the database and directory structure, changed the /config/site.php file to reflect the new environment, and created a user with appropriate permissions on the new MySQL database so the app can connect. I also went over the php.ini file at the new server to make sure everything was looking right.

But, at this point, all I'm getting when I visit the new site is a blank page. I figure that the app is running into a PHP or MySQL error somewhere along the way and not displaying it. In hindsight, I probably should've changed the debug level from Production to Development in the dashboard before I migrated the app, but I didn't. Now that I can't get to the dashboard at my new install, does anyone know what settings to change to get errors to output?

I also did not disable/clear the cache or disable pretty URLs pre-flight, which I probably should have. If anyone has any experience or tips on what to try to get something to work, please let me know.

Benji
 
mkly replied on at Permalink Best Answer Reply
mkly
That would be in the "Config" table.

Set SITE_DEBUG_LEVEL to 1
Benji replied on at Permalink Reply
Benji
That works. Looks like I am having cache problems, though:
Fatal error: Uncaught exception 'ADODB_Exception' with message 'mysql error: [-32000: Cache write error] in ...

I got the homepage to load once (turned out some of my database was missing), but I still can't reach the dashboard, and am just getting more blank screens since (but at least I'm getting errors output now). So, any tips on disabling the cache without dashboard access?
Benji replied on at Permalink Reply
Benji
I changed the ENABLE_CACHE row in the Config table to 0, but am still getting the same errors, so obviously that didn't take care of it. Any thoughts?
Benji replied on at Permalink Reply
Benji
And now I've deleted all files from /files/cache/ as well. Still the error message won't budge.
Benji replied on at Permalink Reply
Benji
Alright, so now that I'm thoroughly talking to myself……I changed permissions on /files and /files/cache to 777 and now I'm getting pages to load (duh, write error). I was afraid it was a permissions issue -- methinks it's a case of the wrong owner for me. For some reason when I uploaded my website (as a tarball) and un-gzipped it, the server assigned "jill" as the owner of all my files, instead of the user whose directory I uploaded it to. The joys of Joyent.

So now I have to figure out how to change owners on my thousands of files.
mkly replied on at Permalink Reply
mkly
I don't know if you have this sorted by now, but...
Depending on the needs of the webserver in an ssh session

is your friend here.
Benji replied on at Permalink Reply
Benji
Thanks, you're awesome. That was the last problem before I went to bed, but I'll be diving into it again this afternoon, so I'll look into that. I figured I was something like that, but I've never had to chmod the ownership for a whole site worth of files.
mkly replied on at Permalink Reply
mkly
You probably don't have chmod the whole thing. Just any directories that need server write access. Like the cache directory.

see this
http://www.concrete5.org/documentation/installation/file-directory-...

and the discussion thread the bottom(specifically @mnkras's comment)
Benji replied on at Permalink Reply
Benji
Ah, yes, I remember an earlier version of that doc page. I saw Mnkras's comment you pointed out there…I had my config/site.php set to 644, so good to know that others do the same.

So I was happily chown'ing and chgrp'ing my files and folders, and I was about to chown my whole web root recursively, when I accidentally hit the 'return' key after typing:
chown -Rv tms /

eh heh…… Of course I was intending to chown /home/tms/web/public, but instead I got to watch the verbose output of my entire machine being chown'd to tms. Doh!

I tried changing ownership back to root where applicable, but I'm afraid there were some other users in there, like sys and bin and stuff. My database has disappeared (probably because I lost permission to read it). So basically I'm screwed until Joyent bails me out.
mkly replied on at Permalink Reply
mkly
Or I guess to be more verbose

If you can't use a MySQL database administrative panel then you can also do this.

Place this somewhere in your site php and view your page
$db = Loader::db();
$db->Execute("UPDATE `Config` SET `cfValue`=1 WHERE `cfKey`='SITE_DEBUG_LEVEL'");


Then remove it after you view it and you should be in dev mode.