open_basedir restriction in effect question open_basedir restriction in effect question
 

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

open_basedir restriction in effect question

Started by khirsah, November 02, 2003, 10:43:39 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

khirsah

I know these type of questions have been asked, I've search for them, but havnt found an answer to help me.

I'm trying to upload a picture and i get:

Impossible to move silentscreaming.jpg to albums/userpics/10002/ !



Warning: move_uploaded_file() [function.move-uploaded-file]: open_basedir restriction in effect. File(/tmp/phpfZXykq) is not within the allowed path(s): (/home/content/k/h/i/khirsah) in /home/content/k/h/i/khirsah/html/coppermine1.2/db_input.php on line 258

Warning: move_uploaded_file(/tmp/phpfZXykq) [function.move-uploaded-file]: failed to create stream: Operation not permitted in /home/content/k/h/i/khirsah/html/coppermine1.2/db_input.php on line 258

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpfZXykq' to 'albums/userpics/10002/silentscreaming.jpg' in /home/content/k/h/i/khirsah/html/coppermine1.2/db_input.php on line 258


No I'm not hosting my own server. My provider claims UNIX / Apache with PHP installed. (Godaddy.com) I'm running Coppermine 1.2.0 RC2 with PhpBB2. Albums, userpics, and include are chmod 777.

PhpInfo:

Advanced debug info (phpinfo)
PHP version: 4.3.1


mySQL version: 4.0.14-max-log

--------------------------------------------------------------------------------

Image Lib(s)
gd
GD Support  enabled  
GD Version  bundled (2.0 compatible)  
FreeType Support  enabled  
FreeType Linkage  with freetype  
GIF Read Support  enabled  
JPG Support  enabled  
PNG Support  enabled  
WBMP Support  enabled  
 
Server restrictions (safe mode)?
Directive Local Value Master Value
safe_mode Off Off
safe_mode_exec_dir 1 1
safe_mode_gid Off Off
safe_mode_include_dir no value no value
safe_mode_exec_dir 1 1
sql.safe_mode Off Off
disable_functions no value no value
file_uploads On On
include_path .:/usr/local/lib/php .:/usr/local/lib/php
open_basedir /home/content/k/h/i/khirsah no value

email
Directive Local Value Master Value
sendmail_from no value no value
sendmail_path /usr/sbin/sendmail -t -i  /usr/sbin/sendmail -t -i  
SMTP localhost localhost
smtp_port 25 25

Size and Time
Directive Local Value Master Value
max_execution_time 30 30
max_input_time -1 -1
upload_max_filesize 2M 2M
post_max_size 8M 8M


I noticed there is a value for open_basedir in local but not in master, and i assume (correct or not : p ) that this could be my problem area? What, if anything should be in either of these?

Thanks for any time and help,
-Khirsah

hyperion

To my knowledge, the temporary directory must be within the openbasedir for PHP to have access to uploaded files.  Ask your host to specify an appropriate temporary directory for you in PHP's configuration options.
"Then, Fletch," that bright creature said to him, and the voice was very kind, "let's begin with level flight . . . ."

-Richard Bach, Jonathan Livingston Seagull

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

Joachim Müller

@khirsah:
although I have no suggestions that will solve this problem I wanted to congratulate you on your posting: it has all the information (well, nearly: a link is always nice) that is needed to give support. I thought I'd mention this as a good example on how to post; I'll link others to this thread if necessary.

Cheers

GauGau

khirsah

Quote from: "hyperion"To my knowledge, the temporary directory must be within the openbasedir for PHP to have access to uploaded files.  Ask your host to specify an appropriate temporary directory for you in PHP's configuration options.

Well GoDaddy.com said they use global settings for their PHP server and this is the first time they've heard of this problem so it must be a code issue, and they wont troubleshoot code.

Sounds like BS to you too?

khirsah

It would be nice to know what was wrong on my provers side.. but seeing as how i'm extreamly inpatiant i went ahead and setup my own server..  

I'm thinking they just didnt care seeing as how it works fine with minimal effort and research, and thats with not knowing a damn thing about php, mysql, or apache for windows. Download and installed in under 3 hours. Thats what I get for using a cheap provider.

Thanks for your time,
-Khirsah

Cyberpagan

Since my provider will not change anything...  >:(

is there a way to set the upload directory to something else then /tmp ?

Joachim Müller

"tmp" is not the upload dir, but (as the name suggests) a temporary dir where all http uploads go to first, before being moved to the actual place within your webspace. This temporary folder can not be set in coppermine, but is a php setting. Usually you can't mess with this setting when webhosted, so the answer to your question is "no" I'm afraid.

GauGau

Cyberpagan

Okay, cancel my question - I have just found out where my brain error was ;)