Hi all. I'm getting error 500 on admin-edit.php when I try to edit a imagem that is inside a album with more than 6 pictures. If the album has less than that, the error do not happen
I did, but everything I got about error 500 is not conclusive. Trying to debug admin-edit.php, it's weird but it loads the first image and displays it if I break (inside the loop). But after that I got the error 500...
Did setup complain about anything and if about what? Other errors in the log? Are the images of a size your server can handle? htaccess file there? Do you have modrewrite at all?
Thanks for your answer. I re-installed zenphoto and still got the same issue.
This is what I got from setup log:
warn: PHP magic_quotes_gpc [is enabled] You should consider disabling magic_quotes_gpc. For more information See What is magic_quotes_gpc and why should it be disabled? in the Zenphoto troubleshooting guide. warn: PHP mbstring package [Your internal characater set is ISO-8859-1] Setting mbstring.internal_encoding to UTF-8 in your php.ini file is recommended to insure accented and multi-byte characters function properly. warn: Server seems not to be Apache or Apache-compatible, .htaccess not required. Completed system check Setup cookie test successful Notice: "Module mod_rewrite" is working. The Zenphoto option "mod_rewrite" will be set to "enabled".
The .htaccess is there, and the files are small (<1MB). My server can handle files up to 2MB.
None of these should be the cause of your problem. Unfortunately, 500 errors are "server failure" errors so you may need to ask your provider if there is further error information in their logs.
Perhaps your server is too slow to load more than 6 instances of image information and is getting some sort of server timeout. But that is just a guess. It is really the case that the failure happens always with 7 images and never with 6 or fewer? Is it possible that it is failing on a particular image instead?
Question, sbillard: If the server isn't Apache or Apache-compatible, and the .htaccess files aren't required, won't the mod_rewrite rules need to be configured in some other way? If mod_rewrite is enabled but .htaccess files not used, might that be a problem? I don't know why it would be a 500 error (should just cause 404s), but I would expect that mod_rewrite would not default to "enabled" in that case.
Zenphoto works fine with or without modrewrite (admin works without only). Of cousre if modrewrite is enabled for Zenphoto and the server for whatever reason does not use the .htaccess the urls generate will run into errors.
I am not a server expert but modrewrite without htaccess seems a little pointless. I think some people use IIS servers that are a little different and we do not support officially.
I think modifying the core files to get around an issue specifically for one image would be a lot of work, perhaps moreso than finding the actual source of the problem and addressing it. Otherwise, you'd have to modify those files each time you ran into the issue, and that would not be very efficient!
Are there any errors in the error log? Are you using ImageMagick or GD?
Blue Dragonfly: There are other "variants" like lightpd that can be made to work. But the basic premis of mod_rewrite is that urls get redirected to the root index.php with various query parameters set to indicate what the original url was. If you can get the urls redirected to index.php then it would be possible in PHP to do the rest.
jair.jr: The "admin toolbox" links should allow you to go directly to the image you want to edit. Visit the image on the front end and you will have a link to edit it.
sbillard - I'm familiar with the use of mod_rewrite, I just thought that the setup info might be confusing to users not using Apache, but where mod_rewrite is also supported. If the setup detects "not Apache", and gives the notice that .htaccess is not required, yet detects that mod_rewrite is supported and enables it, then a user might delete .htaccess thinking it is unnecessary. Not that it would cause the problem described above, but it may lead to other confusion. Maybe the notice about .htaccess not being required should be based on whether mod_rewrite is supported or not? This is assuming that variants such as lighthttpd still use .htaccess.
Well, so far as I know, the only servers that uses the .htaccess file are Apache and clones which are identified by setup as Apache. If you have better information, please provide it.
Mod_rewrite may well work with, for instance, lightpd, but that both requires a different .htaccess equivalent and someone who knows what he is doing. We do not directly support that environment.
Just to add that we only support Apache officially as we do not and can not test on others. As sbillard said there are users using Zenphoto in lightptt and IIS successfully.
Comments
There is anyway to debug it easily?
Other errors in the log?
Are the images of a size your server can handle?
htaccess file there?
Do you have modrewrite at all?
This is what I got from setup log:
warn: PHP magic_quotes_gpc [is enabled] You should consider disabling magic_quotes_gpc. For more information See What is magic_quotes_gpc and why should it be disabled? in the Zenphoto troubleshooting guide.
warn: PHP mbstring package [Your internal characater set is ISO-8859-1] Setting mbstring.internal_encoding to UTF-8 in your php.ini file is recommended to insure accented and multi-byte characters function properly.
warn: Server seems not to be Apache or Apache-compatible, .htaccess not required.
Completed system check
Setup cookie test successful
Notice: "Module mod_rewrite" is working. The Zenphoto option "mod_rewrite" will be set to "enabled".
The .htaccess is there, and the files are small (<1MB). My server can handle files up to 2MB.
Perhaps your server is too slow to load more than 6 instances of image information and is getting some sort of server timeout. But that is just a guess. It is really the case that the failure happens always with 7 images and never with 6 or fewer? Is it possible that it is failing on a particular image instead?
I am not a server expert but modrewrite without htaccess seems a little pointless. I think some people use IIS servers that are a little different and we do not support officially.
sbillard: it really is a bit slow, maybe it's a timeout somewhere, I dunno. And it happens in differents albums, with different pictures.
Can't I mod the admin-edit.php to show just the picture I wanna to edit?
Are there any errors in the error log? Are you using ImageMagick or GD?
jair.jr: The "admin toolbox" links should allow you to go directly to the image you want to edit. Visit the image on the front end and you will have a link to edit it.
Sorry I wasn't more clear! :-)
Mod_rewrite may well work with, for instance, lightpd, but that both requires a different .htaccess equivalent and someone who knows what he is doing. We do not directly support that environment.