-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File more than 50Mb size gets failed to upload #1759
Comments
I searched for the issue and most says this is about php.ini file or Apache server config but running |
This is 99.99% somehing your config, which I can't help you debug, unfortunately. With PHP it's both |
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 Edit: running
|
Try putting phpinfo() in your index.php file, which should print a big
table of all information you need, including the ini file in use. Then
check the settings for the values I said above.
…On Thu, Apr 11, 2024 at 15:22 ChaitanyaPTank ***@***.***> wrote:
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.
—
Reply to this email directly, view it on GitHub
<#1759 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB5O3UW52ZJNMU6NF2RYMTDY42FBPAVCNFSM6AAAAABF2UNJEOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBZGY4DIMZXGA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
So, it appears that Currently I solved it by changing value in 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. |
Good catch! Yeah, I think making it configurable with a sensible default would be the best solution. Something like:
// 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! |
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
|
Have you configured a database?
Am So., 14. Apr. 2024 um 17:46 Uhr schrieb ChaitanyaPTank <
***@***.***>:
… 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...
1. Installed PHP
2. Installed Composer
3. Run php composer.phar install
4. Run npm run dev (it gave error about some missing extension which I
installed with apt)
5. 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)
—
Reply to this email directly, view it on GitHub
<#1759 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB5O3UTXNPXPOL65JVPIWP3Y5KQG3AVCNFSM6AAAAABF2UNJEOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJUGEYDGMBQGY>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Ok will check on how to configure db in project.
…On Sun, 14 Apr, 2024, 9:31 pm Phan An, ***@***.***> wrote:
Have you configured a database?
Am So., 14. Apr. 2024 um 17:46 Uhr schrieb ChaitanyaPTank <
***@***.***>:
> 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...
>
> 1. Installed PHP
> 2. Installed Composer
> 3. Run php composer.phar install
> 4. Run npm run dev (it gave error about some missing extension which I
> installed with apt)
> 5. 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)
>
> —
> Reply to this email directly, view it on GitHub
> <#1759 (comment)>, or
> unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/AB5O3UTXNPXPOL65JVPIWP3Y5KQG3AVCNFSM6AAAAABF2UNJEOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJUGEYDGMBQGY>
> .
> You are receiving this because you commented.Message ID:
> ***@***.***>
>
—
Reply to this email directly, view it on GitHub
<#1759 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/APJVNTAUEKFXVLGF6SXS3FTY5KR67AVCNFSM6AAAAABF2UNJEOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJUGEYDMNZZGQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
For development you can use SQLite. Actually for this feature you'd only
need an in-memory one and let the tests handle everything.
Am So., 14. Apr. 2024 um 18:05 Uhr schrieb ChaitanyaPTank <
***@***.***>:
… Ok will check on how to configure db in project.
On Sun, 14 Apr, 2024, 9:31 pm Phan An, ***@***.***> wrote:
> Have you configured a database?
>
> Am So., 14. Apr. 2024 um 17:46 Uhr schrieb ChaitanyaPTank <
> ***@***.***>:
>
> > 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...
> >
> > 1. Installed PHP
> > 2. Installed Composer
> > 3. Run php composer.phar install
> > 4. Run npm run dev (it gave error about some missing extension which I
> > installed with apt)
> > 5. 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)
> >
> > —
> > Reply to this email directly, view it on GitHub
> > <#1759 (comment)>,
or
> > unsubscribe
> > <
>
https://github.com/notifications/unsubscribe-auth/AB5O3UTXNPXPOL65JVPIWP3Y5KQG3AVCNFSM6AAAAABF2UNJEOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJUGEYDGMBQGY>
>
> > .
> > You are receiving this because you commented.Message ID:
> > ***@***.***>
> >
>
> —
> Reply to this email directly, view it on GitHub
> <#1759 (comment)>, or
> unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/APJVNTAUEKFXVLGF6SXS3FTY5KR67AVCNFSM6AAAAABF2UNJEOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJUGEYDMNZZGQ>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
—
Reply to this email directly, view it on GitHub
<#1759 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB5O3UVLLUI7CP5IOIVVDILY5KSMRAVCNFSM6AAAAABF2UNJEOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJUGEYDONZVGA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
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. |
If I use
Edit: I have also not worked with SQL much. |
Finally got server running after using |
I tried to do If that's true, can we do it in |
Oh true, I forgot about the fact that some ini config can't be set via
ini_set.
Am So., 14. Apr. 2024 um 21:23 Uhr schrieb ChaitanyaPTank <
***@***.***>:
… 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
<https://stackoverflow.com/a/13442343>.
If that's true, can we do it in .htaccess somehow by retrieving the
environment variable and set value ?
—
Reply to this email directly, view it on GitHub
<#1759 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB5O3URSJ2P4HMNEQZHHCZDY5LJUTAVCNFSM6AAAAABF2UNJEOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJUGE3DANZQGY>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Maybe a better way is to make .htacess opt-in (ie. make it
.htaccess.example and copy it into .htaccess during installation, the way
.env is atm). Then we can git track only the .example file.
…On Sun, Apr 14, 2024 at 22:34 An Phan ***@***.***> wrote:
Oh true, I forgot about the fact that some ini config can't be set via
ini_set.
Am So., 14. Apr. 2024 um 21:23 Uhr schrieb ChaitanyaPTank <
***@***.***>:
> 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
> <https://stackoverflow.com/a/13442343>.
>
> If that's true, can we do it in .htaccess somehow by retrieving the
> environment variable and set value ?
>
> —
> Reply to this email directly, view it on GitHub
> <#1759 (comment)>, or
> unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AB5O3URSJ2P4HMNEQZHHCZDY5LJUTAVCNFSM6AAAAABF2UNJEOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJUGE3DANZQGY>
> .
> You are receiving this because you commented.Message ID:
> ***@***.***>
>
|
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...
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). |
.htaccess errors won't show in the terminal, but I wouldn't be concerned
about it. If someone modifies the config, they're expected to know what
they're doing.
Am Mo., 15. Apr. 2024 um 12:00 Uhr schrieb ChaitanyaPTank <
***@***.***>:
… 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...
1. Create .htaccess.example file and write upload_max_size and
post_size_max rules having value of {ENV:MAX_UPLOAD_SIZE}
2. Add it to git.
3. 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).
—
Reply to this email directly, view it on GitHub
<#1759 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB5O3UUSFZPSKTDT3WWP5TTY5OQKFAVCNFSM6AAAAABF2UNJEOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJWGQZTGNJSHE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Makes sense, So How to implement it ? as I said above ? |
Look at composer.json, "post-install-cmd" section.
Am Mo., 15. Apr. 2024 um 14:12 Uhr schrieb ChaitanyaPTank <
***@***.***>:
… Makes sense,
So How to implement it ? as I said above ?
—
Reply to this email directly, view it on GitHub
<#1759 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB5O3UTOKYOPVBMIXEDIJSDY5O73NAVCNFSM6AAAAABF2UNJEOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJWGY4TANZYHA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I have
Anything else todo ? |
If you see the file gets copied during installation (or simply composer
install) then you've done it right :) Is there a PR somewhere?
Am Di., 23. Apr. 2024 um 09:24 Uhr schrieb ChaitanyaPTank <
***@***.***>:
… I have added .htaccess.example besides .env.example and put ***@***.*** -r
\"copy('.htaccess.example', './public/.htaccess');\"" command in
composer.json.
Anything else todo ?
—
Reply to this email directly, view it on GitHub
<#1759 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB5O3UWKR42AS46DGJVVXF3Y6YEDNAVCNFSM6AAAAABF2UNJEOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANZRGYYDQOBTGY>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
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 ? |
Yes, it does. This command should be triggered during composer install,
which is a step in deployment.
Am Di., 23. Apr. 2024 um 10:52 Uhr schrieb ChaitanyaPTank <
***@***.***>:
… 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 ?
—
Reply to this email directly, view it on GitHub
<#1759 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB5O3URRDX5UVB2IX2RFR23Y6YOMXAVCNFSM6AAAAABF2UNJEOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANZRG43DKMZQHA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Yes, I have tested and it updates file. |
Hi @phanan I have raised PR, please have a look. |
Solved by #1762 |
Describe the bug
Upload fails for file size more than 50MB.
To reproduce
Steps to reproduce the behavior:
Expected behavior
Media should get uploaded successfully.
Screenshots
![image](https://private-user-images.githubusercontent.com/64181964/320227860-8efae6a4-cc3b-444a-b5b5-e00f6f77f5f5.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE1MTg1NjcsIm5iZiI6MTcyMTUxODI2NywicGF0aCI6Ii82NDE4MTk2NC8zMjAyMjc4NjAtOGVmYWU2YTQtY2MzYi00NDRhLWI1YjUtZTAwZjZmNzdmNWY1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzIwVDIzMzEwN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWEzNzkwNDFlZmEyZDg2MzhiNTU1YTQzNmVhMjZmNGI3MmEyMzA4MzVmN2E4MzBmNTU1NWU4NWUyZDFlZjQ4MjAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.M1hTJUw6bMfxGoeUTdYLvARPMlDlBRALXs0Ae1kxQEI)
![image](https://private-user-images.githubusercontent.com/64181964/320227880-dca97443-68c0-4aff-a5c1-1803333beac9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE1MTg1NjcsIm5iZiI6MTcyMTUxODI2NywicGF0aCI6Ii82NDE4MTk2NC8zMjAyMjc4ODAtZGNhOTc0NDMtNjhjMC00YWZmLWE1YzEtMTgwMzMzM2JlYWM5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzIwVDIzMzEwN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTRlYmYxN2M1M2YwNzBiNGY2MjQzYzBmMmZkOTgwOTU4MjJjNzgxODQ5ODZkMzFmNjEwM2UzYmIxMmI4MjY0OWQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.ppTGSqNY-gEVrozSLLW1TTkPvMbjR0BePBDw5Y94b7Y)
Environment
Additional context
Logs...
The text was updated successfully, but these errors were encountered: