Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: problem with picture uploading  (Read 6425 times)

0 Members and 1 Guest are viewing this topic.

Lordnet

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
problem with picture uploading
« on: October 12, 2003, 08:28:47 am »

i had a problem with the picture uploading. i tried the debug mode, and it doesn't help me so much.

well i edited the code to locally enable the error display on the coppermine script

and it showed the following error

¡Imposible mover 21 41.jpg a albums/userpics/10001/ !

Warning: move_uploaded_file() [function.move-uploaded-file]: open_basedir restriction in effect. File(d:\tmp\php8A7C.tmp) is not within the allowed path(s): (.) in d:\img\test\coppermine\db_input.php on line 257

Warning: move_uploaded_file(d:\tmp\php8A7C.tmp) [function.move-uploaded-file]: failed to create stream: Operation not permitted in d:\img\test\coppermine\db_input.php on line 257

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'd:\tmp\php8A7C.tmp' to 'albums/userpics/10001/21 41.jpg' in d:\img\test\coppermine\db_input.php on line 257

how can i fix this?, like edit the code to work with the .tmp files in a valid path.

the batch upload works with no problems

some data of the machine
MySQL 3.23.56
the web server is running Apache/1.3.28 (Win32) PHP/4.3.1 on Windows 2000

thank you

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
problem with picture uploading
« Reply #1 on: October 12, 2003, 11:18:10 am »

as you seem to run your own server, you probably haven't configured it properly. This has been asked before, please do a search on this board (and the old board as well) on the term "open_basedir".

GauGau
Logged

Lordnet

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
problem with picture uploading
« Reply #2 on: October 12, 2003, 08:10:31 pm »

Quote from: "gaugau"
as you seem to run your own server, you probably haven't configured it properly. This has been asked before, please do a search on this board (and the old board as well) on the term "open_basedir".

GauGau


y found the previus post. but, that post was about a warning with open_base dir with the followin sentence " File is in wrong directory"

my warning is different and the solution too

d:\tmp\php8A7C.tmp is not within the allowed path(s): (.)

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
problem with picture uploading
« Reply #3 on: October 12, 2003, 09:52:27 pm »

tricky stuff with win32/apache: what user does the apache webserver run under (who's the owner). Does this user have proper access to the folder "d:\tmp\" (read/write/execute/delete)?
Please understand that this board's primary goal is not support on server configuration/setup. You really must have some inside knowledge of Windows and webservers; it's impossible to provide help on this complex issue here. Make sure to check php.ini (and be aware that you'll have to stop and restart apache after changing anything there).
I hate to repeat this, most users are upset when I tell them not to run their own server if they don't really understand it in detail and know what they're doing.
What do you mean by "i edited the code to locally enable the error display on the coppermine script"? Check http://php.net/features.safe-mode#ini.open-basedir for details.

GauGau
Logged

hyperion

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 1317
  • - retired -
problem with picture uploading
« Reply #4 on: October 13, 2003, 04:46:42 am »

The problem most likely lies in the php.ini file.  Check to make sure that you did not restrict PHP to only opening files within your htdocs directory.
Logged
"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://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

hyperion

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 1317
  • - retired -
problem with picture uploading
« Reply #5 on: October 13, 2003, 07:43:45 pm »

If safe mode is on or openbasedir is in effect, you need to set the temporary file upload in File uploads to an accessible directory.
Logged
"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://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

Lordnet

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
problem with picture uploading
« Reply #6 on: October 15, 2003, 11:09:55 am »

some admins of webservers doesn´t change the setting of php...

Quote
What do you mean by "i edited the code to locally enable the error display on the coppermine script"?


in db_input.php
i added
Code: [Select]
<?php 
if &#40;!isset&#40;$old_error_reporting&#41;&#41; &#123;
    
error_reporting&#40;E_ALL&#41;;
    
@ini_set&#40;'display_errors', '1'&#41;;
&#125; 
?>


i tried to change de open_basedir restriction with the ini_set variable and .htaccess file, and no of those worked.
the server has safe mode disabled.

well i had to kill my webmaster, the new one changed the open_basedir setting. I hope that it works well .

sorry for my bad english.
Pages: [1]   Go Up
 

Page created in 0.015 seconds with 14 queries.