Problem with jsonconfig.php #72
Replies: 12 comments 1 reply
-
LordRalex wrote at Jan 8 2016 18:00:35 UTC: Provide the full error that is being shown, because it sounds like you did not run the installer, but just installed our files. |
Beta Was this translation helpful? Give feedback.
-
Erry215 wrote at Jan 8 2016 18:00:35 UTC: http://i.imgur.com/yd66ytR.png There is only this on the page |
Beta Was this translation helpful? Give feedback.
-
Erry215 wrote at Jan 8 2016 18:00:35 UTC: I changed it with this: https://github.com/PufferPanel/PufferPanel/blob/master/src/core/config/jsonconfig.php Now I have: Fatal error: Call to undefined function PufferPanel\Core\Config\json_decode() in /srv/pufferpanel/src/core/config/jsonconfig.php on line 59 Line 59: $this->config = json_decode(file_get_contents(BASE_DIR.$path), $array); |
Beta Was this translation helpful? Give feedback.
-
LordRalex wrote at Jan 8 2016 18:00:35 UTC: You should not be touching any of the files. By doing so, you will break more things than it will resolve. Something changed on the system since it lasted worked, and it appears that your files are now not-in-sync with what should be there. |
Beta Was this translation helpful? Give feedback.
-
Erry215 wrote at Jan 8 2016 18:00:35 UTC: I have got a backup of this file but, nothing changed. No one couldn't touch my files and I didn't it. So, what's the problem? |
Beta Was this translation helpful? Give feedback.
-
LordRalex wrote at Jan 8 2016 18:00:35 UTC: The fact you changed it to something else that we do not provide is a concern. Just so it's easier, in the root for the panel, use the following 2 commands: git stash git checkout tags/0.8.4 |
Beta Was this translation helpful? Give feedback.
-
Erry215 wrote at Jan 8 2016 18:00:35 UTC: fatal: Not a git repository (or any of the parent directories): .git |
Beta Was this translation helpful? Give feedback.
-
LordRalex wrote at Jan 8 2016 18:00:35 UTC: You are not in the panel's folder. /srv/pufferpanel (or PufferPanel depending on the folder casing you have) |
Beta Was this translation helpful? Give feedback.
-
Erry215 wrote at Jan 8 2016 18:00:35 UTC: root@vps231530:/srv/pufferpanel# git stash Saved working directory and index state WIP on (no branch): f4a3090 Bump version HEAD is now at f4a3090 Bump version root@vps231530:/srv/pufferpanel# git checkout tags/0.8.4 HEAD is now at f4a3090... Bump version |
Beta Was this translation helpful? Give feedback.
-
LordRalex wrote at Jan 8 2016 18:00:35 UTC: Print the results of using ls -l in that directory |
Beta Was this translation helpful? Give feedback.
-
Erry215 wrote at Jan 8 2016 18:00:35 UTC: root@vps231530:/srv/pufferpanel# ls -l total 1276 drwxr-xr-x 6 www-data www-data 4096 gen 4 19:08 app -rw-r--r-- 1 www-data www-data 354 gen 4 19:08 build.xml -rw-r--r-- 1 www-data www-data 489 gen 4 19:08 composer.json -rw-r--r-- 1 www-data www-data 37617 gen 4 19:09 composer.lock -rw-r--r-- 1 www-data www-data 1179424 gen 4 19:08 composer.phar -rw-r--r-- 1 www-data www-data 340 gen 4 19:09 config.json -rw-r--r-- 1 www-data www-data 6064 gen 4 19:08 CONTRIBUTING.md drwxr-xr-x 2 www-data www-data 4096 gen 4 19:08 install -rw-r--r-- 1 www-data www-data 32452 gen 4 19:08 LICENSE drwxr-xr-x 2 www-data www-data 4096 gen 9 19:32 public -rw-r--r-- 1 root root 4443 gen 9 20:04 README.md drwxr-xr-x 7 www-data www-data 4096 gen 4 19:08 src drwxr-xr-x 2 www-data www-data 4096 gen 4 19:08 tools drwxr-xr-x 18 www-data www-data 4096 gen 4 19:09 vendor |
Beta Was this translation helpful? Give feedback.
-
puffrfish wrote at Jan 8 2016 18:00:35 UTC: We have released a new version of PufferPanel and Scales with an improved installation process and many bug fixes. Please try the latest version and see if it fixes your issues. I’m marking this question as solved since there has been a long period of inactivity on it. If you are still experiencing issues, please create a new question. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Erry215 wrote at Jan 8 2016 18:00:35 UTC:
Hi,
I installed PufferPanel correctly and it worked some days ago. But today I have this problem:
When I go to the page appears this:
Fatal error: Call to undefined function PufferPanel\Core\Config\json_decode() in /srv/pufferpanel/src/core/config/jsonconfig.php on line 37
Here's the jsonconfig:
config = json_decode(file_get_contents(BASE_DIR.$path), $array); if(json_last_error() != "JSON_ERROR_NONE") { throw new Exception("An error occured when trying decode ".$path.". ".json_last_error()); } } public function config($base = null) { return (is_null($base)) ? $this->config : $this->config->{$base}; } ``` Line 37 is $this->config = json\_decode(file\_get\_contents(BASE\_DIR.$path), $array); }Beta Was this translation helpful? Give feedback.
All reactions