TechnicPack / TechnicSolder

PHP web app that brings differential updates to the Technic Launcher and Technic Platform
https://docs.solder.io/
Other
169 stars 167 forks source link

Application Error - No such file or directory #618

Closed Crunkstar closed 2 years ago

Crunkstar commented 7 years ago

I set up a solder server and everything is working fine except adding a Modpack, then I'll always get this error: "md5_file(/resources/default/icon.png): failed to open stream: No such file or directory"

I hope someone can help me with it and if it's a configuration fault I'm sorry for submitting it here.

SLemons13 commented 7 years ago

Have you checked file permissions for your public folder? Make sure your web server has read access to Solder's files.

Crunkstar commented 7 years ago

I already checked file permissions and ownership.

SLemons13 commented 7 years ago

Does "public/resources/default" exist and match these contents? Out of curiosity, if you append "resources/default/logo.png" at the end of your Solder URL, are you able to view the file? capture

skwerlman commented 7 years ago

it looks like you've entered one of the paths wrong, as it's looking for /resources/default/icon.png and not /path/to/solder/resources/default/icon.png I'm an idiot, ignore me

Crunkstar commented 7 years ago

Yes, it does have the same content and I can access it with the URL.

skwerlman commented 7 years ago

As a note, this is technically a dupe of #397, but that issue lacks a useful solution

Crunkstar commented 7 years ago

I know that but as #397 doesn't have a solution that would work for me and I rarely use GitHub I didn't know another way to submit my issue.

GenPage commented 7 years ago

The file URL is wrong. The most likely reason is that "public_path()" method is failing.

e.g. https://github.com/TechnicPack/TechnicSolder/blob/ded49a4baf5fb0abfa31cb9b776f4cbde95dc1eb/app/controllers/ModpackController.php#L194

As to why it is failing, I have no idea. I've never heard of that method failing. Have you checked your application logs in app/storage/logs

Crunkstar commented 7 years ago

Heres what the log outputs, I hope you can help me with that.

Stack trace:
#0 [internal function]: Illuminate\Exception\Handler->handleError(2, 'md5_file(/resou...', '/var/www/vhosts...', 194, Array)
#1 /var/www/vhosts/<domain>/solder/app/controllers/ModpackController.php(194): md5_file('/resources/defa...')
#2 [internal function]: ModpackController->postCreate()
#3 /var/www/vhosts/<domain>/solder/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(231): call_user_func_array(Array, Array)
#4 /var/www/vhosts/<domain>/solder/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(93): Illuminate\Routing\Controller->callAction('postCreate', Array)
#5 /var/www/vhosts/<domain>/solder/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(62): Illuminate\Routing\ControllerDispatcher->call(Object(ModpackController), Object(Illuminate\Routing\Route), 'postCreate')
#6 /var/www/vhosts/<domain>/solder/vendor/laravel/framework/src/Illuminate/Routing/Router.php(967): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'ModpackControll...', 'postCreate')
#7 [internal function]: Illuminate\Routing\Router->Illuminate\Routing\{closure}()
#8 /var/www/vhosts/<domain>/solder/vendor/laravel/framework/src/Illuminate/Routing/Route.php(109): call_user_func_array(Object(Closure), Array)
#9 /var/www/vhosts/<domain>/solder/vendor/laravel/framework/src/Illuminate/Routing/Router.php(1033): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request))
#10 /var/www/vhosts/<domain>/solder/vendor/laravel/framework/src/Illuminate/Routing/Router.php(1001): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#11 /var/www/vhosts/<domain>/solder/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(781): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#12 /var/www/vhosts/<domain>/solder/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(745): Illuminate\Foundation\Application->dispatch(Object(Illuminate\Http\Request))
#13 /var/www/vhosts/<domain>/solder/vendor/laravel/framework/src/Illuminate/Session/Middleware.php(72): Illuminate\Foundation\Application->handle(Object(Illuminate\Http\Request), 1, true)
#14 /var/www/vhosts/<domain>/solder/vendor/laravel/framework/src/Illuminate/Cookie/Queue.php(47): Illuminate\Session\Middleware->handle(Object(Illuminate\Http\Request), 1, true)
#15 /var/www/vhosts/<domain>/solder/vendor/laravel/framework/src/Illuminate/Cookie/Guard.php(51): Illuminate\Cookie\Queue->handle(Object(Illuminate\Http\Request), 1, true)
#16 /var/www/vhosts/<domain>/solder/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Illuminate\Cookie\Guard->handle(Object(Illuminate\Http\Request), 1, true)
#17 /var/www/vhosts/<domain>/solder/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(641): Stack\StackedHttpKernel->handle(Object(Illuminate\Http\Request))
#18 /var/www/vhosts/<domain>/solder/web/index.php(49): Illuminate\Foundation\Application->run()
#19 {main} [] []
piretek commented 4 years ago

I know that this is an old issue, but solution for me was to check if the directory is correct in bootstrap/paths.php file.

In line 29 , there is this this setting:

'public' => __DIR__.'/../public',

As my public folder is higher than the solder app folder location (in public_html), then I just needed to modify it to:

'public' => __DIR__.'/../../public_html',

Hope, this will help someone :)

Pyker commented 2 years ago

Closing this since modpack art is no longer in Solder.