ankitpokhrel / tus-php

πŸš€ A pure PHP server and client for the tus resumable upload protocol v1.0.0

Home Page:https://tus.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deploy tus-php on laravel and apache server

sebasegovia01 opened this issue Β· comments

Problem:
I have a problem when passing the code that runs locally with xampp, to a test server with apache. In local, the protocol works perfectly with the path: http://127.0.0.1:8000/tus ,but in apache server i don't know how to deploy this, in test server i have: https://myserverdomain.com:8000/tus and give me the next error:

image

This is my implementation of tus-php (it is exactly the same as the documentation) (working in local environment):

https://github.com/ankitpokhrel/tus-php/wiki/Laravel-&-Lumen-Integration

I just change the folder where the files are stored and im not using redis

TusServiceProvider.php:

image

I'm using in composer:
ankitpokhrel/tus-php v2.1.2
laravel/framework v7.30.4

In npm and laravel-mix:
tus-js-client@2.3.0

Please if you can help me guys to deploy this on the server I would appreciate it a lot πŸ™πŸ™

commented

Hi @sebasegovia01, I see ERR_CONNECTION_TIMED_OUT error in the snapshot which typically means there is something wrong with your network connection or your server is timing out while trying to process the request. Please check your server logs to get a hint on what is causing the issue.

Problem fixed, that was the problem:

production.ERROR: mkdir(): Permission denied {"userId":120,"exception":"[object] (ErrorException(code: 0): mkdir(): Permission denied at /var/www/html/smart_traffic/vendor/ankitpokhrel/tus-php/src/Cache/FileStore.php:88)
[stacktrace]

I grant the permissions to that folder and that's it working πŸ’―

@sebasegovia01 Glad you resolved it πŸŽ‰

I had the same problem and solved it also by giving write permission to vendor/ankitpokhrel folder in my laravel project. But I don't feel good with that. Is there an option to set the cache-folder to laravels storage cache?