Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

session_start() error resulting in redirect loop

I'm getting the following PHP errors reported in the PHP error log when initially (auto) logging in - I do have some hackery of the login system elsewhere so that I can get single-sign on with the rest of the website - which may be instrumental in getting a redirect loop so perhaps take that part with a pinch of salt.  But there is still a bug:

[25-Jul-2017 10:03:17 UTC] PHP Warning:  session_start(): Failed to read session data: user (path: D:\Website\php-session) in D:\...\helpdesk\include\class.ostsession.php on line 86
[25-Jul-2017 10:03:17 UTC] PHP Warning:  Declaration of AssignmentForm::render($options) should be compatible with Form::render($staff = true, $title = false, $options = Array) in D:\...\helpdesk\include\class.forms.php on line 4150
[25-Jul-2017 10:03:17 UTC] PHP Warning:  Declaration of TransferForm::render($options) should be compatible with Form::render($staff = true, $title = false, $options = Array) in D:\...\helpdesk\include\class.forms.php on line 4270

Now - this is ACTUALLY using the DB session backend.

The problem is that in class.ostsession.php, DbSessionBackend::read MUST return a string as per the PHP requirements for this function.

If I fix this then osTicket is working again.   BUT I then get the following error in the PHP logs - not sure if it matters:

[25-Jul-2017 10:07:51 UTC] PHP Warning:  Declaration of AssignmentForm::render($options) should be compatible with Form::render($staff = true, $title = false, $options = Array) in D:\...\helpdesk\include\class.forms.php on line 4150
[25-Jul-2017 10:07:51 UTC] PHP Warning:  Declaration of TransferForm::render($options) should be compatible with Form::render($staff = true, $title = false, $options = Array) in D:\...\helpdesk\include\class.forms.php on line 4270
[25-Jul-2017 10:07:52 UTC] PHP Fatal error:  Uncaught ObjectNotUnique: One object was expected; however multiple objects in the database matched the query. In fact, there are 2 matching objects. 
in D:\...\helpdesk\include\class.orm.php:1176

Stack trace:

#0 D:\...\helpdesk\include\class.orm.php(545): QuerySet->one()

#1 D:\...\helpdesk\include\class.search.php(530): VerySimpleModel::lookup(Array)

#2 D:\...\helpdesk\include\class.signal.php(98): MysqlSearchBackend->IndexOldStuff(NULL, Array)

#3 D:\...\helpdesk\scp\autocron.php(69): Signal::send('cron', NULL, Array)

#4 {main}
  thrown in D:\...\helpdesk\include\class.orm.php on line 1176

Would be nice to get rid of those other warnings also.

This is with PHP 7.1

Comments

Sign In or Register to comment.