mescon / Muximux

A lightweight way to manage your HTPC
GNU General Public License v2.0
1.14k stars 82 forks source link

Settings.ini.php error #195

Open Shadow229 opened 4 years ago

Shadow229 commented 4 years ago

Something is changing the settings.ini.php file making muximux not load through localhost.

After refreshing the webpage and muximux not loading I checked the nginx error log and get various errors - some examples below:

2020/10/04 15:55:49 [error] 341#341: *713 FastCGI sent in stderr: "PHP message: PHP Warning: syntax error, unexpected '"' in settings.ini.php on line 71

2020/10/04 15:54:25 [error] 340#340: *670 FastCGI sent in stderr: "PHP message: PHP Warning: syntax error, unexpected BOOL_TRUE in settings.ini.php on line 16

Most of the time its these, with the line in question being different depending on where the change has happened.

for example, this one just happened:

2020/10/04 16:47:35 [error] 340#340: *822 FastCGI sent in stderr: "PHP message: PHP Warning: syntax error, unexpected '"' in settings.ini.php on line 47

when checking in the setting file, it looks like its randomly added an extra start to an object for portainer in there:

`[Plex] name = "Plex" url = "http://localhost:32400/web/index.html" scale = 1 icon = "muximux-plex" color = 1 icon = "muximux-plex" color = "#f9be03" enabled = "true" default = "true"

[Portainer] namefault = "true"

[Portainer] namealhost:9000/#/home" scale = 1 icon = "muximux-important_devices" color = "#1a1bfe" enabled = "true"`

Removing that allows it to work again, but its different things every time. Sometimes its too jumbled to bother working out what should / shouldn't be there so I've just got a working backup of it and keep swapping out it for the one that works - but its annoying having to do this quite frequently when trying to use it.

Searching for the same issue I think it looks like this has been closed before because it can't be replicated - but its definitely an issue for me.

Thanks

Badbabyboyo commented 3 years ago

I've been having the same issue for a while. I'm not a webdev and haven't wanted to put the time in to fixing the problem, so I've come up with a janky workaround that has worked for 6 months or so with no problems. I just made a backup of the working settings.ini.php and created a cron script to overwrite the original file with the backup every so often. I think I made it like 5 or 10 minutes to be honest but I'll check. So far it hasn't caused any problems, the only annoying thing is replacing the backup anytime you want to make permanent changes.

Ryogo-X commented 3 years ago

For me issue is clearly reproduced when multiple request to the muximux is issued in parallel at the same time. In general, idk why settings file is rewritten every time the page is opened - that does not seem like a correct behavior to me.

mescon commented 3 years ago

@Ryogo-Z true - the settings file should only be opened and read on load. If you can make these changes I'd be happy to merge it to Muximux!

josefandersson commented 2 years ago

My settings file suddenly only had this inside of it:

; <?php die('Access denied'); ?>
[0x]
[0] = "androxgh0st"

😅