2

Every so often, I get this error in one of the sites I manage:

[16-Dec-2016 17:08:20 America/Detroit] PHP Warning:  require_once(/path/to/site/modules/mod_k2_toolsDShelper.php): failed to open stream: No such file or directory in /path/to/site/modules/mod_k2_tools/mod_k2_tools.php on line 19
[16-Dec-2016 17:08:20 America/Detroit] PHP Fatal error:  require_once(): Failed opening required '/path/to/site/modules/mod_k2_toolsDShelper.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /path/to/site/modules/mod_k2_tools/mod_k2_tools.php on line 19

This error first occurred on September 29 and has occurred many more times in the error_log since. Here is line 19 of mod_k2_tools.php:

require_once (dirname(__FILE__).DS.'helper.php');

Since /path/to/site/modules/mod_k2_toolsDShelper.php DOES NOT exist on the server, I'm guessing the actual path should be /path/to/site/modules/mod_k2_tools/helper.php since that file DOES exist.

What should be the correct reference to this file?


Note: I will pass this info on to the JoomlaWorks team in a bug report if needed.

1

I have changed:

require_once (dirname(__FILE__).DS.'helper.php');

To:

require_once (dirname(__FILE__).'/'.'helper.php');

This is a known bug and an official solution should be given in the next K2 update.

0

If you're running Joomla 3.x, then do the following:

  • Create a defines.php file at the main website directory.
  • Add the following code to it:

    <?php define('DS', '/'); ?>
    

This should solve your problem...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.