Old directory still remains

Asked

Viewed 28 times

0

I took a project made in CakePHP from an old server and played on a new one, but the old server path seems to remain in the script. I played all the files in the new and when I enter the URL, it returns me:

Warning: include(/home/upimobco/public_html/lib/Cake/Error/ErrorHandler.php) [function.include]: failed to open stream: No such file or directory in /home/daint250/public_html/sitedainterage.com.br/upimob/lib/Cake/Core/App.php on line 546

Warning: include(/home/upimobco/public_html/lib/Cake/Error/ErrorHandler.php) [function.include]: failed to open stream: No such file or directory in /home/daint250/public_html/sitedainterage.com.br/upimob/lib/Cake/Core/App.php on line 546

Warning: include() [function.include]: Failed opening '/home/upimobco/public_html/lib/Cake/Error/ErrorHandler.php' for inclusion (include_path='/home/daint250/public_html/sitedainterage.com.br/upimob/lib:.:/usr/lib/php:/usr/local/lib/php') in /home/daint250/public_html/sitedainterage.com.br/upimob/lib/Cake/Core/App.php on line 546

Warning: include(/home/upimobco/public_html/lib/Cake/Error/ErrorHandler.php) [function.include]: failed to open stream: No such file or directory in /home/daint250/public_html/sitedainterage.com.br/upimob/lib/Cake/Core/App.php on line 546

Warning: include(/home/upimobco/public_html/lib/Cake/Error/ErrorHandler.php) [function.include]: failed to open stream: No such file or directory in /home/daint250/public_html/sitedainterage.com.br/upimob/lib/Cake/Core/App.php on line 546

Warning: include() [function.include]: Failed opening '/home/upimobco/public_html/lib/Cake/Error/ErrorHandler.php' for inclusion (include_path='/home/daint250/public_html/sitedainterage.com.br/upimob/lib:.:/usr/lib/php:/usr/local/lib/php') in /home/daint250/public_html/sitedainterage.com.br/upimob/lib/Cake/Core/App.php on line 546

Warning: set_error_handler() expects the argument (ErrorHandler::handleError) to be a valid callback in /home/daint250/public_html/sitedainterage.com.br/upimob/lib/Cake/Core/Configure.php on line 442

Warning: include(/home/upimobco/public_html/lib/Cake/Error/ErrorHandler.php) [function.include]: failed to open stream: No such file or directory in /home/daint250/public_html/sitedainterage.com.br/upimob/lib/Cake/Core/App.php on line 546

Warning: include(/home/upimobco/public_html/lib/Cake/Error/ErrorHandler.php) [function.include]: failed to open stream: No such file or directory in /home/daint250/public_html/sitedainterage.com.br/upimob/lib/Cake/Core/App.php on line 546

Warning: include() [function.include]: Failed opening '/home/upimobco/public_html/lib/Cake/Error/ErrorHandler.php' for inclusion (include_path='/home/daint250/public_html/sitedainterage.com.br/upimob/lib:.:/usr/lib/php:/usr/local/lib/php') in /home/daint250/public_html/sitedainterage.com.br/upimob/lib/Cake/Core/App.php on line 546

Warning: include(/home/upimobco/public_html/lib/Cake/Error/ErrorHandler.php) [function.include]: failed to open stream: No such file or directory in /home/daint250/public_html/sitedainterage.com.br/upimob/lib/Cake/Core/App.php on line 546

Warning: include(/home/upimobco/public_html/lib/Cake/Error/ErrorHandler.php) [function.include]: failed to open stream: No such file or directory in /home/daint250/public_html/sitedainterage.com.br/upimob/lib/Cake/Core/App.php on line 546

Warning: include() [function.include]: Failed opening '/home/upimobco/public_html/lib/Cake/Error/ErrorHandler.php' for inclusion (include_path='/home/daint250/public_html/sitedainterage.com.br/upimob/lib:.:/usr/lib/php:/usr/local/lib/php') in /home/daint250/public_html/sitedainterage.com.br/upimob/lib/Cake/Core/App.php on line 546

Warning: set_exception_handler() expects the argument (ErrorHandler::handleException) to be a valid callback in /home/daint250/public_html/sitedainterage.com.br/upimob/lib/Cake/Core/Configure.php on line 445

Warning: include(/home/upimobco/public_html/lib/Cake/Log/CakeLog.php) [function.include]: failed to open stream: No such file or directory in /home/daint250/public_html/sitedainterage.com.br/upimob/lib/Cake/Core/App.php on line 546

Warning: include(/home/upimobco/public_html/lib/Cake/Log/CakeLog.php) [function.include]: failed to open stream: No such file or directory in /home/daint250/public_html/sitedainterage.com.br/upimob/lib/Cake/Core/App.php on line 546

Warning: include() [function.include]: Failed opening '/home/upimobco/public_html/lib/Cake/Log/CakeLog.php' for inclusion (include_path='/home/daint250/public_html/sitedainterage.com.br/upimob/lib:.:/usr/lib/php:/usr/local/lib/php') in /home/daint250/public_html/sitedainterage.com.br/upimob/lib/Cake/Core/App.php on line 546

Fatal error: Class 'CakeLog' not found in /home/daint250/public_html/sitedainterage.com.br/upimob/app/Config/bootstrap.php on line 113

That directory /home/upimobco/public_html is from the old server. Today the path is /public_html/upimob (is in that folder inside the new server, all files).

I don’t know about Cake so I don’t know where this directory is.

1 answer

0

In the settings,

app/config/app.default.php

You’ll have something like

'App' => [
        'namespace' => 'App',
        'encoding' => env('APP_ENCODING', 'UTF-8'),
        'defaultLocale' => env('APP_DEFAULT_LOCALE', 'en_US'),
        'base' => false,
        'dir' => 'src',
        'webroot' => 'webroot',
        'wwwRoot' => WWW_ROOT,

....

You just need to check the index wwwRoot. Usually has the constant WWW_ROOT.

Then look where the constant is set WWW_ROOT and set the new path.

Is usually in the index.php.

Something like define('WWW_ROOT', '/o/path/antigo/deve/estar/aqui/');

  • In the folder app/Config no app.default.php file ;/

  • The Folder app/ is a default generic name. Your project may be using another name. Just look up WWW_ROOT which you should solve. Use a text editor like Notepad++ to search multiple files.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.