mirror of
https://github.com/koel/koel.git
synced 2026-04-25 16:56:02 +03:00
[GH-ISSUE #615] Manually set media_path in MySQL console, afterwards [ErrorException] unserialize(): Error at offset 0 of 28 bytes on php artisan koel:sync #439
Labels
No labels
Authentication
Dependencies
Documentation
Feature Request
Flac
Help Wanted
Installation/Setup
Integration
Mobile
PR Welcome
Pending Release
Performance
Playlist
S3
Search
Sync
[Pri] Low
[Pri] Normal
[Status] Keep Open
[Status] Needs Author Reply
[Status] Needs Review
[Status] Stale
[Status] Will Implement
[Type] Blessed
[Type] Bug
[Type] Duplicate
[Type] Enhancement
[Type] Help Request
[Type] Question
[Type] Task
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/koel-koel#439
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ShenZhouHong on GitHub (Jun 21, 2017).
Original GitHub issue: https://github.com/koel/koel/issues/615
Because attempting to sync from web GUI results in
Unknown error, I tried to sync koel using the console. However, when attempting to runphp artisan koel:syncon the command line, the command complains thatmedia_pathis not set and terminates.Knowing just enough MySQL to get into trouble, I attempted to set the
media_pathvalue manually in the MySQL console. I went to thesettingstable in thekoeldatabase, and set the value ofmedia_pathto'/home/koel/Music/'.Unfortunately, that didn't solve the issue, and I think I broke something else. Perhaps it was not in the right data format? Now, when attempting to run 'php artisan koel:sync', the following output begets:
I definitely think I messed up the data format. @phanan How can I fix this? What would be the MySQL command that I can use to set the path properly in the correct data format? 😸
Many thanks!
P.S: Is there a command line option for specifying the
media_pathon sync? I looked through the docs, and the.envfile, but didn't find any 😢@ShenZhouHong commented on GitHub (Jun 21, 2017):
Update - I found an earlier (working) version of the koel database, and it appears the format is like this:
How can I change the value to use the
s:38format? Is it some sort of weird, Sun-microsystems string? 😨@ShenZhouHong commented on GitHub (Jun 21, 2017):
Here's the comparison between the working MySQL database entry, and the nonfunctional one:
Working
Broken (my current version)
I definitely think the problem is in the
varchar(191value, but I have no idea how to fix it 😭@phanan commented on GitHub (Jun 21, 2017):
For your interest,
s:38means a string with 38 characters. See https://stackoverflow.com/a/14298662.Don't modify the database directly. For now though, you can empty the value and then try again via the admin panel.
@ShenZhouHong commented on GitHub (Jun 21, 2017):
Thank you. I fixed the database by recreating it and running
php artisan koel:init, but once again the original error holds. Attempting to scan/home/koel/music/results inUnknown Error. I can't find anything relevant in Nginx'serror.log, and attempting to sync from the console results in the samemedia_pathproblem that lead me into this mess.@ShenZhouHong commented on GitHub (Jun 21, 2017):
Nevermind. I just invoked
chmod -R 777 /home/koeland it works now. I'll lock down the permissions later.