PhotoPost Community

PhotoPost Community (http://www.photopost.com/forum/)
-   Installs and Upgrade - vBulletin 3.7x / 3.8x (http://www.photopost.com/forum/installs-upgrade-vbulletin-3-7x-3-8x/)
-   -   Error http 500 (http://www.photopost.com/forum/installs-upgrade-vbulletin-3-7x-3-8x/141643-error-http-500-a.html)

Zera January 5th, 2010 02:35 PM

Error http 500
 
Hello,

I have now installed the version of vBGallery v2.5.
My vb version is 3.8.4. Now I have the problem if I want to the Gallery, I get the error HTTP 500 URL: http://www.stallboard.de/gallery/bro...&cutoffdate=-1

Why is that? What am I doing wrong?

Greeting

Zera

Chuck S January 5th, 2010 02:46 PM

You have wrong file permissions it would appear. Your php files should be 644 permissions

Zera January 5th, 2010 02:56 PM

If I give the folder gallery modes 644
I get the error 403

Chuck S January 5th, 2010 04:14 PM

No the folder should be 755

The php files themselves should be 644

Zera January 6th, 2010 12:29 AM

I do not understand.
I now have the rights given to the following folders 777:
- Gallery
- Files
- Images
- Users

The files have it lying modes 644
Now I'm getting HTTP 500 errors
Is there a list where I can see what right do I have to forgive?

Luciano January 6th, 2010 01:08 AM

I once had a similar problem after moving from one server to another..
the problem was the ownership of the files..
they were owned by the script that moved them.. a real pain..
they could not be executed by anyone except the script that moved them..
this does NOT happen if you upload with a normal ftp program.
But if you overwrite the files with the ftp program, they still keep the first ownership..
Solution: reinstall in a new directory uploading the files with ftp

--------
just checked your server again.. seems it doesnt like the permissions of you main gallery directory,
Quote:

error: Directory "/srv/www/stallboard.de/public_html/gallery" is writeable by group
that meens you have the main directory of gallery with permissions like 771 or 777..
Your server doesnt like that.. try 751 (thats my setup)
compare permissions of forum directory and gallery directory


----------

other possibility, if you used a "normal" ftp program.. the program did not switch automatically from binary to text mode when uploading the php files..

What I would do..for testing..

make a file test.php with content <?php echo 'test'; ?>
upload it to that directory and see if it works..

if yes.. copy all the gallery files to that directory the same way you copied the test.php

just set directory: files and users to 777
leave the others alone... (they should be: 755 (strange enough just checked my server, they are 751 and it also works..)

as for the php files on my server they run with 750 ...
644 should also work.. but somehow they are now 750... (strange)

do some tests with test.php file.. maybe your server is setup so that php files work only with other permissions...
compare with running php files in other directories.. like forum
also compare ownership...

thats my 2 cents

Luc

Luciano January 6th, 2010 01:56 AM

just checked.. it seems to be a suPHP issue.. with ownership problems...
you are using suPHP from http://www.suphp.org/

Quote:

suPHP is a tool for executing PHP scripts with the permissions of their owners. It consists of an Apache module (mod_suphp) and a setuid root binary (suphp) that is called by the Apache module to change the uid of the process executing the PHP interpreter.
I have never used suPHP, but as you have forums running, make sure you use exactly the same directory permission and file permissions you are using with forums.. (and make sure you upload gallery files the same way) !!!
Luc

Chuck S January 6th, 2010 06:12 AM

Directories should not be writable by group. Files should not be writable by group.

every error your getting is telling you to take away write permissions from group so try doing this. ;)

Zera January 6th, 2010 02:29 PM

Thank you Thank you Thank you!
751 under the privileges I get into the gallery!

Chuck S January 6th, 2010 03:38 PM

Thats extremely weird permissions but glad your working ;)

Luciano January 6th, 2010 04:08 PM

weird? loooooool i got those... :D
but speaking seriously ..
when i create a directory with my ftp program on shared server.. the directory has those perms per default...
Maybe its the php wrapper.. or server config..
Luc

Chuck S January 6th, 2010 08:43 PM

yes strange indeed. Most servers when you create directories the default permissions are 755 for a directory and 644 for a file. That way neither is writable but I am sure there are more stringent setups out there as seen here. I mean at least the error given was straight forward. Can not be group writable. Real simple go back and remove write permissions on directories and files from group. ;)

Infopro June 8th, 2010 03:49 PM

Quote:

Originally Posted by Chuck S (Post 1258982)
yes strange indeed. Most servers when you create directories the default permissions are 755 for a directory and 644 for a file. That way neither is writable but I am sure there are more stringent setups out there as seen here. I mean at least the error given was straight forward. Can not be group writable. Real simple go back and remove write permissions on directories and files from group. ;)

You have no experience at all with a server that runs SuPHP do you, Chuck?

When Photopost creates a directory (a user uploads a photo, if no directory is available, PP creates it), it is hard coded to create that directory (mkdir) with permissions of 0755 and then chmod to 0777 it uploads the file itself (the image) and chmod to 0777 as well.

The code that does this is located in the pp-inc.php, simply search for 0777 and you'll find it in the latest 702 release.

No directory can be greater than 755, no file higher than 666, or you will have problems in a SuPHP setup running Photopost.

Nothing at all strange about that. What is strange though is that the latest PP 702 still uses this old wore out chmod everthing to 0777 code as that will (or used to) solve any problems the silly inexperenced users came across.

Times have changed, time to upgrade the code to something that works correctly in multiple environments.

In the mean time if someone runs into this problem, they run a secure server with SuPHP, have your host reset permissions on all directories and files in your PP installation properly and then edit the code in the pp-inc.php before you upload or move one more file on your gallery.

Yes, strange indeed, Chuck.

Luciano June 8th, 2010 04:19 PM

Just as a reminder, vBGallery does NOT use any file called pp-inc.php.
Luc

Infopro June 8th, 2010 06:26 PM

Quote:

Originally Posted by Luciano (Post 1270217)
Just as a reminder, vBGallery does NOT use any file called pp-inc.php.
Luc

Indeed, sorry for the confusion. I don't use this one. But if you look in this file; functions_gallery_imageedit.php you see it does the same thing.
@mkdir($folderstring, 0777);
@chmod($folderstring, 0777);

Chuck S June 9th, 2010 06:03 AM

There are certain server environments that can allow uploads and such with permissions of 755 sure. However that is not really relative to most people. 99.0% of server setups require directory permissions of 777 to allow uploads. Hense viewing threads your always going to be see things suggested to set to 777 permissions.

Luciano June 9th, 2010 07:46 AM

well as long as vbulletin does the same I have no bad conscience... :p

check functions_file.php or class_upload.php and do a search for 0777


All times are GMT -5. The time now is 04:35 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97