Comments (28)
I searched for the issue and most says this is about php.ini file or Apache server config but running php -ini | grep upload_max
indicates that max allowed size is 800MB
from koel.
This is 99.99% somehing your config, which I can't help you debug, unfortunately. With PHP it's both upload_max_filesize
and post_max_size
, for example. Or you might be using a different config.
from koel.
Thank you for your response.
I am running koel using docker-compose, can you please point to the config file I should change ? I am not familiar with PHP, however I tried changing php.ini
, php.ini-development
and php.ini-production
inside docker container and restarted with docker-compose restart
however it is not working.
Edit: running php --ini
in container gives below output...
Loaded Configuration File: /usr/local/etc/php/php.ini
Scan for additional .ini files in: /usr/local/etc/php/conf.d
Additional .ini files parsed: /usr/local/etc/php/conf.d/docker-php-ext-bcmath.ini,
/usr/local/etc/php/conf.d/docker-php-ext-exif.ini,
/usr/local/etc/php/conf.d/docker-php-ext-gd.ini,
/usr/local/etc/php/conf.d/docker-php-ext-pdo_mysql.ini,
/usr/local/etc/php/conf.d/docker-php-ext-pdo_pgsql.ini,
/usr/local/etc/php/conf.d/docker-php-ext-pgsql.ini,
/usr/local/etc/php/conf.d/docker-php-ext-sodium.ini,
/usr/local/etc/php/conf.d/docker-php-ext-zip.ini
from koel.
from koel.
from koel.
So, it appears that .htaccess
was overriding these properties hence Local Value
is 50M
.
Currently I solved it by changing value in .htaccess
file and restarted using docker-compose restart
. Which means once container is destroyed, those changes will be gone.
Do we have any better way for this ? Can we handle it using an environment variable ?
I will be glad to work on it and raise PR once approach is decided.
Thanks.
from koel.
Good catch! Yeah, I think making it configurable with a sensible default would be the best solution. Something like:
// .env.example
MAX_UPLOAD_SIZE = # Max upload size, for example '50M'
// config/koel.php
[
...
'max_upload_size' => env('MAX_UPLOAD_SIZE', '50M'),
...
],
// AppServiceProvider.php::boot()
init_set('upload_max_filesize', config('koel.max_upload_size'));
init_set('post_max_size', config('koel.max_upload_size'));
Would love to receive a PR, of course!
from koel.
Thank you for the code snippets, I just tried to clone the master branch and run the server but unable to get it running.
I have looked through the Developer Documentation, but it just says to run npm run dev
. Can you please give me list of the things I will need to install ? Here is what I have done up-to now...
- Installed PHP
- Installed Composer
- Run
php composer.phar install
- Run
npm run dev
(it gave error about some missing extension which I installed with apt) - Got server running but when accessing
http://localhost:8000/api/ping
it gives below error
SQLSTATE[HY000] [2002] Connection refused (SQL: select * from `personal_access_tokens` where `token` = e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 limit 1)
from koel.
from koel.
from koel.
from koel.
I have never worked with PHP and have familiarity with JavaScript, hence I have not idea how things work here. I will try to get server running.
from koel.
If I use DB_CONNECTION=sqlite
then it gives below error,
SQLSTATE[HY000]: General error: 1 no such table: personal_access_tokens (SQL: select * from "personal_access_tokens" where "token" = e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 limit 1)
Edit: I have also not worked with SQL much.
from koel.
Finally got server running after using sqlite-persistant
as a db and running php artisan migrate
. However what will be the initial user to login ?
from koel.
I tried to do ini_set
but the changes were not shown in phpinfo()
I think it can not be setup from php code as per this answer.
If that's true, can we do it in .htaccess
somehow by retrieving the environment variable and set value ?
from koel.
from koel.
from koel.
I am not sure how it's done or to say where it's configured to use .env.example file during build/installation. Here is what I have understood...
- Create .htaccess.example file and write
upload_max_size
andpost_size_max
rules having value of{ENV:MAX_UPLOAD_SIZE}
- Add it to git.
- Replace it during installation (don't know how)
One thought I am having is that if people write invalid rules in .htaccess.example then will it show error in the same terminal ? Because without familiarity with PHP or apache, it will be little difficult to find what's wrong in the config. In summary I think people can easily shoot their foot in this approach (please correct me if I have misunderstood).
from koel.
from koel.
Makes sense,
So How to implement it ? as I said above ?
from koel.
from koel.
I have
- added
.htaccess.example
besides.env.example
and put "@php -r \"copy('.htaccess.example', './public/.htaccess');\""
command incomposer.json
Anything else todo ?
from koel.
from koel.
No I have not raised PR because I have not tested it locally. What I am wondering is, will this approach work for docker deployment ?
from koel.
from koel.
Yes, I have tested and it updates file.
from koel.
Hi @phanan I have raised PR, please have a look.
from koel.
Solved by #1762
from koel.
Related Issues (20)
- PWA support for webUI HOT 3
- Init struggle
- Playlist sorting not being saved
- Visual bug: Green playlist buttons have lower height HOT 1
- General UX improvement ideas HOT 3
- Not Found: The requested content cannot be found. after using shareable URLs HOT 1
- Automatically scroll to the current playing song HOT 1
- Site not rendering after install HOT 2
- Search songs get 500 HOT 5
- "Failed to start the audio device" error on iOS HOT 1
- Music cannot be scanned normally (invalid file(s)) HOT 1
- Error playing music from web interface HOT 2
- Email Invite not working HOT 2
- Does not work on iPad HOT 1
- Better Media Organization HOT 1
- Add more than a single library
- Improve Documentation for installation for web development HOT 2
- KO player progress bar in Microsoft Edge HOT 3
- Add support for third party S3 providers HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from koel.