Closed primapwd closed 6 years ago
Hi! What version of PHP are you using?
I'm using PHP 5.6.12 and CI version 3.1.8
Thanks for report it. I've used some PHP 7 syntax and is not compatible with PHP 5.x. I'll fix that soon :man_facepalming:
Hi, thanks for fixing PHP compatibility issue. I'm just wondering, does this works if I extend CI_Controller into MY_Controller and other controllers extend MY_Controller? Because all my routes always redirect to default_controller whatever route I set on web.php.
It should work, since Luthier-CI retrieves the current framework singleton via &get_instance()
function, no matters what class are using/extending for controllers.
Can you share your custom MY_Controller
and your web.php
route file? I'll try to reproduce the problem here.
Well, maybe I missed something here. I have these two routes inside web.php
.
Route::get('register', function() {
echo "Register Here";
});
Route::get('/', function() {
echo "Welcome";
});
Everytime I visit 'register', it's always showing 'Welcome' instead of 'Register Here'.
It seems to be a problem while setting the current url during Luthier-CI boot
Edit: I've made an update: https://github.com/ingeniasoftware/luthier-ci/commit/dc23400f449e6a6388438c4f9d6c6d01c6361eb1 You can test if that solves the problem by using the 'dev-master' version of the repository:
composer require luthier/luthier "dev-master"
Let me know if that works :+1:
Do you have apache mod rewrite enabled?
Yes, I do. I use .htaccess to remove index.php from url.
What is your 'uri_protocol' value in your config.php file?
This is my config.php
$config['uri_protocol'] = 'REQUEST_URI';
I'll give it a try and let you know if that works. Thanks. :running_man:
I've tried the dev-master
version and it's works out of the box. :grin:
Great! Stable version updated https://github.com/ingeniasoftware/luthier-ci/commit/dc23400f449e6a6388438c4f9d6c6d01c6361eb1
Nice, I'll close this issue then. Thanks, dude. :grin:
Hi, I get the following error:
Any ideas what caused the error?