sudden safe mode restriction sudden safe mode restriction
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

sudden safe mode restriction

Started by BCs71, January 27, 2005, 12:19:28 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

BCs71

I am new to the coppermine community, I was sort of handed the job of admin of my Car Club's website. The former admin set up coppermine and the BB and all has been well for almost a year. http://badbodies.com/members

Just after the new year one of the user's notified me that he cannot upload pics and gets the following error messages. I get the same messages in both admin mode and user mode. All other features of coppermine seem to be fully-op.

In the upload screen the following is at the top of the page:
Warning: SAFE MODE Restriction in effect. The script whose uid is 557 is not allowed to access /home/virtual/site54/fst/var/www/html/members/albums owned by uid 0 in /home/virtual/site54/fst/var/www/html/members/upload.php on line 406

After attempting to upload a pic from my Windows XP machine I get the following messages (my user gets the same messages):
Warning: Unable to create './albums/edit/mHTTP_temp_4f8a5e0d.JPG': No such file or directory in /home/virtual/site54/fst/var/www/html/members/upload.php on line 1193

Warning: Unable to move '/tmp/phpO2HU1L' to './albums/edit/mHTTP_temp_4f8a5e0d.JPG' in /home/virtual/site54/fst/var/www/html/members/upload.php on line 1193



After checking out the online manual I think I may have fell victim to my host changing settings on me suddenly.
A significant number of webhost on the Internet run PHP in safe mode. Coppermine runs without any problem in safe mode and with the "open basedir restriction" active, provided safe mode is properly configured. Unfortunately on many hosts, safe mode is not configured properly.

If your webhost is running PHP in safe mode but is misconfigured, you may need to do the following :

    * With a FTP program, change the mode of Coppermine's "include" directory on your server to 0777.
    * Do the same for the "albums" and "userpics" directories.
    * Check that at the beginning the the "include/config.inc.php" file, you have a line with : "define('SILLY_SAFE_MODE', 1);"



As a rookie to php and coppermine, please explain how I can make the proper adjustments in layman's terms, if possible.  :P :)

Joachim Müller

Quote from: BCs71 on January 27, 2005, 12:19:28 AM
In the upload screen the following is at the top of the page:
QuoteWarning: SAFE MODE Restriction in effect. The script whose uid is 557 is not allowed to access /home/virtual/site54/fst/var/www/html/members/albums owned by uid 0 in /home/virtual/site54/fst/var/www/html/members/upload.php on line 406
[...]
Quote
If your webhost is running PHP in safe mode but is misconfigured, you may need to do the following :

    * With a FTP program, change the mode of Coppermine's "include" directory on your server to 0777.
    * Do the same for the "albums" and "userpics" directories.
    * Check that at the beginning the the "include/config.inc.php" file, you have a line with : "define('SILLY_SAFE_MODE', 1);"

As a rookie to php and coppermine, please explain how I can make the proper adjustments in layman's terms, if possible.  :P :)
Download the file include/config.inc.php, edit it with a plain text editor (notepad.exe is fine), add the linedefine('SILLY_SAFE_MODE', 1);in a new line right after<?php
// Coppermine configuration file


Quote from: BCs71 on January 27, 2005, 12:19:28 AM
After attempting to upload a pic from my Windows XP machine I get the following messages (my user gets the same messages):
Warning: Unable to create './albums/edit/mHTTP_temp_4f8a5e0d.JPG': No such file or directory in /home/virtual/site54/fst/var/www/html/members/upload.php on line 1193

Warning: Unable to move '/tmp/phpO2HU1L' to './albums/edit/mHTTP_temp_4f8a5e0d.JPG' in /home/virtual/site54/fst/var/www/html/members/upload.php on line 1193

This error message may or may not be related to the other error message you got. If enabling silly_safe_mode doesn't help, search the board for Unable to create './albums/edit/mHTTP_temp, go through the results from oldest to newset and see if the solutions discussed there fix the issue (this has been asked many times before already; it's a good idea to search the board for error messages before starting a new thread).

Joachim

BCs71

#2
Quote from: GauGau on January 27, 2005, 08:33:05 AM

    * Check that at the beginning the the "include/config.inc.php" file, you have a line with : "define('SILLY_SAFE_MODE', 1);"
This is already defined in the file.  Looks like I will have to keep digging.

Here is my debug output:

==========================
POST :
------------------
Array
(
)

==========================
VERSION INFO :
------------------
PHP version: 4.2.2 - OK
------------------
mySQL version: 3.23.56
==========================
Module: gd
------------------
module doesn't exist
==========================
Module: mysql
------------------
module doesn't exist
==========================
Module: zlib
------------------
module doesn't exist
==========================
Server restrictions (safe mode)?
------------------
Directive | Local Value | Master Value
safe_mode | On | Off
safe_mode_exec_dir | no value | no value
safe_mode_gid | Off | Off
safe_mode_include_dir | no value | no value
safe_mode_exec_dir | no value | no value
sql.safe_mode | Off | Off
disable_functions | no value | no value
file_uploads | 1 | 1
include_path | .:/php/includes:/usr/share/php | .:/php/includes:/usr/share/php
open_basedir | no value | no value
==========================
email
------------------
Directive | Local Value | Master Value
sendmail_from | me@localhost.com | me@localhost.com
sendmail_path | /usr/sbin/sendmail -t -i | /usr/sbin/sendmail -t -i
SMTP | localhost | localhost |  |
==========================
Size and Time
------------------
Directive | Local Value | Master Value
max_execution_time | 60 | 60 |  |
upload_max_filesize | 2M | 2M
post_max_size | 8M | 8M
==========================
Page generated in 0.192 seconds - 22 queries in 0.049 seconds - Album set : AND aid IN (1,2,3,4,5,6,7,8)


According to this thread (mainly post by Hyperion) perhaps I should switch to a GID compare by turning on safe_mode_gid ??? This is all new stuff to me, so please be as detailed as possible in your responses.

I am in the process of searching past threads as I am typing this message.......thanks for all your help.

Also, I created a test account if anyone would like to check it out themselves:
http://www.badbodies.com/members

user: test
password: 1234


Joachim Müller

ask you webhost to CHOWN the albums folder for you. Enable "Single file uploads only" in "groups" to see the actual error message.

Joachim