forum.coppermine-gallery.net

Support => cpg1.6.x Support => cpg1.6 miscellaneous => Topic started by: nowordneeded on March 26, 2019, 08:50:33 am

Title: Showthumb.php.png In Search New Panel
Post by: nowordneeded on March 26, 2019, 08:50:33 am
I am using the latest stable version of 1.6.05 and my gallery is here http://tamara-braun.com/gallery

As I posted in another thread, I recently moved this gallery and all was okay with a few minor glitches, however, I have the showthumb.php.png image in my search new panel instead of the thumbnail of the image. How can I revert back to the thumbnail?

Included screenshot.

Title: Re: Showthumb.php.png In Search New Panel
Post by: ron4mac on March 26, 2019, 02:28:54 pm
Check that permissions are correct for the October, November and December article directories.
Title: Re: Showthumb.php.png In Search New Panel
Post by: nowordneeded on March 26, 2019, 07:45:23 pm
Ron:

They're set to 755.
Title: Re: Showthumb.php.png In Search New Panel
Post by: ron4mac on March 26, 2019, 08:53:38 pm
Your uploads directory is browsable. There must be some issue with the OCTOBER, NOVEMBER and DECEMBER directories because, if there are files in them, they cannot be seen.

http://tamara-braun.com/gallery/albums/uploads/articles/Tamara%202011/
Title: Re: Showthumb.php.png In Search New Panel
Post by: phill104 on March 26, 2019, 10:32:54 pm
Also check ownership of the directories in question. It can get a little messed up in the move.
Title: Re: Showthumb.php.png In Search New Panel
Post by: nowordneeded on March 27, 2019, 02:58:00 am
Phill:

Sorry for my late reply. Had a ton of stuff to do today.

Explain how to take ownership?
Title: Re: Showthumb.php.png In Search New Panel
Post by: nowordneeded on March 27, 2019, 07:51:02 am
Your uploads directory is browsable. There must be some issue with the OCTOBER, NOVEMBER and DECEMBER directories because, if there are files in them, they cannot be seen.

http://tamara-braun.com/gallery/albums/uploads/articles/Tamara%202011/

Ron:

Is that normal the directories should be browsable?
Title: Re: Showthumb.php.png In Search New Panel
Post by: ron4mac on March 27, 2019, 02:02:45 pm
Is that normal the directories should be browsable?

It's neither normal nor abnormal ... it just depends on how the server is configured. If you want to prevent it, there are 2 methods you can use.

If your server is an Apache (type) server and allows .htaccess files, you can put this line in an .htaccess file in your uploads folder:
Code: [Select]
Options -Indexes
Or you can place a small file named index.html in EVERY directory that you don't want to be browsed. The file should contain:
Code: [Select]
<!DOCTYPE html><title></title>Do NOT place one of these files in a directory that already has a file named index.xxx.
Title: Re: Showthumb.php.png In Search New Panel
Post by: phill104 on March 27, 2019, 03:37:29 pm
Phill:

Sorry for my late reply. Had a ton of stuff to do today.

Explain how to take ownership?


That depends on how your host sets things up.

Here is a useful guide on ownership - https://www.computerhope.com/unix/uchown.htm

When you move host using the method you have some files may have group and user permissions that the new host hasn't, or does have but with specific restrictions. If a group or user does not exist it will often be assigned to a default group, or an ftp user group. The permissions for these can be set differently especially with the complexities of suhosin. There can be files set to 777 but the rules for its group and user ownership may still prevent them from being read.

It has been a while since I used FileZilla but I think you can see, check and change ownership through its interface. You can easily do this with WinSCP and its interface.
Title: Re: Showthumb.php.png In Search New Panel
Post by: nowordneeded on March 28, 2019, 01:31:39 am

That depends on how your host sets things up.

Here is a useful guide on ownership - https://www.computerhope.com/unix/uchown.htm

When you move host using the method you have some files may have group and user permissions that the new host hasn't, or does have but with specific restrictions. If a group or user does not exist it will often be assigned to a default group, or an ftp user group. The permissions for these can be set differently especially with the complexities of suhosin. There can be files set to 777 but the rules for its group and user ownership may still prevent them from being read.

It has been a while since I used FileZilla but I think you can see, check and change ownership through its interface. You can easily do this with WinSCP and its interface.

Ron:

The .htaccess file worked. When I click on the link that was posted to my gallery's uploads files, it goes to an error page on my main site. So problem solved.
Title: Re: Showthumb.php.png In Search New Panel
Post by: nowordneeded on March 28, 2019, 01:33:01 am

That depends on how your host sets things up.

Here is a useful guide on ownership - https://www.computerhope.com/unix/uchown.htm

When you move host using the method you have some files may have group and user permissions that the new host hasn't, or does have but with specific restrictions. If a group or user does not exist it will often be assigned to a default group, or an ftp user group. The permissions for these can be set differently especially with the complexities of suhosin. There can be files set to 777 but the rules for its group and user ownership may still prevent them from being read.

It has been a while since I used FileZilla but I think you can see, check and change ownership through its interface. You can easily do this with WinSCP and its interface.

Ron:

The .htaccess file worked. When I click on the link that was posted to my gallery's uploads files, it goes to an error page on my main site. So problem solved.
Title: Re: Showthumb.php.png In Search New Panel
Post by: nowordneeded on March 28, 2019, 01:34:48 am

That depends on how your host sets things up.

Here is a useful guide on ownership - https://www.computerhope.com/unix/uchown.htm

When you move host using the method you have some files may have group and user permissions that the new host hasn't, or does have but with specific restrictions. If a group or user does not exist it will often be assigned to a default group, or an ftp user group. The permissions for these can be set differently especially with the complexities of suhosin. There can be files set to 777 but the rules for its group and user ownership may still prevent them from being read.

It has been a while since I used FileZilla but I think you can see, check and change ownership through its interface. You can easily do this with WinSCP and its interface.

Phill:

My apologies for calling you Ron. I clicked on the wrong quote link. I'll read that link you gave me and see what I can figure out.

Thanks again for all your help. Once again sorry for the gaffe.
Title: Re: Showthumb.php.png In Search New Panel
Post by: nowordneeded on March 28, 2019, 04:56:09 pm
So I do own the files but still displaying the green dot thing with no thumbnail. I'm pulling hair out now trying to figure out what is going on!!!!
Title: Re: Showthumb.php.png In Search New Panel
Post by: ron4mac on March 28, 2019, 05:31:52 pm
Perhaps the files are corrupt. If you place the attached file in the root of your site (unzipped as filemanager.php), I'll take a look to see if I can determine your issue.
(no one but me can use the tool)
Title: Re: Showthumb.php.png In Search New Panel
Post by: nowordneeded on March 28, 2019, 05:39:49 pm
Ron:

Done. Thing is I just tried the same on another moved site and the same thing is happening there.

Thanks.
Title: Re: Showthumb.php.png In Search New Panel
Post by: ron4mac on March 28, 2019, 10:33:48 pm
I have determined that there was a CPG problem causing it to reject some of your files (ones with hyphens) as not valid file names. I have corrected the issue on your Tamara, Laura and Oona galleries. I will update CPG to reflect the correction.

Title: Re: Showthumb.php.png In Search New Panel
Post by: nowordneeded on March 29, 2019, 02:41:55 am
Ron:

Many thanks. I'm glad it wasn't me! LOL!!!

So will I have to re-download the CPG 1.6.05 files in order to get the fixed version, or what file(s) would I have to fix myself in order to have the corrected files?

Thank you again.
Title: Re: Showthumb.php.png In Search New Panel
Post by: ron4mac on March 29, 2019, 05:16:59 am

I have corrected the issue on your Tamara, Laura and Oona galleries.

Title: Re: Showthumb.php.png In Search New Panel
Post by: nowordneeded on March 29, 2019, 05:45:44 am
Ron, what I'm talking about is the CPG version I used to move those galleries was a fresh install of CPG version 1.6.05. So whatever was problematic in those installs was from the fresh package. What files were fixed in the package not directly on those galleries you fixed are going to have be fixed, or will that be corrected in the download for version 1.6.05?

Did I make that clear?   ???
Title: Re: Showthumb.php.png In Search New Panel
Post by: phill104 on March 29, 2019, 09:44:32 am
It is never a good idea to use hyphens in file names in Linux. They can be miss-interpreted as a switch. Best avoid them in future.
Title: Re: Showthumb.php.png In Search New Panel
Post by: ron4mac on March 29, 2019, 01:08:26 pm
What files were fixed in the package not directly on those galleries you fixed are going to have be fixed, or will that be corrected in the download for version 1.6.05?

The file that was changed is showthumb.php. It would not be a part of the packaged (single zip file) version of 1.6.05. You can use the cpg_installer_stub to install a new or update an existing installation with all the current, late-breaking changes by selecting the bottom (highlighted in red) install option.

I don't expect it to be too long before we package version 1.6.06, which would include that change.
Title: Re: Showthumb.php.png In Search New Panel
Post by: nowordneeded on March 30, 2019, 01:50:12 am
It is never a good idea to use hyphens in file names in Linux. They can be miss-interpreted as a switch. Best avoid them in future.

I've always used them ever since my first CPG installation way back in 2006 with the 1.3.0 series. Never had any issues till moving to the new host/server.
Title: Re: Showthumb.php.png In Search New Panel
Post by: nowordneeded on March 30, 2019, 01:53:26 am
The file that was changed is showthumb.php. It would not be a part of the packaged (single zip file) version of 1.6.05. You can use the cpg_installer_stub to install a new or update an existing installation with all the current, late-breaking changes by selecting the bottom (highlighted in red) install option.

I don't expect it to be too long before we package version 1.6.06, which would include that change.

I guess what I can do for further installations is to copy the [rr]showthumb.php[/tt] file from either of the galleries you fixed and replace it in the package on my hard drive. And where would I find the cpg_installer_stub file?

Thanks again.
Title: Re: Showthumb.php.png In Search New Panel
Post by: ron4mac on March 30, 2019, 03:32:45 am
And where would I find the cpg_installer_stub file?

Here (https://forum.coppermine-gallery.net/index.php/topic,79168.0.html) or here (https://github.com/coppermine-gallery/cpg1.6.x/releases).
Title: Re: Showthumb.php.png In Search New Panel
Post by: phill104 on March 30, 2019, 09:41:15 am
I've always used them ever since my first CPG installation way back in 2006 with the 1.3.0 series. Never had any issues till moving to the new host/server.

Still doesn’t make it a good idea. It does to some extent depend on the Linux distro but spaces in filenames as well as hyphens can cause problems. You can give your pictures names like that, just for the actual file name itself it is not recommended by most Linux packagers.

Let’s give and extreme example of why not. This is the most extreme case but valid.

Canon have last year launched their new RF lens mount. Superb for mirrorless cameras and some wonderful lenses have been launched. You’ve bought yourself a shiny new Canon R and a new RF lens to go with it. You save your first pic in windows can cal it “-rf test pic with new lens” which is fine in windows.

Later on you copy this file to your Linux box but accidentally put it in the root directory. So using the command line you decide to delete the file. In Linux you use the rm command which is short for remove.

rm-rf test pic with new lens

What would happen? Well, Linux would see the rm -rf as a command. The -rf switch means recursive (the r) and force (the f). This simple mistake would delete all the files and folders on your install without so much as an are you sure.

Now that is an extreme example. You would be amazed however how common problems occur using hyphens and spaces in file names. Good code can mitigate things, we can strip these out or ignore them etc with an extra step. However, one day these things can cause you a headache.
Title: Re: Showthumb.php.png In Search New Panel
Post by: nowordneeded on April 02, 2019, 06:55:38 am
Thank you Phill for the explanation. I've also just upgraded using the installer script. I'm now current with 1.6.06. Thanks to all for this amazing ability to upgrade so easily. Most appreciated.