Skip to content

Bug: php spark Call to undefined function CodeIgniter\Autoloader\get_filenames() #2439

Description

@waga

Describe the bug
Running command in Linux terminal
php spark

cause this message:

CodeIgniter CLI Tool - Version 4.0.0-rc.3 - Server-Time: 2019-12-05 08:47:31am

An uncaught Exception was encountered

Type: Error
Message: Call to undefined function CodeIgniter\Autoloader\get_filenames()
Filename: /home/[additional-path]/public_html/system/Autoloader/FileLocator.php
Line Number: 377

CodeIgniter 4 version
4.0.0-rc.3

Expected behavior, and steps to reproduce if appropriate
Running command in Windows cause no errors

Context
cat /etc/lsb-release

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.6 LTS"

php -v

PHP 7.3.3-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Mar 7 2019 20:31:26) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.3, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.3-1+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by
Zend Technologies

Suggestion
Looking in system/Common.php inside helper function,
at line 621

$path = $loader->locateFile($filename, 'Helpers');

and 635

$paths = $loader->search('Helpers/' . $filename);

"Helpers" path with uppercase, but in file system folder is lowercased "helpers",
linux is case sensitive so fast fix could be replace
'Helpers' with 'helpers' and 'Helpres/' with 'helpers/' (that work for me)
or to change directory.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugVerified issues on the current code behavior or pull requests that will fix them

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions