Forums | Mahara Community

Support /
Upgrade appeared to work, but page returns a 500 error


24 December 2016, 5:16

I attempted to upgrade from 16.04.1 working site to 16.10.1. I received a message that the upgrade was successful, however when I actually go to the site, I am getting a 500 server error. I've gone into the server logs and found several errors. Any help interpreting these will be greatly appreciated. Thanks! Ellen

[23-Dec-2016 08:48:33 ] [WAR] 1f (lib/errors.php:508) An exception was thrown of class RuntimeException.

[23-Dec-2016 08:48:33 ] [WAR] 1f (lib/errors.php:508) THIS IS BAD and should be changed to something extending MaharaException,

[23-Dec-2016 08:48:33 ] [WAR] 1f (lib/errors.php:508) unless the exception is from a third party library.

[23-Dec-2016 08:48:33 ] [WAR] 1f (lib/errors.php:508) Original trace follows

[23-Dec-2016 08:48:33 ] [WAR] 1f (auth/session.php:552) Directory name must not be empty.

[23-Dec-2016 08:48:33 ] Call stack (most recent first):

[23-Dec-2016 08:48:33 ] * RecursiveDirectoryIterator->__construct("") at /home1/visible1/public_html/mahara/auth/session.php:552

[23-Dec-2016 08:48:33 ] * remove_all_sessions() at /home1/visible1/public_html/mahara/admin/index.php:92

[23-Dec-2016 08:48:33 ] * close_site_submit(object(Pieform), array(size 3)) at Unknown:0

[23-Dec-2016 08:48:33 ] * call_user_func_array("close_site_submit", array(size 2)) at /home1/visible1/public_html/mahara/lib/pieforms/pieform.php:540

[23-Dec-2016 08:48:33 ] * Pieform->__construct(array(size 3)) at /home1/visible1/public_html/mahara/lib/pieforms/pieform.php:161

[23-Dec-2016 08:48:33 ] * Pieform::process(array(size 3)) at /home1/visible1/public_html/mahara/lib/mahara.php:4500

[23-Dec-2016 08:48:33 ] * pieform(array(size 3)) at /home1/visible1/public_html/mahara/admin/index.php:61 

Robert Lyon's profile picture
Posts: 749

28 December 2016, 8:35

Hi Ellen

Hmm, that error [23-Dec-2016 08:48:33 ] * RecursiveDirectoryIterator->__construct("") at /home1/visible1/public_html/mahara/auth/session.php:552 means that your 'sessionpath' is not set correctly.

But the strange thing is it appears on line 552 in version 16.04.1 (what you were upgrading from) and on line 577 in 16.10.1 (what you were upgrading to).

So chances are the reason you are getting 500 error is most likely related to Mahara session storage.

Are you using memcache for sessions or files in dataroot? is the place you are writing sessions to writable/active?

Have you set the dataroot/sessionpath correctly?

Cheers

Robert

 

04 January 2017, 11:03

Hi Robert,

Thanks for the reply. It's being saved to the dataroot. I set the permissions for the dataroot to 777 (they were 755) in the hopes that would help. The dataroot is located outside of the publichtml folder. I checked the config files for both Mahara versions and they are exactly the same. I checked the error log and now the log shows the following:

[WAR] 56 (lib/web.php:3322) Headers already sent when redirect() was called (output started in on line 0
Call stack (most recent first):
* redirect() at /home1/visible1/public_html/mahara/init.php:399
* require("/home1/visible1/public_html/mahara/init.php") at /home1/visible1/public_html/mahara/lib/cron.php:17


[WAR] 58 (lib/web.php:3322) Headers already sent when redirect() was called (output started in on line 0
[Call stack (most recent first):
* redirect() at /home1/visible1/public_html/mahara/init.php:399
* require("/home1/visible1/public_html/mahara/init.php") at /home1/visible1/public_html/mahara/lib/cron.php:17

[WAR] 8f (lib/web.php:3322) Headers already sent when redirect() was called (output started in on line 0
Call stack (most recent first):
* redirect() at /home1/visible1/public_html/mahara/init.php:399
* require("/home1/visible1/public_html/mahara/init.php") at /home1/visible1/public_html/mahara/lib/cron.php:17


[WAR] 38 (lib/web.php:3322) Headers already sent when redirect() was called (output started in on line 0
Call stack (most recent first):
* redirect() at /home1/visible1/public_html/mahara/init.php:399
* require("/home1/visible1/public_html/mahara/init.php") at /home1/visible1/public_html/mahara/lib/cron.php:17

[WAR] 73 (lib/web.php:3322) Headers already sent when redirect() was called (output started in on line 0
Call stack (most recent first):
* redirect() at /home1/visible1/public_html/mahara/init.php:399
* require("/home1/visible1/public_html/mahara/init.php") at /home1/visible1/public_html/mahara/lib/cron.php:17

[WAR] 96 (lib/web.php:3322) Headers already sent when redirect() was called (output started in on line 0
Call stack (most recent first):
* redirect() at /home1/visible1/public_html/mahara/init.php:399
 * require("/home1/visible1/public_html/mahara/init.php") at /home1/visible1/public_html/mahara/lib/cron.php:17

Any help is greatly appreciated.

 

Thanks,

Ellen

Robert Lyon's profile picture
Posts: 749

06 January 2017, 11:53

Hi Ellen,

The line: redirect() at /home1/visible1/public_html/mahara/init.php:399

is failing because it believes headers have already been sent.

Headers already sent when redirect() was called (output started in on line 0)

It tries calling htdocs/lib/cron.php, which in turn calls htdocs/init.php and that checks to see if an upgrade is needed and that is where things are failing

Are you able to log into your Mahara? if so can you check if an upgrade is needed to be run?

Cheers

Robert

 

07 January 2017, 10:18

Hi Robert,

Thanks so much for the reply. When I go to upgrade, using the upgrade url, I get the following message: Nothing to upgrade. You are fully up to date.  I am unable to login and get to the admin panel however, as I get a 500 error message.

 

Ellen

 

07 January 2017, 10:49

I removed the previous installation and replaced it with the latest version of Mahara--16.10.2--and now the site is working well. I can't explain it, but I'm happy! Thank you.

6 results