Search…

X3 Photo Gallery Support Forums

Search…
 
mrSLK
Topic Author
Posts: 16
Joined: 10 Sep 2016, 00:25

Admin Panel not showing

16 May 2022, 00:06

Hi Karl, 

Just want to ask why on one of my local web server (Other web script running just fine), the Panel is just showing Blank Page (No Login Password form showing), but the Web is showing just fine.

Currently running on a QNAP NAS:
PHP 7.3.7 (cli) (built: Mar 24 2022 04:57:27) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.7, Copyright (c) 1998-2018 Zend Technologies

Diagnostic from photo.gallery:
see attached


PS: I tried running your Files App, it's also not running (Just spinning wheel loading animation), i did the diagnostic check and it shows this (see attached)
Code
Files App 0.5.5
PHP 7.3.7
Apache
* The following tests are only to help diagnose feature-specific issues.
root is_writeable
storage_path is_writeable
gd
exif
ZipArchive
mime_content_type()
finfo_file()
iptcparse()
exif_imagetype()
session_start()
ini_get()
exec()
ffmpeg
memory_limit: 1024M
file_uploads: 1
upload_max_filesize: 2047M
post_max_size: 2047M
max_file_uploads: 20
[color=#444444][size=120][font=system-ui, -apple-system, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif]Config[/font][/size][/color]
<?php

// LOCAL CONFIG [0]
// _filesconfig.php
return array ();

// STORAGE CONFIG [0]
// _files/config/config.php
return array ();

// CONFIG [74]
// User parameters merged with default parameters.
$config = array (
  'root' => '',
  'start_path' => false,
  'username' => '',
  'password' => '',
  'load_images' => true,
  'load_files_proxy_php' => false,
  'load_images_max_filesize' => 1000000,
  'image_resize_enabled' => true,
  'image_resize_cache' => true,
  'image_resize_dimensions' => 320,
  'image_resize_dimensions_retina' => 480,
  'image_resize_dimensions_allowed' => '',
  'image_resize_types' => 'jpeg, png, gif, webp, bmp',
  'image_resize_quality' => 85,
  'image_resize_function' => 'imagecopyresampled',
  'image_resize_sharpen' => true,
  'image_resize_memory_limit' => 128,
  'image_resize_max_pixels' => 30000000,
  'image_resize_min_ratio' => 1.5,
  'image_resize_cache_direct' => false,
  'folder_preview_image' => true,
  'folder_preview_default' => '_filespreview.jpg',
  'menu_enabled' => true,
  'menu_show' => true,
  'menu_max_depth' => 5,
  'menu_sort' => 'name_asc',
  'menu_cache_validate' => true,
  'menu_load_all' => false,
  'menu_recursive_symlinks' => true,
  'layout' => 'rows',
  'sort' => 'name_asc',
  'sort_dirs_first' => true,
  'sort_function' => 'locale',
  'cache' => true,
  'cache_key' => 0,
  'storage_path' => '_files',
  'files_exclude' => '',
  'dirs_exclude' => '',
  'allow_symlinks' => true,
  'title' => '%name% [%count%]',
  'history' => true,
  'transitions' => true,
  'click' => 'popup',
  'click_window' => '',
  'click_window_popup' => true,
  'code_max_load' => 100000,
  'topbar_sticky' => 'scroll',
  'check_updates' => false,
  'allow_tasks' => false,
  'get_mime_type' => false,
  'context_menu' => true,
  'prevent_right_click' => false,
  'license_key' => '',
  'filter_live' => true,
  'filter_props' => 'name, filetype, mime, features, title',
  'download_dir' => 'zip',
  'download_dir_cache' => 'dir',
  'allow_upload' => false,
  'allow_delete' => false,
  'allow_rename' => false,
  'allow_new_folder' => false,
  'allow_new_file' => false,
  'allow_duplicate' => false,
  'allow_text_edit' => false,
  'demo_mode' => false,
  'upload_allowed_file_types' => '',
  'upload_max_filesize' => 0,
  'upload_exists' => 'increment',
  'popup_video' => true,
  'video_thumbs' => true,
  'video_ffmpeg_path' => 'ffmpeg',
  'video_autoplay' => true,
  'lang_default' => 'en',
  'lang_auto' => true,
);

// DEFAULT CONFIG [74]
// Default config parameters.
$default = array (
  'root' => '',
  'start_path' => false,
  'username' => '',
  'password' => '',
  'load_images' => true,
  'load_files_proxy_php' => false,
  'load_images_max_filesize' => 1000000,
  'image_resize_enabled' => true,
  'image_resize_cache' => true,
  'image_resize_dimensions' => 320,
  'image_resize_dimensions_retina' => 480,
  'image_resize_dimensions_allowed' => '',
  'image_resize_types' => 'jpeg, png, gif, webp, bmp',
  'image_resize_quality' => 85,
  'image_resize_function' => 'imagecopyresampled',
  'image_resize_sharpen' => true,
  'image_resize_memory_limit' => 128,
  'image_resize_max_pixels' => 30000000,
  'image_resize_min_ratio' => 1.5,
  'image_resize_cache_direct' => false,
  'folder_preview_image' => true,
  'folder_preview_default' => '_filespreview.jpg',
  'menu_enabled' => true,
  'menu_show' => true,
  'menu_max_depth' => 5,
  'menu_sort' => 'name_asc',
  'menu_cache_validate' => true,
  'menu_load_all' => false,
  'menu_recursive_symlinks' => true,
  'layout' => 'rows',
  'sort' => 'name_asc',
  'sort_dirs_first' => true,
  'sort_function' => 'locale',
  'cache' => true,
  'cache_key' => 0,
  'storage_path' => '_files',
  'files_exclude' => '',
  'dirs_exclude' => '',
  'allow_symlinks' => true,
  'title' => '%name% [%count%]',
  'history' => true,
  'transitions' => true,
  'click' => 'popup',
  'click_window' => '',
  'click_window_popup' => true,
  'code_max_load' => 100000,
  'topbar_sticky' => 'scroll',
  'check_updates' => false,
  'allow_tasks' => false,
  'get_mime_type' => false,
  'context_menu' => true,
  'prevent_right_click' => false,
  'license_key' => '',
  'filter_live' => true,
  'filter_props' => 'name, filetype, mime, features, title',
  'download_dir' => 'zip',
  'download_dir_cache' => 'dir',
  'allow_upload' => false,
  'allow_delete' => false,
  'allow_rename' => false,
  'allow_new_folder' => false,
  'allow_new_file' => false,
  'allow_duplicate' => false,
  'allow_text_edit' => false,
  'demo_mode' => false,
  'upload_allowed_file_types' => '',
  'upload_max_filesize' => 0,
  'upload_exists' => 'increment',
  'popup_video' => true,
  'video_thumbs' => true,
  'video_ffmpeg_path' => 'ffmpeg',
  'video_autoplay' => true,
  'lang_default' => 'en',
  'lang_auto' => true,
);

;?>
Thank You
Attachments
Screen Shot 2022-05-16 at 12.19.45.jpg
Screen Shot 2022-05-16 at 12.19.45.jpg (151.15 KiB) Viewed 1362 times
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Admin Panel not showing

16 May 2022, 00:37

Very hard to diagnose by just some info. I can't even know if they fail for the same reason. Do you have a link you could send private? Could be missing mbstring, misconfigured PHP sessions, or some firewall installed on server.
 
mrSLK
Topic Author
Posts: 16
Joined: 10 Sep 2016, 00:25

Re: Admin Panel not showing

16 May 2022, 01:16

The thing is, the installation is local and not sure how you could access it, Let me think of something and setup anydesk
 
mrSLK
Topic Author
Posts: 16
Joined: 10 Sep 2016, 00:25

Re: Admin Panel not showing

16 May 2022, 01:27

But when i check the dev console, there is this error:
Code
Refused to load the script 'https://cdn.jsdelivr.net/npm/jquery@3.4.1/dist/jquery.min.js' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-inline' 'unsafe-eval'". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.

/dpanel/:1 Refused to load the script 'https://cdn.jsdelivr.net/npm/bootstrap@3.4.1/dist/js/bootstrap.min.js' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-inline' 'unsafe-eval'". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.

(index):124 Uncaught ReferenceError: $ is not defined
    at (index):124:17
 
mrSLK
Topic Author
Posts: 16
Joined: 10 Sep 2016, 00:25

Re: Admin Panel not showing

16 May 2022, 01:31

SOLVED it, There is a setting on QNAP Web Server that "Enable Content-Security-Policy HTTP Header", i turn this setting off and admin panel is loaded.

Thank You Karl :)
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Admin Panel not showing

16 May 2022, 03:37

mrSLK wrote: "Enable Content-Security-Policy HTTP Header"
Right. This server-option basically decides what resources your website is allowed to load. When enabled with default options, it would block all Javascripts and CSS loaded from the JSDelivr CDN.
https://developer.mozilla.org/en-US/doc ... ity-Policy