Welcome Guest, Not a member yet? Register   Sign In
Errors In Code
#8

(08-21-2017, 07:00 PM)kilishan Wrote:
(08-21-2017, 05:39 AM)SDavisworth Wrote: Hello all... Last week I was getting "Fatal error: Cannot use Config\Services as Services because the name is already in use in..." was advised as follows: we've found that PHP versions under 7.0.15 (especially on Windows) have a problem. Upgrade your PHP version and try again.

I upgraded to PHP 7.1.8 and the error was resolved. I've been following the tutorial posted at https://bcit-ci.github.io/CodeIgniter4/t...pages.html but seem to get "404 - File Not Found Controller or its method is not found" no matter what I do. I've kept everything as downloaded apart from editing my baseURL as prescribed and implemented the tutorial controllers and views etc.

I then thought to try the "News" tutorial with pretty much the same results. No matter what i "Tweak" i can't get the code to work

I was wondering why I'm getting this. .... any suggestions? and could it possibly be caused by PHP version being untested at V7.1.8?

Apologies if I've posted to the incorrect forum

I'm starting to take a look at the tutorial to get it current again. While there are some capitalization inconsistencies with the view files, the biggest thing is that it isn't currently finding controllers without a namespace it looks like. If you add namespace App\Controllers; to the top of the controllers they should work.

Thanks for response... when following tutorial and going to "http://mysite:8080/index.php/pages/view" I was expecting to see my "Home" page wrapped in my header and footer, but I got 404... 

When adding "namespace App\Controllers;" I get blank page but when viewing source I see html in there that should be displaying... all about errors ... I think associated to the "Debug Bar" I see in Chrome... however when going to "http://mysite:8080/index.php/pages/view/home" I do see home... this is contrary to instructions in the Tutorial as I expected to see view() method was defaulted to $pages = 'home'... or am I missing something?

Once again thanks for efforts
Reply


Messages In This Thread
Errors In Code - by SDavisworth - 08-21-2017, 05:39 AM
RE: Errors In Code - by InsiteFX - 08-21-2017, 08:40 AM
RE: Errors In Code - by SDavisworth - 08-21-2017, 09:40 PM
RE: Errors In Code - by InsiteFX - 08-22-2017, 04:26 PM
RE: Errors In Code - by scalla - 08-21-2017, 09:58 AM
RE: Errors In Code - by ubiray - 08-21-2017, 10:54 AM
RE: Errors In Code - by kilishan - 08-21-2017, 11:36 AM
RE: Errors In Code - by kilishan - 08-21-2017, 07:00 PM
RE: Errors In Code - by SDavisworth - 08-21-2017, 10:01 PM



Theme © iAndrew 2016 - Forum software by © MyBB