404 pages with latest CI version |
Hello,
Yesterday i've added the 3.1 version to the root path of the website from someone I help. The old version 2.0.2 was broken after the webhost upgraded to php7.0 (no way to switch to old version, unlike my webhost, so no quick fix). I've moved the old directories (appliction/system/etc and used the new ones. I compared the old config settings to make sure it's correct. But I get 404 pages from CI itself. I have no clue what I have to change to make it work. I have an index.html with the complete naviagation structure/links as it should be working temporarily. When i want to open www.website.com/index.php it gives 404 error When i want to open www.website.com/index.php/welcome/ (as default) it gives 404 error When i want to open www.website.com/CATEGORY/product-title (the way the links used to work) it gives 404 error I don't think the .htacces is faulty, but here is it anyway: Code: #AddHandler x-httpd-php53 .php When i view the error_log of the host I dont find error (makes sence, as the 404 is from CI itself). Some other config settings: Code: $config['index_page'] = ''; So basically the two questions are: how do i solve the 404 errors? And how can i make the links work correctly? From the top navigation the old website linked to: www.website.com/page/title from the sidebar the old website categorized the products in blocks and linked every product to: www.website.com/category/product Thanks in advance! EDIT: I disabled the show_404 function here: Code: // Did we reset the $e404 flag? If so, set the rsegments, starting from index 1 Which gives the output in browser: Code: An uncaught Exception was encountered Is it because i Disabled the 404 function, or is this the error which wasn't shown because of the show_404? Addition: It seems i still had to copy some files and had to fill the base_url, it was pointing to an IP address, not the correct URL. After some database errors (config was empty) i'm again stuck at new errors: Code: A PHP Error was encountered This one might not be a big deal for now, but the next one is: Code: An uncaught Exception was encountered When i Google this particular problem, it seems people solved it by going from from ci_load_library to ci_load_class...
Sorry for my nagging, but i'm still lost why it isn't working:
Code: $e404 = FALSE; I did find out the $class at this point is empty, so it always falls in the $e404=TRUE. How/where can I find out what the cause is?
"So basically the two questions are: how do i solve the 404 errors? And how can i make the links work correctly?"
application/controller/Products.php dosen't exist. The problem are in your third_party folder. Filename: /home/xxx/domains/website.nl/public_html/application/third_party/MX/Loader.php Line Number: 158 and Line Number: 141 Can you show what it are trying to do? Never heard of that function before. (01-08-2020, 01:30 PM)jreklund Wrote: "So basically the two questions are: how do i solve the 404 errors? And how can i make the links work correctly?"As I checked what the configs/routes do, I found this line in the old setup: $route['default_controller'] = 'producten'; And then there should be the file 'producten.php' under controllers, but I can't find it anywhere, not in new and old version of the website. The previous developer added this. So my confusion is getting bigger: how can the old website work w/h this file and now it can't? When I change it to: $route['default_controller'] = 'welcome'; Then it still is giving the 404 (empty $class issue as stated in my previous reply) |
Welcome Guest, Not a member yet? Register Sign In |