ingeniasoftware / luthier-ci

Improved routing, middleware support, authentication tools and more for CodeIgniter 3 framework
https://luthier.ingenia.me/ci/en/
MIT License
151 stars 39 forks source link

Can't Installation #19

Closed ahmadrifaiii closed 6 years ago

ahmadrifaiii commented 6 years ago

i have a problem ` A PHP Error was encountered

Severity: Error

Message: Class 'Luthier\Hook' not found

Filename: config/hooks.php

Line Number: 5

Backtrace: ` image

andersonsalas commented 6 years ago

Hi @83rifai!

Seems to be a problem with the composer autoload. Please provide the following information:

  1. PHP / OS / CodeIgniter version
  2. Value of $config['composer_autoload'] variable (in application/config/config.php file)
maniix123 commented 6 years ago

@83rifai just set $config['composer_autoload'] = 'vendor/autoload.php'; at application\config\config.php. The documentation doesn't even state that. It just says to set it into TRUE

andersonsalas commented 6 years ago

@putanginamogiegy ~set the $config['composer_autoload'] to TRUE has the same behaviour that the 'vendor/autoload.php' string because~ that's the default vendor folder location, unless you're doing something custom:

https://github.com/bcit-ci/CodeIgniter/blob/master/system/core/CodeIgniter.php#L168-L175

EDIT: I've done some tests and the value vendor/autoload.php will NOT work because CodeIgniter expects an absolute path here. You can prefix the string with the APPPATH constant, of course, but it's the same what using the TRUE value:

// Wrong, must be an absolute path:
$config['composer_autoload'] =  'vendor/autoload.php';  
// OK, absolute path:
$config['composer_autoload'] =  APPPATH . '/vendor/autoload.php';  
// The same of above:
$config['composer_autoload'] =  TRUE; 
masoud005 commented 5 years ago

i have the same problem checked what you said above,all are correct but the same error appears phpversion: 5.6.31 ci_version: 3.0-dev

also tested on CI 3.1.10 version

andersonsalas commented 5 years ago

i have the same problem checked what you said above,all are correct but the same error appears phpversion: 5.6.31 ci_version: 3.0-dev also tested on CI 3.1.10 version

Hi @masoud005! 😄

Please open a new issue in order to bring you better support. This is a pretty old one.

Thanks for using Luthier CI.