Welcome Guest, Not a member yet? Register   Sign In
Codeigniter show warning
#1

I have installed codeigniter4 yesterday. When I pointed my browser to ci4.dev, I am getting some warning message i.e

Quote:( ! ) Warning: include_once(C:\wamp64\www\ci4\system\Debug/ImageException.php): failed to open stream: No such file or directory in C:\wamp64\www\ci4\system\Autoloader\Autoloader.php on line 153
Call Stack
# Time Memory Function Location
1 0.0014 363416 {main}( ) ...\index.php:0
2 0.0028 378824 require( 'C:\wamp64\www\ci4\system\bootstrap.php' ) ...\index.php:27
3 0.0157 869240 CodeIgniter\CodeIgniter->initialize( ) ...\bootstrap.php:118
4 0.0157 869256 CodeIgniter\Config\Services::exceptions( ) ...\CodeIgniter.php:158
5 0.0157 869296 CodeIgniter\Config\Services::getSharedInstance( ) ...\Services.php:175
6 0.0157 869696 CodeIgniter\Config\Services::exceptions( ) ...\Services.php:672
7 0.0157 869696 spl_autoload_call ( ) ...\Services.php:183
8 0.0157 869808 CodeIgniter\Autoloader\Autoloader->CodeIgniter\Autoloader\{closure}( ) ...\Services.php:183

( ! ) Warning: include_once(): Failed opening 'C:\wamp64\www\ci4\system\Debug/ImageException.php' for inclusion (include_path='.;C:\php\pear') in C:\wamp64\www\ci4\system\Autoloader\Autoloader.php on line 153
Call Stack
# Time Memory Function Location
1 0.0014 363416 {main}( ) ...\index.php:0
2 0.0028 378824 require( 'C:\wamp64\www\ci4\system\bootstrap.php' ) ...\index.php:27
3 0.0157 869240 CodeIgniter\CodeIgniter->initialize( ) ...\bootstrap.php:118
4 0.0157 869256 CodeIgniter\Config\Services::exceptions( ) ...\CodeIgniter.php:158
5 0.0157 869296 CodeIgniter\Config\Services::getSharedInstance( ) ...\Services.php:175
6 0.0157 869696 CodeIgniter\Config\Services::exceptions( ) ...\Services.php:672
7 0.0157 869696 spl_autoload_call ( ) ...\Services.php:183
8 0.0157 869808 CodeIgniter\Autoloader\Autoloader->CodeIgniter\Autoloader\{closure}( ) ...\Services.php:183
I have no idea with other framework technique. I am beginner and my framework starting base is CI.3. Currently I am using wamp server with php7.
Reply
#2

Did you set your base_url in ./application/config/app.php

Did you set your paths in ./application/config/paths.php

In XAMPP and phpStorm I have to map the public directory or it shows errors.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#3

(05-31-2017, 04:20 AM)InsiteFX Wrote: Did you set your base_url in ./application/config/app.php

Did you set your paths in ./application/config/paths.php

In XAMPP and phpStorm I have to map the public directory or it shows errors.

yes I set the baseurl like this
PHP Code:
$baseURL 'http://ci4.dev/'

Don't understand about path. I saw there is a public directory which already set to 

PHP Code:
public $publicDirectory 'public'

 I am using wamp and root set to 'public' directory. Server name in virtual host is 'ci4.dev' and path set to 'c:/wamp64/www/ci4/public'
Reply
#4

A couple of other users have reported this over at GitHub also, and both of them on Windows. It's definitely on my list of things to check into soon, but I'm super swamped with a deadline on a project right now so available time is pretty limited. Will try to look into it before the week is over, though. But - if someone running Windows wants to step through code and help debug, that would awesome. Smile
Reply
#5

(05-31-2017, 06:40 AM)kilishan Wrote: A couple of other users have reported this over at GitHub also, and both of them on Windows. It's definitely on my list of things to check into soon, but I'm super swamped with a deadline on a project right now so available time is pretty limited. Will try to look into it before the week is over, though. But - if someone running Windows wants to step through code and help debug, that would awesome. Smile

Thanks for your reply. waiting for your update. Smile
Reply
#6

when I var_dump in system\Autoloader.php at line number 152 before this line include_once $config[$class]; I got some line on my browser like this

Code:
C:\wamp64\www\ci4\system\Autoloader\Autoloader.php:152:string 'C:\wamp64\www\ci4\system\CodeIgniter.php' (length=40)
C:\wamp64\www\ci4\system\Autoloader\Autoloader.php:152:string 'C:\wamp64\www\ci4\system\Config/BaseConfig.php' (length=46)
C:\wamp64\www\ci4\system\Autoloader\Autoloader.php:152:string 'C:\wamp64\www\ci4\system\Debug/ImageException.php' (length=49)

( ! ) Warning: include_once(C:\wamp64\www\ci4\system\Debug/ImageException.php): failed to open stream: No such file or directory in C:\wamp64\www\ci4\system\Autoloader\Autoloader.php on line 153
Call Stack
#    Time    Memory    Function    Location
1    0.0009    363384    {main}( )    ...\index.php:0
2    0.0021    378792    require( 'C:\wamp64\www\ci4\system\bootstrap.php' )    ...\index.php:27
3    0.0115    869696    CodeIgniter\CodeIgniter->initialize( )    ...\bootstrap.php:118
4    0.0115    869712    CodeIgniter\Config\Services::exceptions( )    ...\CodeIgniter.php:158
5    0.0115    869752    CodeIgniter\Config\Services::getSharedInstance( )    ...\Services.php:175
6    0.0115    870152    CodeIgniter\Config\Services::exceptions( )    ...\Services.php:672
7    0.0115    870152    spl_autoload_call ( )    ...\Services.php:183
8    0.0115    870264    CodeIgniter\Autoloader\Autoloader->CodeIgniter\Autoloader\{closure}( )    ...\Services.php:183

( ! ) Warning: include_once(): Failed opening 'C:\wamp64\www\ci4\system\Debug/ImageException.php' for inclusion (include_path='.;C:\php\pear') in C:\wamp64\www\ci4\system\Autoloader\Autoloader.php on line 153
Call Stack
#    Time    Memory    Function    Location
1    0.0009    363384    {main}( )    ...\index.php:0
2    0.0021    378792    require( 'C:\wamp64\www\ci4\system\bootstrap.php' )    ...\index.php:27
3    0.0115    869696    CodeIgniter\CodeIgniter->initialize( )    ...\bootstrap.php:118
4    0.0115    869712    CodeIgniter\Config\Services::exceptions( )    ...\CodeIgniter.php:158
5    0.0115    869752    CodeIgniter\Config\Services::getSharedInstance( )    ...\Services.php:175
6    0.0115    870152    CodeIgniter\Config\Services::exceptions( )    ...\Services.php:672
7    0.0115    870152    spl_autoload_call ( )    ...\Services.php:183
8    0.0115    870264    CodeIgniter\Autoloader\Autoloader->CodeIgniter\Autoloader\{closure}( )    ...\Services.php:183
C:\wamp64\www\ci4\system\Autoloader\Autoloader.php:152:string 'C:\wamp64\www\ci4\system\Debug/Timer.php' (length=40)
C:\wamp64\www\ci4\system\Autoloader\Autoloader.php:152:string 'C:\wamp64\www\ci4\system\HTTP/IncomingRequest.php' (length=49)
C:\wamp64\www\ci4\system\Autoloader\Autoloader.php:152:string 'C:\wamp64\www\ci4\system\HTTP/Request.php' (length=41)
C:\wamp64\www\ci4\system\Autoloader\Autoloader.php:152:string 'C:\wamp64\www\ci4\system\HTTP/Message.php' (length=41)
C:\wamp64\www\ci4\system\Autoloader\Autoloader.php:152:string 'C:\wamp64\www\ci4\system\HTTP/RequestInterface.php' (length=50)
C:\wamp64\www\ci4\system\Autoloader\Autoloader.php:152:string 'C:\wamp64\www\ci4\system\HTTP/URI.php' (length=37)
C:\wamp64\www\ci4\system\Autoloader\Autoloader.php:152:string 'C:\wamp64\www\ci4\system\HTTP/Response.php' (length=42)
C:\wamp64\www\ci4\system\Autoloader\Autoloader.php:152:string 'C:\wamp64\www\ci4\system\HTTP/ResponseInterface.php' (length=51)
C:\wamp64\www\ci4\system\Autoloader\Autoloader.php:152:string 'C:\wamp64\www\ci4\system\Cache/CacheFactory.php' (length=47)
C:\wamp64\www\ci4\system\Autoloader\Autoloader.php:152:string 'C:\wamp64\www\ci4\system\Cache/Handlers/FileHandler.php' (length=55)
C:\wamp64\www\ci4\system\Autoloader\Autoloader.php:152:string 'C:\wamp64\www\ci4\system\Cache/CacheInterface.php' (length=49)
C:\wamp64\www\ci4\system\Autoloader\Autoloader.php:152:string 'C:\wamp64\www\ci4\system\Router/RouteCollection.php' (length=51)
C:\wamp64\www\ci4\system\Autoloader\Autoloader.php:152:string 'C:\wamp64\www\ci4\system\Router/RouteCollectionInterface.php' (length=60)
C:\wamp64\www\ci4\system\Autoloader\Autoloader.php:152:string 'C:\wamp64\www\ci4\system\Router/Router.php' (length=42)
C:\wamp64\www\ci4\system\Autoloader\Autoloader.php:152:string 'C:\wamp64\www\ci4\system\Router/RouterInterface.php' (length=51)
C:\wamp64\www\ci4\system\Autoloader\Autoloader.php:152:string 'C:\wamp64\www\ci4\system\Controller.php' (length=39)
C:\wamp64\www\ci4\system\Autoloader\Autoloader.php:152:string 'C:\wamp64\www\ci4\system\Log/Logger.php' (length=39)
C:\wamp64\www\ci4\system\Autoloader\Autoloader.php:152:string 'C:\wamp64\www\ci4\system\ThirdParty/PSR/Log/LoggerInterface.php' (length=63)
C:\wamp64\www\ci4\system\Autoloader\Autoloader.php:152:string 'C:\wamp64\www\ci4\system\Events/Events.php' (length=42)
C:\wamp64\www\ci4\system\Autoloader\Autoloader.php:152:string 'C:\wamp64\www\ci4\system\View/View.php' (length=38)
C:\wamp64\www\ci4\system\Autoloader\Autoloader.php:152:string 'C:\wamp64\www\ci4\system\View/RendererInterface.php' (length=51)
Welcome to CodeIgniter
version 4.0-dev

The page you are looking at is being generated dynamically by CodeIgniter.

If you would like to edit this page you'll find it located at:

application/Views/welcome_message.php
The corresponding controller for this page is found at:

application/Controllers/Home.php
If you are exploring CodeIgniter for the very first time, you should start by reading the (in progress) User Guide.

Page rendered in 0.0284 seconds. Environment: production

When I searched the file i.e 
Quote:system\Debug/ImageException.php



I saw there are no file with this name. the file ImageException.php is present in system\Images\Exceptions directory and I also searched all file in ci4 directory with the text ImageException.php, I got a result that the filename with the path is present in system\Config\AutoloadConfig.php file. Here is the line-

Quote:C:\wamp64\www\ci4\system\Config\AutoloadConfig.php (1 hit)

Line 142: 'CodeIgniter\Debug\Exceptions'                  => BASEPATH.'Debug/ImageException.php',


May be I am wrong. But hope it helps you. Thanks Smile
Reply
#7

(This post was last modified: 05-31-2017, 11:27 AM by InsiteFX. Edit Reason: Added environment part )

@kilishan

Strange, I am running Windows 10 Pro with XAMPP, PHP 7.1.4 and using phpStorm newest and it runs fine here.

I also use vhost for mapping.

It could be that they did not add the paths to the Windows Environment, I posted how to do
this awhile back.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB