News:

CPG Release 1.6.28
added submissions from {406man}
cleaned up a few PHP (8.4) deprecations
fixed PHP deprecation in calendar
removed security vulnerability
(please upgrade when possible)

Main Menu

problem with picture uploading

Started by Lordnet, October 12, 2003, 08:28:47 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Lordnet

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

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

Lordnet

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

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

hyperion

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.
"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)

hyperion

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.
"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)

Lordnet

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

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

in db_input.php
i added
<?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.