Skip to content
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

Intended use of URL field? #43

Open
rsend opened this issue Oct 10, 2023 · 10 comments
Open

Intended use of URL field? #43

rsend opened this issue Oct 10, 2023 · 10 comments

Comments

@rsend
Copy link

rsend commented Oct 10, 2023

Hi,
I just installed this gallery on my home server. What is the intended use for the URL field, if, for example, I want to test this on the LAN only?

Thanks
R

@david-novafacile
Copy link
Contributor

david-novafacile commented Oct 10, 2023

Hi,

it depends on your network and server configuration. You should use the local Domain or IP (with http:// or https://) of you homeserver an the path and/or the port where novaGallery is running. Use in the config just the url, where you reach novagallery.

Some examples:

  • http://192.168.1.3
  • http://192.168.2.8:8080
  • http://192.168.3.10:8080/novagallery
  • http://mynetwork.local/gallery

@rsend
Copy link
Author

rsend commented Oct 10, 2023

Ok, got it. That part seems to work - but now I get this error:

`Deprecated: substr(): Passing null to parameter #1 ($string) of type string is deprecated in /jffs/www/nova-base/core/Site.php on line 23

Deprecated: rtrim(): Passing null to parameter #1 ($string) of type string is deprecated in /jffs/www/nova-base/core/Router.php on line 47

Fatal error: Uncaught Error: Undefined constant "GLOB_BRACE" in /jffs/www/nova-base/lib/novaGallery.php:53 Stack trace: #0 /jffs/www/nova-base/lib/novaGallery.php(28): novaGallery->getImages('/jffs/www/galle...') #1 /jffs/www/nova-base/app/pages/home.php(16): novaGallery->__construct('/jffs/www/galle...', true, 60) #2 /jffs/www/nova-base/app/router.php(6): require('/jffs/www/nova-...') #3 /jffs/www/nova-base/core/Router.php(108): {closure}() #4 /jffs/www/nova-base/app/router.php(42): Router::run('') #5 /jffs/www/nova-base/init.php(60): require('/jffs/www/nova-...') #6 /jffs/www/index.php(11): require_once('/jffs/www/nova-...') #7 {main} thrown in /jffs/www/nova-base/lib/novaGallery.php on line 53`

Any ideas what that is related to?

EDIT: In the php manual, I do see this: "Note: The GLOB_BRACE flag is not available on some non GNU systems, like Solaris or Alpine Linux. " I'm running on an embedded router (dd-wrt). Could that be the problem?

@david-novafacile
Copy link
Contributor

david-novafacile commented Oct 10, 2023

EDIT: In the php manual, I do see this: "Note: The GLOB_BRACE flag is not available on some non GNU systems, like Solaris or Alpine Linux. " I'm running on an embedded router (dd-wrt). Could that be the problem?

This is sad, this might be the problem... It needs a fix, to check if GLOB_BRACE is available and if not, every filetype has to be searched separately... I will try that it is added soon.

@rsend
Copy link
Author

rsend commented Oct 10, 2023

I've inquired with the dd-wrt maintainers to see if it is my mistake in installing something or not, I'll update once I get an answer. But in the meantime, if it really is not available, how difficult WOULD it be to make the changes you mentioned?

@david-novafacile
Copy link
Contributor

It should be quite simple. It's the same solution like in Open Cart project (opencart/opencart@fd2e4b8) --> first commit change with image files.

The method protected function getImages($dir) on line 52 in nova-base/lib/novaGallery.php must be extended with something like this.

@rsend
Copy link
Author

rsend commented Oct 12, 2023

Done it, that improved things.

However, something must be wrong with my setup. I now get broken thumbnails, and clicking on an item gets a 404 error.

The paths for the latter look like: [URL]//NovaGallery/galleries//cache/2000/sn853983.jpg - but that folder does not exist. If I modify the URL to remove /cache/2000, then the image loads correctly.

My server is running lighttpd, by the way. I've set the lighttpd config root folder to the /NovaGallery subdirectory, and mod_rewrite is enabled. It is possible my GD module is not working correctly, I'm investigating that separately - but that should only affect the Thumbnails, not the cache, right?

@david-novafacile
Copy link
Contributor

It looks like missing write rights for the webserver in galleries folder.

@rsend
Copy link
Author

rsend commented Oct 13, 2023

Hmm, as far as I know write permission works fine. I tested this by deleting the "files.php" inside the cache folder, and when I touch the content of the gallery and reload, that file is regenerated with the correct list of new filenames inside (i.e write to the directory works) - except there are no thumbnails or other files in the folder.

Is there a way to check what is throwing an error? Loading the Gallery just gives a 404 (as before) - but not WHY...

@david-novafacile
Copy link
Contributor

Okay, if files.php is created, than writing rights are correct. Which kind of 404 error ist shown? It's an error by the server or by novaGallery?

In most cases a 404 error is caused by missing mod rewrite or wrong rewrite rules.

@rsend
Copy link
Author

rsend commented Oct 16, 2023

Well, it looks like this. I'm guessing it's because that cache file doesn't exist. Also I noticed the double / after the "galleries", is that correct or do I have a typo in some config?

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants