Topic: Internal Server Error on Unlist and Import

When I unlist my galleries and then re-import them I get a 500 internal server error page when trying to 'view' them. I can't figure out why it is doing this. If I go to an address that doesn't exist, my own custom redirect kicks in. It does not do this for these galleries, though, because they do exit. What could it be?

I am using svManager v1.2.3.

Re: Internal Server Error on Unlist and Import

I take it that the galleries are ok before you do an unlist and import?

It looks like a permissions problem. Of course the script  will not run if the permissions are too restrictive but some servers are set up so they throw a 500 error if the permissions for a script appear to be too generous.

By default, Unlist will attempt to change the permissions on the gallery folder to 0775 and the files to 0664. This is to help people who need more generous permissions in order to be able to edit unlisted files.

I'm assuming you have a gallery that you can view, or that you can create a new one that's ok. Look at the working gallery folder and files with ftp and record the permissions. Change the permissions on your problem galleries to be the same as the good one.

If this works then you can change the defaults for Unlist as follows.

Edit the file svmanager/includes/constants.php and find the following lines:

// Unlist option attempts to set these permissions
define('DIR_MODE', 0775);
define('FILE_MODE', 0664);

Change these so that the permissions are set to the same as your working gallery, probably something like:

// Unlist option attempts to set these permissions
define('DIR_MODE', 0755);
define('FILE_MODE', 0644);

jack

Jack Hardie
SimpleViewer Support Team.

Re: Internal Server Error on Unlist and Import

That did it! Thanks so much.