This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

dserdtseva63257
dserdtseva63257

Hello, I moved the site to October CMS for hosting. I click on the button media files gives this error.And on the local server everything is fine. Writes that the error here is throw new ApplicationException(Lang:: get('system::lang. media.invalid_path', compact ('path')));

mjauvin
mjauvin

Not enough information to help. Please explain in more details with code snippets.

dserdtseva63257
dserdtseva63257

My guess is that the path is incorrectly specified when you click on this button Here's what it shows in the console in the browser Failed to load resource: the server responded with a status of 500 ()

Here is the full error page. ERROR We're sorry, but an unhandled error occurred. Please see the details below.

/home/d78838/public_html/vpc-college.ru/modules/system/classes/MediaLibrary.php line 494

TYPE Undefined

EXCEPTION October\Rain\Exception\ApplicationException

488 489 490 491 492 493 494 495 496 497 498 499 500 preg_quote('=', '/'), preg_quote("'", '/'), preg_quote('&', '/'), ];

    if (!preg_match('/^[' . implode('', $regexWhitelist) . ']+$/iu', $path)) {
        throw new ApplicationException(Lang::get('system::lang.media.invalid_path', compact('path')));
    }

    $regexDirectorySeparator = preg_quote('/', '#');
    $regexDot = preg_quote('.', '#');
    $regex = [
        // Beginning of path

STACK TRACE

#   CALLED CODE DOCUMENT    LINE
53  System\Classes\MediaLibrary::validatePath() ~/modules/system/classes/MediaLibrary.php   538
52  System\Classes\MediaLibrary->getPathUrl()   ~/modules/system/classes/MediaLibrary.php   633
51  System\Classes\MediaLibrary->initLibraryItem()  ~/modules/system/classes/MediaLibrary.php   683
50  System\Classes\MediaLibrary->scanFolderContents(…)  ~/modules/system/classes/MediaLibrary.php   134
49  System\Classes\MediaLibrary->listFolderContents(…)  ~/modules/backend/widgets/MediaManager.php  868
48  Backend\Widgets\MediaManager->listFolderItems(…)    ~/modules/backend/widgets/MediaManager.php  838
47  Backend\Widgets\MediaManager->prepareVars() ~/modules/backend/widgets/MediaManager.php  111
46  Backend\Widgets\MediaManager->render()  ~/modules/backend/controllers/media/index.htm   3
45  include(…)  ~/modules/system/traits/ViewMaker.php   247
44  Backend\Classes\Controller->makeFileContents(…) ~/modules/system/traits/ViewMaker.php   109
43  Backend\Classes\Controller->makeView(…) ~/modules/backend/classes/Controller.php    419
42  Backend\Classes\Controller->execPageAction(…)   ~/modules/backend/classes/Controller.php    296
41  Backend\Classes\Controller->run(…)  ~/modules/backend/classes/BackendController.php 165
40  Backend\Classes\BackendController->run(…)       
39  call_user_func_array(…) ~/vendor/laravel/framework/src/Illuminate/Routing/Controller.php    54
38  Illuminate\Routing\Controller->callAction(…)    ~/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php  45
37  Illuminate\Routing\ControllerDispatcher->dispatch(…)    ~/vendor/laravel/framework/src/Illuminate/Routing/Route.php 212
36  Illuminate\Routing\Route->runController()   ~/vendor/laravel/framework/src/Illuminate/Routing/Route.php 169
35  Illuminate\Routing\Route->run() ~/vendor/laravel/framework/src/Illuminate/Routing/Router.php    658
34  Illuminate\Routing\Router->Illuminate\Routing\{closure}(…)  ~/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php  30
33  Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(…)    ~/modules/backend/classes/BackendController.php 68
32  Backend\Classes\BackendController->Backend\Classes\{closure}(…) ~/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php 131
31  Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(…)  ~/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php  53
30  Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(…)    ~/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php 41
29  Illuminate\Routing\Middleware\SubstituteBindings->handle(…) ~/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php 149
28  Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(…)  ~/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php  53
27  Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(…)    ~/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php    49
26  Illuminate\View\Middleware\ShareErrorsFromSession->handle(…)    ~/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php 149
25  Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(…)  ~/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php  53
24  Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(…)    ~/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php   63
23  Illuminate\Session\Middleware\StartSession->handle(…)   ~/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php 149
22  Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(…)  ~/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php  53
21  Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(…)    ~/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php  37
20  Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(…)  ~/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php 149
19  Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(…)  ~/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php  53
18  Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(…)    ~/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php  68
17  Illuminate\Cookie\Middleware\EncryptCookies->handle(…)  ~/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php 149
16  Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(…)  ~/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php  53
15  Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(…)    ~/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php 102
14  Illuminate\Pipeline\Pipeline->then(…)   ~/vendor/laravel/framework/src/Illuminate/Routing/Router.php    660
13  Illuminate\Routing\Router->runRouteWithinStack(…)   ~/vendor/laravel/framework/src/Illuminate/Routing/Router.php    635
12  Illuminate\Routing\Router->runRoute(…)  ~/vendor/laravel/framework/src/Illuminate/Routing/Router.php    601
11  Illuminate\Routing\Router->dispatchToRoute(…)   ~/vendor/october/rain/src/Router/CoreRouter.php 20
10  October\Rain\Router\CoreRouter->dispatch(…) ~/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php    176
9   Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(…)  ~/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php  30
8   Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(…)    ~/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php    46
7   Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(…)    ~/vendor/october/rain/src/Foundation/Http/Middleware/CheckForMaintenanceMode.php    25
6   October\Rain\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(…)  ~/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php 149
5   Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(…)  ~/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php  53
4   Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(…)    ~/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php 102
3   Illuminate\Pipeline\Pipeline->then(…)   ~/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php    151
2   Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(…)  ~/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php    116
1   Illuminate\Foundation\Http\Kernel->handle(…)    ~/index.php 43

Last updated

mjauvin
mjauvin

please describe precisely what leads to this error, this is really not clear.

dserdtseva63257
dserdtseva63257

I translate from a translator, so there may be mistakes and misunderstandings,but I will try to explain in more detail.In general, I moved my site to hosting, everything works fine,but I started clicking on the media files button in my October CMS personal account.And I get this error.But if I run the same site, but on a local server, the media files button works.

dserdtseva63257
dserdtseva63257
mjauvin
mjauvin

It looks like you installed OctoberCMS in a sub-folder of your DOCUMENT ROOT.

Try adding the following line in your .htaccess file:

RewriteBase vpc-college.ru
dserdtseva63257
dserdtseva63257

I added but everything broke :) internal server error The server encountered an internal error or an incorrect configuration and was unable to fulfill your request.

Please contact the server administrator at webmaster@vpc-college-ru.d78838.hostru10.fornex.host to inform them of the time when this error occurred and the actions you performed immediately before this error occurred.

For more information about this error can be found in the server error log.

In addition, when trying to use ErrorDocument to process the request, an error 500 Internal Server Error was detected.

dserdtseva63257
dserdtseva63257
dserdtseva63257

I can drop the code .htaccess file if required.

1-11 of 11

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.