PhotoPost Photo Gallery Sales PhotoPost Sales Toll Free Phone Number
Mon-Fri 9am-4pm EST
  PhotoPost Photo Sharing Photo Gallery    Visualize community tm
| | | | | | | | |
Old February 3rd, 2005, 11:22 PM   #1 (permalink)
Junior Member
Verified Customer
 
Join Date: Jan 2005
Location: Sweden
Posts: 22
Safe mode host problem

First off I would like to say that Im extremly content with both products and services at vBulletin and vBadvanced. My prob however is that my reluctant host (surftown.se) has PHP safe_mode switched ON, which renders my vBgallery non-functioning. (At least that seems to be the general opinion as Im writing this)

My question is if anyone has got vBgallery to function with safe_mode switched ON?
mr2jswe is offline   Reply With Quote
Old February 4th, 2005, 05:41 AM   #2 (permalink)
Member
Verified Customer
 
Join Date: Oct 2004
Location: Florida
Posts: 318
Re: Safe mode host problem

http://www.vbadvanced.com/forum/showthread.php?t=3856
oldengine is offline   Reply With Quote
Old February 4th, 2005, 07:06 AM   #3 (permalink)
Ultimate Member
 
Join Date: Jan 2004
Posts: 2,196
Re: Safe mode host problem

The only way to get around safemode at current time would be to store images in the database, and it would greatly limit vB Gallerys features and could pose a rather big server issues for anyones database who grows beyond a few megs.
Zachery is offline   Reply With Quote
Old February 5th, 2005, 03:12 AM   #4 (permalink)
Junior Member
Verified Customer
 
Join Date: Jan 2005
Location: Sweden
Posts: 22
Re: Safe mode host problem

Thankyou oldengine> Ive looked into your thread, but I dont understand what to change and where to do that? Sure it has to do with the properties of files and folders, and with user and/or script priviligies, but I cant seem to compile that into my brain.

In addition I have recieved information from my host about a workaround, here goes the translation:

"There is a solution on the safe mode issue that deals with the creation of files and folders through script (I assume thats your problem?) The solution is safe_mode_gid, which we HAVE implemented at Surftown.

With the safe_mode_gid setting the group have access to files created by script (which has owner Root/httpd), which is normally not possible under safe mode. What creates the problem is that if you change read and write permissions on a folder/script through a regular ftp program, then the file/folder loses its g+s setting, which makes a user that differs from root not being able to access to folder/file, even if the user is part of the group.

So when you check the permissions on a file or folder through normal chmod (eg chmod 777) then you have to make sure that the symbolic rights (unix/linux user symbolic rights) g+s remains."
mr2jswe is offline   Reply With Quote
Old February 5th, 2005, 03:17 AM   #5 (permalink)
Junior Member
Verified Customer
 
Join Date: Jan 2005
Location: Sweden
Posts: 22
Re: Safe mode host problem

What I dont understand with the above is
1) how to change the symbolic rights, and
2) how to make sure the values stay the way they need to be (apparently g+s) for everyone using my vBgallery.
mr2jswe is offline   Reply With Quote
Old February 5th, 2005, 10:49 AM   #6 (permalink)
Member
Verified Customer
 
Join Date: Oct 2004
Location: Florida
Posts: 318
Re: Safe mode host problem

Your host is onto a different workaround than I used. I compiled apache in phpsuexec for two reasons:

1) All my vBulletin system email goes out under the username rather than nobody. This helps prevent email from being bounced as junk, since email coming from a nobody script user has long been associated with bulk mail.

2) All php scripts are executed as cgi and run under the username instead of nobody. Therefore, all directories and files written by the script are created and written under the username.

For example: /home/username/public_html/gallery/files is a chmod 755 directory owned by username. All photo files are chmod 644 and owned by the username. It works absolutely fine!

These above facts are true whether "safe mode" is on or off and I find that phpsuexec is a secure way to operate a server. Vbulletin has taken the easy path by telling users to chmod 777 their directories and to not use safe mode.

The vBulletin detriments to this are running attachments as files and the lack of an archive setup. However, once past the conversion of attachments from the database to files, there is no reason not to chmod the directories to 755 and the files to 644. It is a "forced" issue. As to the archive, Google and Msn has now indexed my entire board, without the archive deal.

I come from the old school where a chmod 777 directory in web space is to be avoided and it can be done. In that earlier thread, Brian gave me the script locations to change 777 to 755 and 644.

Your mileage may vary.
oldengine is offline   Reply With Quote
Old February 5th, 2005, 12:27 PM   #7 (permalink)
Ultimate Member
 
Join Date: Jan 2004
Posts: 2,196
Re: Safe mode host problem

running php as cgi is more resource intensive, and using phpsuexe has caused quite a few problems.

Theres no realistic reason to run in safemode.
Zachery is offline   Reply With Quote
Old February 8th, 2005, 02:00 AM   #8 (permalink)
Junior Member
Verified Customer
 
Join Date: Jan 2005
Location: Sweden
Posts: 22
Re: Safe mode host problem

Thanks for replying. I guess Ill try to upload to the database manually as u said Zachery, yes it will hinder the functionality for my members, but at least there will be something there. Thanks!
mr2jswe is offline   Reply With Quote
Old February 8th, 2005, 08:25 AM   #9 (permalink)
Member
Verified Customer
 
Join Date: Oct 2004
Location: Florida
Posts: 318
Re: Safe mode host problem

I wish I could get specific information on exactly what is being hindered by running PhpSuexec. I find comments about this only on vBulletin sites.

I have turned safe mode off because I am the only user on the server, but I didn't see any change there either. Stylesheets are now stored as files, but that could be done with PhpSuesec anyway with the files written under the username.

I have been running vBaGallery since its release with the data directory at chmod 755 and the photo files at chmod 644.

EDITS:

upload.php
Code:
Content visible to verified customers only.
functions_gallery_imageedit.php
Code:
Content visible to verified customers only.
chown myusername:myusername gallery

chown myusername:myusername files

This is also true of every other file and sub-directory including the .php files.
oldengine is offline   Reply With Quote
Old February 20th, 2005, 05:55 PM   #10 (permalink)
Junior Member
Verified Customer
 
Join Date: Jan 2005
Location: Sweden
Posts: 22
Re: Safe mode host problem

Just wanted to let you know that Brian (through a ticket) made it possible for me to run a vBgallery with safe mode=on. How? havent got a clue but it works. :-) Great support here at vBadvanced!
mr2jswe is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Safe Mode Gliderstyle Classifieds Installation & Upgrades 1 October 25th, 2005 09:01 AM
Safe Mode Problem scionlife Photopost Pro Installation & Upgrades 3 October 4th, 2005 04:28 PM
[RC1] Safe Mode? Kirby Installs and Upgrade - vBulletin 3.0.X 4 December 9th, 2004 11:25 PM
Safe Mode Michael Blake Before You Buy 2 September 20th, 2004 05:26 AM


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

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