Jump to content
evanmcd

Install on new server ends with 500 error

Recommended Posts

Hi,

I've just tried installing PW on a remote server (have installed only on my local server until now) and finding 500 error on every page except the index page.

The site/assets directory has the standard folders, but there's nothing showing up in sessions or logs.  I've double checked and both are writable.  The cache folder has two files in it.

Any idea what might be going on?

Thanks.

- Evan

Share this post


Link to post
Share on other sites

Edit your /site/config.php and change the line that has $config->debug = false; to be true. Then you may get something more descriptive than a 500 error.

Check that the /.htaccess file is there, and is the correct one for ProcessWire. Very often when migrating a site, it's easy to miss the .htaccess file and end up with one that was previously on the server. This is the first thing I would check.

You mentioned that your index page works? Are you seeing the proper homepage for your site? If so, that's good and that would rule out a database issue. Are you able to access /processwire/ ?

Share this post


Link to post
Share on other sites

Hi Ryan,

Thanks for the quick reply.  I should have mentioned that I did try that earlier, but didn't end up getting anything more descriptive.

Not sure if this matters, but I am running on Rackspace Cloud Sites.  I've installed other CMSes (WordPress) without issue, so I'd be surprised if it had something to do with that.

Share this post


Link to post
Share on other sites

Check that your server actually supports the .htaccess file. Type "alejkfagjkaelgjk" or something at the beginning of it and save. If you don't get a 500 error on your homepage, then your Apache is not configured to use .htaccess–let me know if that's the case, and I'll tell you how to fix.

Do you have SSH access to the server? You might want to do this, just in case some permissions were lost in the transfer:

chmod -R og+rw /site/assets

The ProcessWire installer can identify most potential compatibility problems at a server. It would be good to download a new copy of PW and install it in a subdirectory there, just to see if it finds any issues with the PHP version, htaccess support, missing drivers, etc. You don't actually need to do the installation, you just need to have a look at the first screen where it performs a system check. This will most likely reveal what the issue is.

Share this post


Link to post
Share on other sites

Tried that and got the 500 error on the home page. 

This did start out as a fresh install, so I've gone through the server checks with nothing failing.  The home page that's shown is the default one post install.  Assuming that needs DB access as well, yeah?

I don't have SSH access into the server, but have triple checked everything in the assets directory to confirm write access.

I'm gonna try another fresh install into another location on the server and will let you know...

Thanks again for your help.

Share this post


Link to post
Share on other sites

Could I get a look at your phpinfo()? Paste this into a file called test.php and then PM me the URL:

<?php phpinfo(); 

One more question, is the installation that's failing installed to the domain root or a subdirectory? If it's in a subdirectory, paste in here what you've got in the .htaccess of the parent (non-PW) directory.

Share this post


Link to post
Share on other sites

It's installing in the root dir.  Just PM'd you the link to server info.

I'm installing right from a pull of the github repo.  Would that make a difference?

Share this post


Link to post
Share on other sites

I took a look at your PHPinfo and it seems to look okay. At first I thought I found something in your configure command with '--disable-json', but then noticed that JSON support is still there, so apparently that's not it. Though I'm not sure I understand that discrepancy. The only other things I noticed were that 32M is pretty low for memory_limit. I would bump that up to at least 64M or 128M. I don't think that's the problem here, but I do think it could be a problem at some point. Though if it's easy enough for you to change, it would be worth a shot. The last thing I noticed was that there are just a whole lot of extras in this PHP install. There are more PHP add-ons in here than I think I've ever seen before, from various caches to other things I'm not familiar with. Doubtful that any of those are the issue, but just an observation that we may come back to if nothing else turns up.

I'm not sure what to tell you to try next. But if you would like, I do believe I could figure it out if I could get in through FTP or SSH and do some old fashioned debugging to determine where it's getting caught. If you would like me to do that, just PM me the info needed to get in, and I'll let you know what I find.

Share this post


Link to post
Share on other sites

OK.  Yeah, not surprised that it's a complex install.  I'm sure the folks at Rackspace have optimized the heck out of it.

I've just PM'd the info.

Thanks again for the help.  Great of you to help out.

- Evan

Share this post


Link to post
Share on other sites

Thanks for the FTP access. I found out what the issue was. Your server needed this part of the .htaccess file uncommented:

# RewriteBase /

Once I uncommented that (by removing the '#') it started working. Please let me know if you run into any more issues.

  • Like 2

Share this post


Link to post
Share on other sites

Oh my gosh, that is fantastic news.  Thanks so much for figuring it out. 

This will be my first production rollout of a PW site, with another one in the works.  Planning to write a module for the next one which I will happily share once it's ready.  its a simple vote up/down widget.

Thanks again Ryan.

  • Like 1

Share this post


Link to post
Share on other sites

This one was easy to get fixed. :) Once I saw the 500 error page was from Apache and not PW, I knew it had to be something in the htaccess file. I've not had to use the "RewriteBase /" before, but knew there were some situations where it was necessary–glad we found one.

Good to hear you are doing a rollout of a new PW site. Be sure to post in the Showcase when you launch. Your module idea sounds like a great one–I'll be glad to help when the time comes, just let me know.

  • Like 1

Share this post


Link to post
Share on other sites

Thanks for the FTP access. I found out what the issue was. Your server needed this part of the .htaccess file uncommented:

# RewriteBase /

Once I uncommented that (by removing the '#') it started working. Please let me know if you run into any more issues.

Hey Ryan! That saved my day, thx!

I got the same 500 on a server of german hoster 1und1 - if any other "Kraut" has the same "bratwurst" problem. :)

  • Like 2

Share this post


Link to post
Share on other sites

Hey Ryan! That saved my day, thx!

I got the same 500 on a server of german hoster 1und1 - if any other "Kraut" has the same "bratwurst" problem. :)

The same with Domainfactory (http://df.eu)

  • Like 2

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...