• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 Help with Server Errors

#1
I keep having the following server errors. They repeat once every minute or so. When I restart apache they seem to go away for a while, but then they come back. Any ideas what might be causing this? The URL requested for the error changes each time. Thanks!

Code:
ErrorException: Undefined index: replace_route - library/XenForo/Route/Filter.php:44
Generated By: Unknown Account, 22 minutes ago

#0 /var/www/vhosts/stratics.com/library/XenForo/Route/Filter.php(44): XenForo_Application::handlePhpError(8, 'Undefined index...', '/var/www/vhosts...', 44, Array)
#1 /var/www/vhosts/stratics.com/library/XenForo/Router.php(72): XenForo_Route_Filter->match('forums/uhall.35...', Object(Zend_Controller_Request_Http), Object(XenForo_Router))
#2 /var/www/vhosts/stratics.com/library/XenForo/Dependencies/Abstract.php(107): XenForo_Router->match(Object(Zend_Controller_Request_Http), NULL)
#3 /var/www/vhosts/stratics.com/library/XenForo/FrontController.php(285): XenForo_Dependencies_Abstract->route(Object(Zend_Controller_Request_Http), NULL)
#4 /var/www/vhosts/stratics.com/library/XenForo/FrontController.php(130): XenForo_FrontController->route()
#5 /var/www/vhosts/stratics.com/index.php(13): XenForo_FrontController->run()
#6 {main}

array(3) {
  ["url"] => string(36) "http://stratics.com/forums/uhall.35/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
Code:
ErrorException: Undefined index: find_route - library/XenForo/Route/Filter.php:44
Generated By: Unknown Account, 23 minutes ago

#0 /var/www/vhosts/stratics.com/library/XenForo/Route/Filter.php(44): XenForo_Application::handlePhpError(8, 'Undefined index...', '/var/www/vhosts...', 44, Array)
#1 /var/www/vhosts/stratics.com/library/XenForo/Router.php(72): XenForo_Route_Filter->match('forums/uhall.35...', Object(Zend_Controller_Request_Http), Object(XenForo_Router))
#2 /var/www/vhosts/stratics.com/library/XenForo/Dependencies/Abstract.php(107): XenForo_Router->match(Object(Zend_Controller_Request_Http), NULL)
#3 /var/www/vhosts/stratics.com/library/XenForo/FrontController.php(285): XenForo_Dependencies_Abstract->route(Object(Zend_Controller_Request_Http), NULL)
#4 /var/www/vhosts/stratics.com/library/XenForo/FrontController.php(130): XenForo_FrontController->route()
#5 /var/www/vhosts/stratics.com/index.php(13): XenForo_FrontController->run()
#6 {main}

array(3) {
  ["url"] => string(36) "http://stratics.com/forums/uhall.35/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
Code:
ErrorException: Undefined index: language_id - library/XenForo/Visitor.php:517
Generated By: Unknown Account, 23 minutes ago

#0 /var/www/vhosts/stratics.com/library/XenForo/Visitor.php(517): XenForo_Application::handlePhpError(8, 'Undefined index...', '/var/www/vhosts...', 517, Array)
#1 /var/www/vhosts/stratics.com/library/XenForo/Visitor.php(471): XenForo_Visitor->setVisitorLanguage(0)
#2 /var/www/vhosts/stratics.com/library/XenForo/Session.php(274): XenForo_Visitor::setup(false, Array)
#3 /var/www/vhosts/stratics.com/library/XenForo/Controller.php(293): XenForo_Session::startPublicSession(Object(Zend_Controller_Request_Http))
#4 /var/www/vhosts/stratics.com/library/XenForo/Controller.php(306): XenForo_Controller->_setupSession('Errornotfound')
#5 /var/www/vhosts/stratics.com/library/XenForo/FrontController.php(346): XenForo_Controller->preDispatch('Errornotfound', 'XenForo_Control...')
#6 /var/www/vhosts/stratics.com/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#7 /var/www/vhosts/stratics.com/index.php(13): XenForo_FrontController->run()
#8 {main}

array(3) {
  ["url"] => string(36) "http://stratics.com/forums/uhall.35/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
Code:
ErrorException: Undefined index: properties - library/XenForo/Dependencies/Public.php:303
Generated By: Unknown Account, 24 minutes ago

#0 /var/www/vhosts/stratics.com/library/XenForo/Dependencies/Public.php(303): XenForo_Application::handlePhpError(8, 'Undefined index...', '/var/www/vhosts...', 303, Array)
#1 /var/www/vhosts/stratics.com/library/XenForo/FrontController.php(576): XenForo_Dependencies_Public->preRenderView(Object(XenForo_ControllerResponse_Error))
#2 /var/www/vhosts/stratics.com/library/XenForo/FrontController.php(158): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_Error), Object(XenForo_ViewRenderer_HtmlPublic), Array)
#3 /var/www/vhosts/stratics.com/index.php(13): XenForo_FrontController->run()
#4 {main}

array(3) {
  ["url"] => string(36) "http://stratics.com/forums/uhall.35/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
Code:
ErrorException: Argument 2 passed to XenForo_Application::mapMerge() must be of the type array, boolean given, called in /var/www/vhosts/stratics.com/library/XenForo/Dependencies/Public.php on line 304 and defined - library/XenForo/Application.php:1172
Generated By: Unknown Account, 24 minutes ago

#0 /var/www/vhosts/stratics.com/library/XenForo/Application.php(1172): XenForo_Application::handlePhpError(4096, 'Argument 2 pass...', '/var/www/vhosts...', 1172, Array)
#1 /var/www/vhosts/stratics.com/library/XenForo/Dependencies/Public.php(304): XenForo_Application::mapMerge(Array, false)
#2 /var/www/vhosts/stratics.com/library/XenForo/FrontController.php(576): XenForo_Dependencies_Public->preRenderView(Object(XenForo_ControllerResponse_Error))
#3 /var/www/vhosts/stratics.com/library/XenForo/FrontController.php(158): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_Error), Object(XenForo_ViewRenderer_HtmlPublic), Array)
#4 /var/www/vhosts/stratics.com/index.php(13): XenForo_FrontController->run()
#5 {main}

array(3) {
  ["url"] => string(36) "http://stratics.com/forums/uhall.35/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 

Mike

XenForo developer
Staff member
#2
I think what you posted here is probably relevant: https://xenforo.com/community/threads/memcache-issues.106591/

I would disable memcache temporarily to see if that makes a difference. If it does, it seems like there are issues reading from your memcache server.

Alternatively, there could be opcode cache corruption happening here. Are you running PHP 5.4 with APC? If so, I would recommend switching to PHP 5.5 (or 5.6) with the built in opcache system.
 
#3
I think what you posted here is probably relevant: https://xenforo.com/community/threads/memcache-issues.106591/

I would disable memcache temporarily to see if that makes a difference. If it does, it seems like there are issues reading from your memcache server.

Alternatively, there could be opcode cache corruption happening here. Are you running PHP 5.4 with APC? If so, I would recommend switching to PHP 5.5 (or 5.6) with the built in opcache system.
I am running 5.4 with Zend Opcache. I tried to upgrade to 5.6, but had issues with conflicts between php-common and php56w-common, among other things. So, I reverted to php 5.4 for simplicity until I could figure out how to upgrade.

I did poke around some more and noticed a couple things:

1. Zend Opcache was fully configured, but not even turned on. I had the client disabled, so I've corrected that.

Code:
Zend OPcache

Opcode Caching => Up and Running
Optimization => Enabled
Startup => OK
Shared memory model => mmap
Cache hits => 0
Cache misses => 0
Used memory => 10935072
Free memory => 123282656
Wasted memory => 0
Interned Strings Used memory => 494248
Interned Strings Free memory => 7894360
Cached scripts => 0
Cached keys => 0
Max keys => 7963
OOM restarts => 0
Hash keys restarts => 0
Manual restarts => 0

Directive => Local Value => Master Value
opcache.blacklist_filename => /etc/php.d/opcache*.blacklist => /etc/php.d/opcache*.blacklist
opcache.consistency_checks => 0 => 0
opcache.dups_fix => Off => Off
opcache.enable => On => On
opcache.enable_cli => On => On
opcache.enable_file_override => Off => Off
opcache.error_log => no value => no value
opcache.fast_shutdown => 1 => 1
opcache.file_update_protection => 2 => 2
opcache.force_restart_timeout => 180 => 180
opcache.inherited_hack => On => On
opcache.interned_strings_buffer => 8 => 8
opcache.load_comments => 1 => 1
opcache.log_verbosity_level => 1 => 1
opcache.max_accelerated_files => 4000 => 4000
opcache.max_file_size => 0 => 0
opcache.max_wasted_percentage => 5 => 5
opcache.memory_consumption => 128 => 128
opcache.optimization_level => 0xFFFFFFFF => 0xFFFFFFFF
opcache.preferred_memory_model => no value => no value
opcache.protect_memory => 0 => 0
opcache.restrict_api => no value => no value
opcache.revalidate_freq => 240 => 240
opcache.revalidate_path => Off => Off
opcache.save_comments => 1 => 1
opcache.use_cwd => On => On
opcache.validate_timestamps => On => On
2. The zend_extension location was incorrect. I needed to point it to my usr directory.

Code:
; Enable Zend OPcache extension module
zend_extension=/usr/lib64/php/modules/opcache.so

; Determines if Zend OPCache is enabled
opcache.enable=1

; Determines if Zend OPCache is enabled for the CLI version of PHP
opcache.enable_cli=1

; The OPcache shared memory storage size.
opcache.memory_consumption=128

; The amount of memory for interned strings in Mbytes.
opcache.interned_strings_buffer=8

; The maximum number of keys (scripts) in the OPcache hash table.
; Only numbers between 200 and 100000 are allowed.
opcache.max_accelerated_files=4000

; The maximum percentage of "wasted" memory until a restart is scheduled.
;opcache.max_wasted_percentage=5

; When this directive is enabled, the OPcache appends the current working
; directory to the script key, thus eliminating possible collisions between
; files with the same name (basename). Disabling the directive improves
; performance, but may break existing applications.
;opcache.use_cwd=1

; When disabled, you must reset the OPcache manually or restart the
; webserver for changes to the filesystem to take effect.
;opcache.validate_timestamps=1

; How often (in seconds) to check file timestamps for changes to the shared
; memory storage allocation. ("1" means validate once per second, but only
; once per request. "0" means always validate)
opcache.revalidate_freq=240
 
Last edited: